Claim rules determine which multipathing module owns the paths to a particular storage device. They also define the type of multipathing support that the host provides to the device.
To learn more about multipathing modules, see Multipathing Concepts and Acronyms.
The claim rules are listed in the host’s /etc/vmware/esx.conf file.
- Core Claim Rules . These claim rules determine which multipathing module, the NMP, HPP, or a third-party MPP, claims the specific device.
- SATP Claim Rules. Depending on the device type, these rules assign a particular SATP submodule that provides vendor-specific multipathing management to the device.
You can use the esxcli commands to add or change the core and SATP claim rules. Typically, you add the claim rules to load a third-party MPP or to hide a LUN from your host. Changing claim rules might be necessary when default settings for a specific device are not sufficient.
For more information about commands available to manage PSA claim rules, see the Getting Started with ESXCLI.
For a list of storage arrays and corresponding SATPs and PSPs, see the Storage/SAN section of the vSphere Compatibility Guide.
Multipathing Considerations
Specific considerations apply when you manage storage multipathing plug-ins and claim rules.
The following considerations help you with multipathing:
- If no SATP is assigned to the device by the claim rules, the default SATP for iSCSI or FC devices is VMW_SATP_DEFAULT_AA. The default PSP is VMW_PSP_FIXED.
- When the system searches the SATP rules to locate a SATP for a given device, it searches the driver rules first. If there is no match, the vendor/model rules are searched, and finally the transport rules are searched. If no match occurs, NMP selects a default SATP for the device.
- If VMW_SATP_ALUA is assigned to a specific storage device, but the device is not ALUA-aware, no claim rule match occurs for this device. The device is claimed by the default SATP based on the device's transport type.
- The default PSP for all devices claimed by VMW_SATP_ALUA is VMW_PSP_MRU. The VMW_PSP_MRU selects an active/optimized path as reported by the VMW_SATP_ALUA, or an active/unoptimized path if there is no active/optimized path. This path is used until a better path is available (MRU). For example, if the VMW_PSP_MRU is currently using an active/unoptimized path and an active/optimized path becomes available, the VMW_PSP_MRU will switch the current path to the active/optimized one.
- While VMW_PSP_MRU is typically selected for ALUA arrays by default, certain ALUA storage arrays need to use VMW_PSP_FIXED. To check whether your storage array requires VMW_PSP_FIXED, see the VMware Compatibility Guide or contact your storage vendor. When using VMW_PSP_FIXED with ALUA arrays, unless you explicitly specify a preferred path, the ESXi host selects the most optimal working path and designates it as the default preferred path. If the host selected path becomes unavailable, the host selects an alternative available path. However, if you explicitly designate the preferred path, it will remain preferred no matter what its status is.
- By default, the PSA claim rule 101 masks Dell array pseudo devices. Do not delete this rule, unless you want to unmask these devices.
List Multipathing Claim Rules for the Host
Use the esxcli command to list available multipathing claim rules.
Claim rules indicate whether the NMP, HPP, or a third-party MPP manages a given physical path. Each claim rule identifies a set of paths based on the following parameters:
- Vendor/model strings
- Transportation, such as SATA, IDE, Fibre Channel
- Adapter, target, or LUN location
- Device driver, for example, Mega-RAID
Procedure
- ♦ List the multipathing claim rules by running the esxcli storage core claimrule list --claimrule-class=MP command.
If you do not use the claimrule-class option, the MP rule class is implied.
Example: Sample Output of the esxcli storage core claimrule list Command
Rule Class Rule Class Type Plugin Matches MP 10 runtime vendor HPP vendor=NVMe model=* MP 10 file vendor HPP vendor=NVMe model=* MP 50 runtime transport NMP transport=usb MP 51 runtime transport NMP transport=sata MP 52 runtime transport NMP transport=ide MP 53 runtime transport NMP transport=block MP 54 runtime transport NMP transport=unknown MP 101 runtime vendor MASK_PATH vendor=DELL model=Universal Xport MP 101 file vendor MASK_PATH vendor=DELL model=Universal Xport MP 200 runtime vendor MPP_1 vendor=NewVend model=* MP 200 file vendor MPP_1 vendor=NewVend model=* MP 201 runtime location MPP_2 adapter=vmhba41 channel=* target=* lun=* MP 201 file location MPP_2 adapter=vmhba41 channel=* target=* lun=* MP 202 runtime driver MPP_3 driver=megaraid MP 202 file driver MPP_3 driver=megaraid MP 65535 runtime vendor NMP vendor=* model=*
- The NMP claims all paths connected to storage devices that use the USB, SATA, IDE, and Block SCSI transportation.
- The rules for HPP, MPP_1, MPP_2, and MPP_3 have been added, so that the modules can claim specified devices. For example, the HPP claims all devices with vendor NVMe. All devices handled by the inbox nvme driver are claimed regardless of the actual vendor. The MPP_1 module claims all paths connected to any model of the NewVend storage array.
- You can use the MASK_PATH module to hide unused devices from your host. By default, the PSA claim rule 101 masks Dell array pseudo devices with a vendor string DELL and a model string Universal Xport.
- The Rule Class column in the output describes the category of a claim rule. It can be MP (multipathing plug-in), Filter, or VAAI.
- The Class column shows which rules are defined and which are loaded. The file parameter in the Class column indicates that the rule is defined. The runtime parameter indicates that the rule has been loaded into your system. For a user-defined claim rule to be active, two lines with the same rule number must exist, one line for the rule with the file parameter and another line with runtime. Several default system-defined claim rules have only one line with the Class of runtime. You cannot modify these rules.
- The default rule 65535 assigns all unclaimed paths to the NMP. Do not delete this rule.
Add Multipathing Claim Rules
Use the esxcli commands to add a multipathing PSA claim rule to the set of claim rules on the system. For the new claim rule to be active, you first define the rule and then load it into your system.
- You load a new third-party MPP and must define the paths that this module claims.
- You must enable the native HPP.
Prerequisites
Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.
Procedure
Example: Defining Multipathing Claim Rules
In the following example, you add and load rule # 500. The rule claims all paths with the NewMod model string and the NewVend vendor string for the NMP plug-in.
# esxcli storage core claimrule add -r 500 -t vendor -V NewVend -M NewMod -P NMP
# esxcli storage core claimrule load
After you run the esxcli storage core claimrule list command, you can see the new claim rule appearing on the list.
Rule Class Rule Class Type Plugin Matches ... ... ... ... ... ... MP 500 runtime vendor NMP vendor=NewVend model=NewMod MP 500 file vendor NMP vendor=NewVend model=NewMod
Delete Multipathing Claim Rules
Use the esxcli commands to remove a multipathing PSA claim rule from the set of claim rules on the system.
Prerequisites
Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.
Procedure
Mask Paths
You can prevent the host from accessing storage devices or LUNs or from using individual paths to a LUN. Use the esxcli commands to mask the paths. When you mask paths, you create claim rules that assign the MASK_PATH plug-in to the specified paths.
Prerequisites
Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.
Procedure
Results
Example: Masking a LUN
In this example, you mask the LUN 20 on targets T1 and T2 accessed through storage adapters vmhba2 and vmhba3.
-
#esxcli storage core claimrule list
-
#esxcli storage core claimrule add -P MASK_PATH -r 109 -t location -A vmhba2 -C 0 -T 1 -L 20 #esxcli storage core claimrule add -P MASK_PATH -r 110 -t location -A vmhba3 -C 0 -T 1 -L 20 #esxcli storage core claimrule add -P MASK_PATH -r 111 -t location -A vmhba2 -C 0 -T 2 -L 20 #esxcli storage core claimrule add -P MASK_PATH -r 112 -t location -A vmhba3 -C 0 -T 2 -L 20
-
#esxcli storage core claimrule load
-
#esxcli storage core claimrule list
-
#esxcli storage core claiming unclaim -t location -A vmhba2 #esxcli storage core claiming unclaim -t location -A vmhba3
-
#esxcli storage core claimrule run
Unmask Paths
When you need the host to access the masked storage device, unmask the paths to the device.
Prerequisites
Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.
Procedure
Results
Define NMP SATP Rules
The NMP SATP claim rules define which SATP manages a storage device. Usually, you can use the default SATPs provided for storage devices. If default settings are not sufficient, use the esxcli commands to change the SATP for a specific device.
Prerequisites
Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.
Procedure
Example: Defining an NMP SATP Rule
The following sample command assigns the VMW_SATP_INV plug-in to manage storage arrays with vendor string NewVend and model string NewMod.
# esxcli storage nmp satp rule add -V NewVend -M NewMod -s VMW_SATP_INV
When you run the esxcli storage nmp satp list -s VMW_SATP_INV command, you can see the new rule on the list of VMW_SATP_INV rules.