VMFS Storage Maintenance Tasks

by admin

Prepare storage for maintenance (mounting/un-mounting VMFS Datastores)

When you un-mount a VMFS datastore, it remains intact but it can no longer be seen from the hosts on which you have unmounted it. The datastore will continue to function as normal on hosts where it hasn’t been unmounted. Operations that cause I/O to the datastore shouldn’t be performed whilst it is in the process of being unmounted from a host.

Important NOTE:  vSphere HA heartbeating doesn’t prevent you from unmounting the datastore. If a datastore is used for datastore heartbeating, unmounting it might cause the host to fail and restart any active virtual machine. If the heartbeating check  fails, the vSphere Client displays a warning.

Before you unmount a VMFS datastore, ensure the following is met:

  • No virtual machines reside on the datastore.
  • The datastore is not part of a datastore cluster.
  • The datastore is not managed by Storage DRS.
  • Storage I/O control is disabled for this datastore.
  • The datastore is not used for vSphere HA heartbeating.

Process to Unmount/Mount a VMFS Datastore using the vSphere Client

  1. In the vSphere client, browse to the datastores view.
  2. Right Click the Datastore and select Unmount
  3. If more than one host has the datastore mounted, choose the host(s) on which you wish to unmount if from
  4. Confirm that you want to unmount the datastore:

An unmounted datastore will be shown as greyed out in the Storage view:

To mount a datastore, just right click on it and click Mount:

Process to Unmount/Mount a VMFS Datastore using the CLI

Using the CLI you can list the mounted datastores on a host by running

# esxcli storage filesystem list

The output will look something like the below screen shot (except with the UUIDs visible!):

Looking at the line relating to the datastore I unmounted via the vSphere client earlier we can see the CLI output is also showing it as unmounted:

To mount it we can run:

 # esxcli storage filesystem mount [-u UUID | -l label | -p path ]

If we wanted to unmount the datastore from the command line we could run:

 # esxcli storage filesystem unmount [-u UUID | -l label | -p path ]

References and Useful Links

http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-storage-guide.pdf

Keep up to date with new posts on Buildvirtual.net - Follow us on Twitter:
Be Sociable, Share!

Leave a Comment

*

Previous post:

Next post: