The PSA uses claim rules to determine which multipathing module should claim the paths to a particular device and to manage the device. esxcli storage core claimrule manages claim rules.Claim rule modification commands do not operate on the VMkernel directly. Instead they operate on the configuration file by adding and removing rules. Specify one of the options listed in Connection Options in place of <conn_options>.
1
2 Run esxcli storage core claimrule load to replace the current rules in the VMkernel with the modified rules from the configuration file.You can also run esxcli storage core plugin list to list all loaded plugins.The esxcli storage core claimrule add command adds a claim rule to the set of claim rules on the system. You can use this command to add new claim rules or to mask a path using the MASK_PATH claim rule. You must load the rules after you add them.
To configure hardware acceleration for a new array, add two claim rules, one for the VAAI filter and another for the VAAI plugin. See vSphere Storage for detailed instructions. Valid values are values of the Model string from the SCSI inquiry string. Run vicfg-scsidevs <conn_options> -l on each device to see model string values. PSA plugin to use. Currently, the values are NMP or MASK_PATH, but third parties can ship their own PSA plugins in the future.MASK_PATH refers to the plugin MASK_PATH_PLUGIN. The command adds claimrules for this plugin if the user wants to mask the path.ESX 3.5 includes the MaskLUNs advanced configuration option. This option is not available in ESX/ESXi 4.x and ESXi 5.0. It has been replaced by the MASK_PATH_PLUGIN. You can add a claim rule that causes the MASK_PATH_PLUGIN to claim the path to mask a path or LUN from the host. See the vSphere Storage documentation for details. Rule ID to use. Run esxcli storage core claimrule list to see the rule ID. The rule ID indicates the order in which the claim rule is to be evaluated. User-defined claim rules are evaluated in numeric order starting with 101. Transport of the paths to use. Valid only if - -type is transport. The following values are supported:
■ block – block storage
■ fc – FibreChannel
■ iscsivendor — iSCSI
■ iscsi – not currently used
■ ide — IDE storage
■ sas — SAS storage
■ sata — SATA storage
■ usb – USB storage
■ parallel – parallel
■ - -type <type> Type of matching to use for the operation. Valid values are vendor, location, driver, and transport. - -vendor Valid values are values of the vendor string from the SCSI inquiry string. Run vicfg-scsidevs <conn_options> -l on each device to see vendor string values. The following examples illustrate adding claim rules. Specify one of the options listed in Connection Options in place of <conn_options>.
■
■ Add rule 914, which claims all paths with vendor string VMWARE and model string Virtual for the NMP plugin.The esxcli storage core claimrule convert command converts LUN masks in ESX 3.5 format (/adv/Disk/MaskLUNs) to claim rule format. The command writes the converted list and erases the old LUN mask data. Specify one of the options listed in Connection Options in place of <conn_options>.
1 Run esxcli storage core claimrule convert without options.That call returns No /adv/Disk/MaskLUNs config entry to convert or displays the list of claim rules that would result from the conversion. For example:
2 When you convert LUN masking to the claim rule format after an upgrade from ESX/ESXi 3.5 to ESX/ESXi 4.x, this command converts the /adv/Disk/MaskLUNs advanced configuration entry in the esx.conf file to claim rules with MASK_PATH as the plug-in.
- -commit The esxcli storage core claimrule remove command removes a claim rule from the set of claim rules on the system.
- -rule <rule_ID> ID of the rule to be removed. Run esxcli storage core claimrule list to see the rule ID.The list command lists all claim rules on the system. You can specify the claim rule class as an argument.
Claim rule class to use in this operation. You can specify MP (Multipathing), Filter, or VAAI. Multipathing is the default. Filter is used only for VAAI. Specify claim rules for both VAAI_FILTER and VAAI plugin to use it. See vSphere Storage for information about VAAI.You can run the command as follows. The equal sign is optional, so both forms of the command have the same result. Specify one of the options listed in Connection Options in place of <conn_options>.The esxcli storage core claimrule load command loads claim rules from the esx.conf configuration file into the VMkernel. Developers and experienced storage administrators might use this command for boot time configuration.The esxcli storage core claimrule move command moves a claim rule from one rule ID to another.
- -new-rule <rule_ID> New rule ID you want to give to the rule specified by the - -rule option. - -rule <rule_ID> ID of the rule to be removed. Run esxcli storage core claimrule list to display the rule ID.The following example renames rule 1016 to rule 1015 and removes rule 1016. Specify one of the options listed in Connection Options in place of <conn_options>.The esxcli storage core claimrule run command runs path claiming rules. Run this command apply claim rules that are loaded. If you do not call run, the system checks for claim rule updates every five minutes and applies them. Specify one of the options listed in Connection Options in place of <conn_options>.
-A <adapter> If - -type is location, name of the HBA for the paths to run the claim rules on. To run claim rules on paths from all adapters, omit this option. If - -type is location, value of the SCSI channel number for the paths to run the claim rules on. To run claim rules on paths with any channel number, omit this option. - -lun <lun> If - -type is location, value of the SCSI LUN for the paths to run claim rules on. To run claim rules on paths with any LUN, omit this option. - -path <path_UID> If - -type is path, this option indicates the unique path identifier (UID) or the runtime name of a path to run claim rules on. - -target <target> If - -type is location, value of the SCSI target number for the paths to run claim rules on. To run claim rules on paths with any target number, omit this option - -type <location|path|all> Type of claim to perform. By default, uses all, which means claim rules run without restriction to specific paths or SCSI addresses. Valid values are location, path, and all. - -wait