Showing posts with label storage. Show all posts
Showing posts with label storage. Show all posts

Saturday, 22 September 2012

How to Tag/Enable a device as SSD in ESXi.

ESXi 5.0 supports SSD disk. What does it mean?
You  might already rememeber some hints on SSD support prediction in the past on this blog.Yes, ESX now officially support SSD disks.With this support user now can plugin SSD into ESX ( vsphere5.0 onwards), and configure ESX to use the same for caching or storing VM swap files.To utilize the SSD disk for holding caching purpose , you need to create a datastore on the device and then you can select the %-age space to use it for esxi caching from 1-100%. You can observe the ESXi performance better then its predecessor.

That said here is the catch.Some times even though the disk is SSD ESXi can not recognize the disk as SSD. There is a reason for that, if the disk attached to raid controller , few raid controllers donot  give ESX  the access to the mode page ,to determine whether the device behind the RAID is  SSD or not. In such cases where device does not show up as SSD we have a provision  to Tag/Enable the disk as SSD. We can as certain claimrules in ESX for the disk which we are sure to be a SSD. You can also mark a magetic disk as SSD using this method for testing.

This can be done using the PSA claim rules,

#  esxcli nmp satp addrule --satp VMW_SATP_ALUA_CX -t vendor -V DGC -M "RAID 0" --option="enable_ssd"

--satp = SATP which claims the device  

Note: you can get the device satp by 
"esxcli storage nmp device list"
vendor -- vendor of the device
model  -- Model of the device
Instead of using vendor/model there are different options available in esxi 5.x to add SATP Claimrules.
You can use device,transport....etc.



Thursday, 14 April 2011

Storage debugging on ESX4.0 and ESX4.1 using "esxcfg-mpath "


One of the best esxcfg command that I most often use in my ESX4.0 and ESX4.1 environment is esxcfg-mpath.Though you would find a lot of variant in VMware's furture implementations, never the less, usecases  of this command are tonnes.

For instance you want to know, what is the path status of the devices in your esx setup. You can use
esxcfg-mpath -b -d naa.600a0b8000479284000004e94c8dc18c
naa.600a0b8000479284000004e94c8dc18c : IBM Fibre Channel Disk (naa.600a0b8000479284000004e94c8dc18c)
   vmhba2:C0:T0:L100 LUN:100 state:active fc Adapter: WWNN: 20:00:00:00:c9:6f:06:f0 WWPN: 10:00:00:00:c9:6f:06:f0  Target: WWNN: 20:04:00:a0:b8:26:4e:1a WWPN: 20:34:00:a0:b8:26:4e:1a
   vmhba3:C0:T0:L100 LUN:100 state:standby fc Adapter: WWNN: 20:00:00:00:c9:6f:06:f1 WWPN: 10:00:00:00:c9:6f:06:f1  Target: WWNN: 20:04:00:a0:b8:26:4e:1a WWPN: 20:35:00:a0:b8:26:4e:1a

This would not only give you details on how many redundant paths you have for the device but also status of the paths.Depending on your array type and path health , the possible path states can be Active,Standby and Dead states.

If you ever want to know, what is the protocol through which ESX is accessing the device, then below command would be the right choice.Observe the Transport filed indicating "fc".
It indicates that the device is Fibre channel device.If it was a SAS ,IDE or SATA then you would see sas,ide or sata respectively.
esxcfg-mpath -l -d naa.600a0b80002a071c0000499249cc2130
fc.20000000c96f06f0:10000000c96f06f0-fc.200400a0b8264e1a:203400a0b8264e1a-naa.600a0b80002a071c0000499249cc2130
   Runtime Name: vmhba2:C0:T0:L31
   Device: naa.600a0b80002a071c0000499249cc2130
   Device Display Name: IBM Fibre Channel Disk (naa.600a0b80002a071c0000499249cc2130)
   Adapter: vmhba2 Channel: 0 Target: 0 LUN: 31
   Adapter Identifier: fc.20000000c96f06f0:10000000c96f06f0
   Target Identifier: fc.200400a0b8264e1a:203400a0b8264e1a
   Plugin: NMP
   State: active
   Transport: fc
   Adapter Transport Details: WWNN: 20:00:00:00:c9:6f:06:f0 WWPN: 10:00:00:00:c9:6f:06:f0
   Target Transport Details: WWNN: 20:04:00:a0:b8:26:4e:1a WWPN: 20:34:00:a0:b8:26:4e:1a


The above command would provide complete details of the  device paths.
Depending on the number of paths, the information would span across multiple lines.
If you want a consolidated details then use.

 esxcfg-mpath -L -d naa.600a0b80002a071c0000499249cc2130
vmhba2:C0:T0:L31 state:active naa.600a0b80002a071c0000499249cc2130 vmhba2 0 0 31 NMP active san fc.20000000c96f06f0:10000000c96f06f0 fc.200400a0b8264e1a:203400a0b8264e1a
vmhba3:C0:T0:L31 state:active naa.600a0b80002a071c0000499249cc2130 vmhba3 0 0 31 NMP active san fc.20000000c96f06f1:10000000c96f06f1 fc.200400a0b8264e1a:203500a0b8264e1a


You can even find the total number of paths to all you devices. Just run
 esxcfg-mpath -m | wc -l
18