Path Claiming with esxcli storage core claiming
The esxcli storage core claiming namespace includes a number of troubleshooting commands. These commands are not persistent and are useful only to developers who are writing PSA plugins or troubleshooting a system. If I/O is active on the path, unclaim and reclaim actions fail.
Important The help for esxcli storage core claiming includes the autoclaim command. Do not use this command unless instructed to do so by VMware support staff.
Using the Reclaim Troubleshooting Command
The esxcli storage core claiming reclaim troubleshooting command is intended for PSA plugin developers or administrators who troubleshoot PSA plugins. The command proceeds as follows.
It is normal for this command to fail if a device is in use.
Important The reclaim command unclaims paths associated with a device.
You cannot use the command to reclaim paths currently associated with the MASK_PATH plugin because --device is the only option for reclaim and MASK_PATH paths are not associated with a device.
--device <device>
--help
Unclaiming Paths or Sets of Paths
The esxcli storage core claiming unclaim command unclaims a path or set of paths, disassociating those paths from a PSA plugin. The commands fails if the device is in use.
You can unclaim only active paths with no outstanding requests. You cannot unclaim the ESXi USB partition or devices with VMFS volumes on them. It is therefore normal for this command to fail, especially when you specify a plugin or adapter to unclaim.
Unclaiming does not persist. Periodic path claiming reclaims unclaimed paths unless claim rules are configured to mask a path. See the vSphere Storage documentation for details.
Important The unclaim command unclaims paths associated with a device. You can use this command to unclaim paths associated with the MASK_PATH plugin but cannot use the --device option to unclaim those paths.
--adapter <adapter>
-A <adapter>
If --type is set to location, specifies the name of the HBA for the paths that you want to unclaim. If you do not specify this option, unclaiming runs on paths from all adapters.
--channel <channel>
-C <channel>
If --type is set to location, specifies the SCSI channel number for the paths that you want to unclaim. If you do not specify this option, unclaiming runs on paths from all channels.
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.
--device <device>
If --type is set to device, attempts to unclaim all paths to the specified device. If there are active I/O operations on the specified device, at least one path cannot be unclaimed.
--driver <driver>
If --type is driver, unclaims all paths specified by this HBA driver.
--lun <lun_number>
If --type is location, specifies the SCSI LUN for the paths to unclaim. If you do not specify --lun, unclaiming runs on paths with any LUN number.
If --type is vendor, attempts to unclaim all paths to devices with specific model information (for multipathing plugins) or unclaim the device itself (for filter plugins). If there are active I/O operations on this device, at least one path fails to unclaim.
--path <path>
If --type is path, unclaims a path specified by its path UID or runtime name.
--plugin <plugin>
If --type is plugin, unclaims all paths for a specified multipath plugin.
<plugin> can be any valid PSA plugin on the system. By default only NMP and MASK_PATH are available, but additional plugins might be installed.
--target <target>
If --type is location, unclaims the paths with the SCSI target number specified by target. If you do not specify --target, unclaiming runs on paths from all targets.
--type <type>
Type of unclaim operation to perform. Valid values are location, path, driver, device, plugin, and vendor.
If --type is vendor, attempts to unclaim all paths to devices with specific vendor info for multipathing plugins or unclaim the device itself for filter plugins. If there are any active I/O operations on this device, at least one path fails to unclaim
The following troubleshooting command tries to unclaim all paths on vmhba1.
esxcli <conn_options> storage core claiming unclaim - -type location -A vmhba1
Run vicfg-mpath <conn_options> -l to verify that the command succeeded.
If a path is the last path to a device that was in use, or a if a path was very recently in use, the unclaim operation might fail. An error is logged that not all paths could be unclaimed. Stop processes that might use the device and wait 15 seconds to let the device be quiesced. Retry the command.