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.
Examples when you add a PSA claim rule include the following:
- You load a new multipathing plug-in (MPP) and must define the paths that this module claims.
- You add new paths and want an existing MPP to claim them.
Caution: When creating claim rules, avoid a situation where different physical paths to the same LUN are claimed by different MPPs. Unless one of the MPPs is the MASK_PATH MPP, this configuration might cause performance problems.
In the procedure, --server=server_name specifies the target server. The specified target server prompts you for a user name and password. Other connection options, such as a configuration file or session file, are supported. For a list of connection options, see Getting Started with vSphere Command-Line Interfaces.
Prerequisites
Install vCLI or deploy the vSphere Management Assistant (vMA) virtual machine. See Getting Started with vSphere Command-Line Interfaces. For troubleshooting, run esxcli commands in the ESXi Shell.
Procedure
- To define a new claim rule, run the following command:
esxcli --server=server_name storage core claimrule add
The command takes the following options:
Option |
Description |
-A|--adapter=<str> |
Indicate the adapter of the paths. |
-u|--autoassign |
The system auto assigns a rule ID. |
-C|--channel=<long> |
Indicate the channel of the paths. |
-c|--claimrule-class=<str> |
Indicate the claim rule class. Valid values are: MP, Filter, VAAI. |
-d|--device=<str> |
Indicate the device UID. |
-D|--driver=<str> |
Indicate the driver of the paths. |
-f|--force |
Force claim rules to ignore validity checks and install the rule anyway. |
--if-unset=<str> |
Run this command if this advanced user variable is not set to 1. |
-i|--iqn=<str> |
Indicate the iSCSI Qualified Name for the target. |
-L|--lun=<long> |
Indicate the LUN of the paths. |
-M|--model=<str> |
Indicate the model of the paths. |
-P|--plugin=<str> |
Indicate which PSA plugin. (required) |
-r|--rule=<long> |
Indicate the rule ID. |
-T|--target=<long> |
Indicate the target of the paths. |
-R|--transport=<str> |
Indicate the transport of the paths. Valid values are: block, fc, iscsi, iscsivendor, ide, sas, sata, usb, parallel, unknown. |
-t|--type=<str> |
Indicate which type of matching is used for claim/unclaim or claimrule. Valid values are: vendor, location, driver, transport, device, target. (required) |
-V|--vendor=<str> |
Indicate the vendor of the paths. |
--wwnn=<str> |
Indicate the World-Wide Node Number for the target. |
--wwpn=<str> |
Indicate the World-Wide Port Number for the target. |
- To load the new claim rule into your system, run the following command:
esxcli --server=server_name storage core claimrule load
This command loads all newly created multipathing claim rules from your system's configuration file.
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 --server=server_name storage core claimrule add -r 500 -t vendor -V NewVend -M NewMod -P NMP
# esxcli --server=server_name storage core claimrule load
After you run the esxcli --server=server_name storage core claimrule list command, you can see the new claim rule appearing on the list.
The following output indicates that the claim rule 500 has been loaded into the system and is active.
Rule Class Rule Class Type Plugin Matches
MP 0 runtime transport NMP transport=usb
MP 1 runtime transport NMP transport=sata
MP 2 runtime transport NMP transport=ide
MP 3 runtime transport NMP transport=block
MP 4 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 500 runtime vendor NMP vendor=NewVend model=NewMod
MP 500 file vendor NMP vendor=NewVend model=NewMod