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 of matching to use for the operation. Valid values are vendor, location, driver, and transport. 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.
■ Rules 0–100 are reserved for internal use by VMware.
■ Rules 101–65435 are available for general use. Any third party multipathing plugins installed on your system use claim rules in this range. By default, the PSA claim rule 101 masks Dell array pseudo devices. Do not remove this rule, unless you want to unmask these devices.
■ Rules 65436–65535 are reserved for internal use by VMware.When claiming a path, the PSA runs through the rules starting from the lowest number and determines is a path matches the claim rule specification. If the PSA finds a match, it gives the path to the corresponding plugin. This is worth noticing because a given path might match several claim rules.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.
Important This conversion does not work for all input Mask LUN variations. For example, role conversion for software iSCSI LUNs is not supported.
Forces LUN mask configuration changes to be saved. If you call the command without this parameter, changes are not saved, and you can first inspect the generated claim rules.The esxcli storage core claimrule remove command removes a claim rule from the set of claim rules on the system.
Important By default, the PSA claim rule 101 masks Dell array pseudo devices. Do not remove this rule, unless you want to unmask these devices.
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.
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. 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. If - -type is path, this option indicates the unique path identifier (UID) or the runtime name of a path to run claim rules on. 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 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. If the option is included, the claim waits for paths to settle before running the claim operation. In that case, the system does not start the claiming process until it is likely that all paths on the system have appeared before starting the claim process.After the claiming process has started, the command does not return until device registration has completed.If you add or remove paths during the claiming or the discovery process, this option might not work correctly.