Sometimes you will need to perform maintenance on a Datastore which will require placing it in Maintenance Mode and unmounting/remounting it
When you unmount a datastore, it remains intact, but can no longer be seen from the hosts that you specify. The datastore continues to appear on other hosts, where it remains mounted
Instructions
- Click Hosts and Clusters View from Home
- Select the Host with the attached datastore
- Click the Configuration tab
- Click on Storage within the Hardware frame
- Locate the Datastore to unmount
- Right click the datastore and select Properties
- Uncheck Enabled under Storage I/O Control and then click Close
- Right click the datastore and select Enter SDRS Maintenance Mode
- Right Click the Datastore and select Unmount. You should be greeted by this screen warning
- 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
Unmounting a LUN from the command line
- Type esxcli storage filesystem list
- The output will look like the below
- Unmount the datastore by running the command:
- esxcli storage filesystem unmount [-u UUID | -l label | -p path ]
- For example, use one of these commands to unmount the LUN01 datastore:
esxcli storage filesystem unmount -l LUN01
esxcli storage filesystem unmount -u 4e414917-a8d75514-6bae-0019b9f1ecf4
esxcli storage filesystem unmount -p /vmfs/volumes/4e414917-a8d75514-6bae-0019b9f1ecf4
- To verify that the datastore has been unmounted, run the command:
- esxcli storage filesystem list
- The output is similar to:
- Note that the Mounted field is set to false, the Type field is set to VMFS-unknown version, and that no Mount Point exists.
- Note: The unmounted state of the VMFS datastore persists across reboots. This is the default behavior. However, it can be changed by appending the –no-persist flag.
VMware Link
Leave a Reply