Use the esxcli commands to add a new 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 add a new PSA claim rule when, for example, you load a new multipathing plug-in (MPP) and need to define which paths this module should claim. You may need to create a claim rule if you add new paths and want an existing MPP to claim them.

Caution

When creating new claim rules, be careful to 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 will 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.

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.

1

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 to use in this operation.

-u|--autoassign

The system will auto assign a rule ID.

-C|--channel=<long>

Indicate the channel of the paths to use in this operation.

-c|--claimrule-class=<str>

Indicate the claim rule class to use in this operation.

Valid values are: MP, Filter, VAAI.

-d|--device=<str>

Indicate the device Uid to use for this operation.

-D|--driver=<str>

Indicate the driver of the paths to use in this operation.

-f|--force

Force claim rules to ignore validity checks and install the rule anyway.

--if-unset=<str>

Execute this command if this advanced user variable is not set to 1.

-i|--iqn=<str>

Indicate the iSCSI Qualified Name for the target to use in this operation.

-L|--lun=<long>

Indicate the LUN of the paths to use in this operation.

-M|--model=<str>

Indicate the model of the paths to use in this operation.

-P|--plugin=<str>

Indicate which PSA plugin to use for this operation. (required)

-r|--rule=<long>

Indicate the rule ID to use for this operation.

-T|--target=<long>

Indicate the target of the paths to use in this operation.

-R|--transport=<str>

Indicate the transport of the paths to use in this operation.

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 to user in this operation.

--wwnn=<str>

Indicate the World-Wide Node Number for the target to use in this operation.

--wwpn=<str>

Indicate the World-Wide Port Number for the target to use in this operation.

2

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.

In the following example, you add and load rule # 500 to claim 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.

Note

The two lines for the claim rule, one with the Class of runtime and another with the Class of file, indicate that the new claim rule 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