To detach a storage device using the vSphere Client
Caution: You must successfully unmount the datastore using the documented method prior to completing the steps described below.
To unmount a LUN from an ESXi 5.0 host using the vSphere Client:
1.
If the LUN is an RDM, skip to step 2. Otherwise, in the Configuration tab of the ESXi host, click Storage. Right-click the datastore being removed, and
click Unmount.
A Confirm Datastore Unmount window appears. When the prerequisite criteria have been passed, click OK.
Note: To unmount a datastore from multiple hosts in the vSphere Client, click Hosts and Clusters > Datastores and Datastore Clusters view (Ctrl+Shift+D). Perform the unmount task and select the appropriate hosts that should no longer access the datastore to be unmounted.
A Confirm Datastore Unmount window appears. When the prerequisite criteria have been passed, click OK.
Note: To unmount a datastore from multiple hosts in the vSphere Client, click Hosts and Clusters > Datastores and Datastore Clusters view (Ctrl+Shift+D). Perform the unmount task and select the appropriate hosts that should no longer access the datastore to be unmounted.
2.
Click the Devices view
(under Configuration > Storage):
3.
Right-click the NAA ID of the LUN (as noted above) and click Detach.
A Confirm Device Unmount window is displayed. When the prerequisite criteria have been
passed, click OK. Under the Operational State of the Device, the LUN is listed as
Unmounted.
Note: The Detach function must be performed on a per-host basis and does not propagate to other hosts in vCenter Server. If a LUN is presented to an initiator group or storage group on the SAN, the Detach function must be performed on every host in that initiator group before unmapping the LUN from the group on the SAN. Failing to follow this step results in an all-paths-down (APD) state for those hosts in the storage group on which Detach was not performed for the LUN being unmapped.
Note: The Detach function must be performed on a per-host basis and does not propagate to other hosts in vCenter Server. If a LUN is presented to an initiator group or storage group on the SAN, the Detach function must be performed on every host in that initiator group before unmapping the LUN from the group on the SAN. Failing to follow this step results in an all-paths-down (APD) state for those hosts in the storage group on which Detach was not performed for the LUN being unmapped.
4.
Confirm the LUN has been successfully detached. The LUN can then
be safely unpresented from the SAN. For more information, contact your storage
array vendor.
5.
Perform a rescan on all ESXi hosts which had visibility to the
LUN. The device is automatically removed from the Storage Adapters.
When the device is detached, it
stays in an unmounted state even if the device is re-presented (that is, the
detached state is persistent). To bring the device back online, the device must
be attached.
If the device is to be permanently decommissioned from an ESXi host, you may have to manually remove the NAA entries from the host configuration:
If the device is to be permanently decommissioned from an ESXi host, you may have to manually remove the NAA entries from the host configuration:
1.
To list the permanently detached devices, run the command:
# esxcli storage core device detached list
The output is similar to:
Device UID State
------------------------------------ -----
naa.50060160c46036df50060160c46036df off
naa.6006016094602800c8e3e1c5d3c8e011 off
# esxcli storage core device detached list
The output is similar to:
Device UID State
------------------------------------ -----
naa.50060160c46036df50060160c46036df off
naa.6006016094602800c8e3e1c5d3c8e011 off
2.
To permanently remove the device configuration information from
the system, run the command:
# esxcli storage core device detached remove -d NAA_ID
For example:
# esxcli storage core device detached remove -d naa.50060160c46036df50060160c46036df
# esxcli storage core device detached remove -d NAA_ID
For example:
# esxcli storage core device detached remove -d naa.50060160c46036df50060160c46036df
Source: VMware KB
No comments:
Post a Comment