The esxcli storage core claiming unclaim command unclaims a path or set of paths, disassociating those paths from a PSA plug-in. The command 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 plug-in 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.
Options Description

--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.

--claimrule-class <cl>

-c <cl>

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 plug-in to use it.

--device <device>

-d <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>

-D <driver>

If --type is driver, unclaims all paths specified by this HBA driver.

--lun <lun_number>

-L <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.

--model <model>

-m <model>

If --type is vendor, attempts to unclaim all paths to devices with specific model information (for multipathing plug-ins) or unclaim the device itself (for filter plug-ins). If there are active I/O operations on this device, at least one path fails to unclaim.

--path <path>

-p <path>

If --type is path, unclaims a path specified by its path UID or runtime name.

--plugin <plugin>

-P

If --type is plugin, unclaims all paths for a specified multipath plug-in.

<plugin> can be any valid PSA plug-in on the system. By default, only NMP and MASK_PATH are available, but additional plugi-ns might be installed.

--target <target>

-T <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>

-t <type>

Type of unclaim operation to perform. Valid values are location, path, driver, device, plugin, and vendor.

--vendor <vendor>

-v <vendor>

If --type is vendor, attempts to unclaim all paths to devices with specific vendor info for multipathing plug-ins or unclaim the device itself for filter plug-ins. 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

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. You can stop processes that might use the device and wait 15 seconds to let the device be quiesced, then retry the command.