VAAI Claim Rule-SATP Rules-Tag Devices as SSD/Local-Disable a path-Changing SATP Default Policy-Changing Path Policy

Download as PDF

1. How to get more info about specific device
2. Add Claim Rule for VAAI filter
3. Adding SATP Rules.
4. Tag Devices as SSD.
5. Tag Devices as Local.
6. Disable a path with ESXCLI.
7. Changing SATP Default Policy of a device.
8. Changing Path Policy of a device(Multipathing).
9. LUN Masking

1- How to get more info about specific device :

esxcfg-scsidevs Prints the mappings between vmhba names and /dev names

~ # esxcfg-scsidevs -l -d naa.60000970000195901112533032323133

List the devices currently controlled by the VMware NMP Multipath Plugin and show the SATP and PSP information associated with that:

# esxcli storage nmp device list -d naa.60000970000195901112533032323133

~ # esxcli storage core device list -d naa.60000970000195901112533032323133

# esxcfg-mpath -m -d naa.60000970000195901112533032323133

RulesGuide

2- Add Claim Rule for VAAI filter :

To integrate with the block storage arrays and to benefit from the array hardware operations, vSphere uses the ESXi extensions referred to as Storage APIs – Array Integration, formerly called VAAI.

If the device does not support T10 SCSI or provides partial support, ESXi reverts to using the VAAI plug-ins, installed on your host, or uses a combination of the T10 SCSI commands and plug-ins. The VAAI plug-ins are vendor-specific and can be either VMware or partner developed. To manage the VAAI capable device, your host attaches the VAAI filter and vendor-specific VAAI plug-in to the device.

1-Define a new claim rule for the VAAI filter

~ # esxcli storage core claimrule add -r 321 -t device -P VAAI_FILTER –claimrule-class=Filter –device=mpx.vmhba32:C0:T0:L0

2-Define a new claim rule for the VAAI plug-in

~ # esxcli storage core claimrule add -r 322 -t device -P VMW_VAAIP_SYMM –claimrule-class=VAAI –device=mpx.vmhba32:C0:T0:L0

3-Load both claim rules :

~ # esxcli storage core claimrule load –claimrule-class=Filter

~ # esxcli storage core claimrule load –claimrule-class=VAAI

4-Run the VAAI filter claim rule

~ # esxcli storage core claimrule run –claimrule-class=Filter

Filter-class rules only needs to be run. When the VAAI filter claims a device, it automatically finds the proper VAAI plug-in to attach.

3- Adding SATP Rules:

The NMP SATP claim rules specify which SATP should manage a particular storage device

esxcli storage nmp satp list

esxcli storage core plugin registration list -N SATP

register plugin first then add its rule:

esxcli storage core plugin registration add -P “TSTSATP” -N SATP -m “TSTMod”

esxcli storage nmp satp rule add -s TSTSATP -V TSTVend -M TSTMod -P “VMW_PSP_MRU”

List again to see :

esxcli storage nmp satp list

esxcli storage core plugin registration list -N SATP

4- Tag Devices as SSD:

You can use PSA SATP claim rules to tag SSD devices that are not detected automatically.

Only devices that are consumed by the PSA Native Multipathing (NMP) plugin can be tagged.

~ # esxcfg-scsidevs -l

~ # esxcli storage core device list -d naa.60000970000195901101533032313046

~ # esxcli storage nmp satp rule add -s VMW_SATP_SYMM –device naa.60000970000195901112533032323133 –option=enable_ssd

~ # esxcli storage core claiming unclaim –type device -d naa.60000970000195901112533032323133

~ # esxcli storage core claimrule load

~ # esxcli storage core claimrule run

5- Tag Devices as Local:

Prerequisites

• Make sure that the device is not shared.

• Power off virtual machines that reside on the device and unmount an associated datastore.

esxcli storage nmp device list

esxcli storage nmp satp rule add -sVMW_SATP_ALUA_CX -d naa.600601602970280097f5a6b974cee411 -O “enable_local”

esxcli storage core claiming reclaim -d naa.600601602970280097f5a6b974cee411

6- Disable a path with ESXCLI:

You can temporarily disable paths for maintenance or other reasons.

~ # esxcli storage core path set –state=off -p vmhba33:C0:T0:L20

Could be achieved as well with command:

7- Changing SATP Default Policy of a device:

VMW_SATP_SYMM default policy is VMW_PSP_RR we will change it to VMW_PSP_FIXED

~ # esxcli storage nmp satp list

/vmfs/volumes # esxcli storage nmp satp set –default-psp=VMW_PSP_RR –satp=VMW_PSP_FIXED

Plugin ‘VMW_PSP_FIXED’ is not a registered SATP.

Plugin ‘VMW_PSP_FIXED’ is not a registered SATP. Please select a plugin from the list in ‘esxcli storage core plugin registered list -N SATP’.

/vmfs/volumes # esxcli storage core plugin registration list -N SATP

/vmfs/volumes # esxcli storage nmp satp set –default-psp=VMW_PSP_FIXED –satp=VMW_SATP_SYMM

Default PSP for VMW_SATP_SYMM is now VMW_PSP_FIXED

8- Changing Path Policy of a device:

esxcli storage core plugin registration list –plugin-class=”PSP”

~ # esxcli storage nmp psp list

~ # esxcli storage nmp device list –device naa.60000970000195901101533032313039

~ # esxcli storage nmp device set –device naa.60000970000195901101533032313039 –psp VMW_PSP_RR

  1. LUN Masking:

The purpose of LUN masking is to prevent the host from accessing storage devices or LUNs or from

using individual paths to a LUN.

esxcfg-mpath -L |grep naa.600601602970280094f5a6b974cee411

~ # esxcli storage core claimrule list

~ # esxcli storage core claimrule add -r 501 -t location -A vmhba3 -C 0 -T 0 -L 12 -P MASK_PATH

~ # esxcli storage core claimrule add -r 502 -t location -A vmhba3 -C 0 -T 1 -L 12 -P MASK_PATH

~ # esxcli storage core claimrule list

~ # esxcli storage core claimrule run

~ # esxcli storage core claimrule load

~ # esxcli storage core claiming reclaim -d naa.600601602970280094f5a6b974cee411

~ # esxcfg-mpath -L |grep naa.600601602970280094f5a6b974cee411

Advertisements

About Ahmad Sabry ElGendi

https://www.linkedin.com/pub/ahmad-elgendi/94/223/559
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s