How To Guy

How To Reclaim Datastores with VMware's Storage DRS Maintenance Mode

Get back the storage that once belonged to you with this tip for quick datastore reclamation.

While working a vSphere 4.1 and 5.1 Infrastructure to vSphere vBlock 5.1 migration project, I needed to reclaim as much legacy storage as possible back to our SAN team.

Completing the storage reclamation in vSphere 4.1 required me to use a script which the customer would not approve, so for the 4.1 datastores I had to move the VMs manually via vMotion or use the datastore's move file option. Either method would take up valuable time based on the file size, network bandwidth or data storage space within the infrastructure. So, with 4.1 I was stuck with the manual method of relocating the VMs to other shared datastores so I could have hte less populated datastore for reclamation.

vSphere 5.1 has more freedom and it's because of a feature introduced in 5.0: Storage DRS Maintenance Mode. This feature allows for placement of an individual datastore in maintenance mode similar to Host Maintenance Mode.

Under the Summary tab for the datastore you'll find "Enter SDRS Maintenance Mode" in the Commands window. Enter SRDS Maintenance Mode dynamically moves VMs off of selected datastores to another datastore within your datastore cluster. Once the VMs have been successfully relocated, your datastore is ready to be deleted, minus a few configurations that need to be turned off depending on your environment.

There are prerequisites that must be in place before you can place a datastore in SRDS Maintenance Mode:

  • Storage DRS is enabled on the datastore cluster that contains the datastore that is going to be place into maintenance mode.
  • No CD-ROM image files are stored in the datastore.
  • There are at least two datastores in the datastore cluster.
vSphere Distributed Services - vSphere Storage DRS
[Click on image for larger view.]
Figure 1. vSphere Distributed Services - vSphere Storage DRS

Once you've cleared the prerequisites, here are the steps to put the datastore into SRDS Maintenance Mode (btw, I used the vSphere Fat Client here, but you can also use the vSphere Web Client to complete these steps):

  1. Using the vSphere Fat Client, choose the Datastores and Datastore Clusters view.
  2. Select the datastore that you want to place under SRDS Maintenance Mode. Note: A list of recommendations appears for datastore maintenance migration mode. So, depending on your environment, it may or may not show them. However, it will operate dynamically with the recommendations if not displayed. Also, on the Placement Recommendations tab, you can deselect any recommendations you don't want to apply. Related to this, the datastore cannot enter maintenance mode without evacuating all disks. If you deselect recommendations, you must manually move the affected virtual machines.
  3. If necessary, click Apply Recommendations.
  4. vCenter Server uses Storage vMotion to migrate the virtual disks form the source datastore to the destination datastore, and the datastore enters maintenance mode.
  5. The datastore icon might not be immediately updates to reflect the datastore's current state. To update the icon immediately, click Refresh.

Once I completed the steps, I was able to delete the datastore so that it could be reclaimed by our SAN team and repurposed into a new LUN.

Depending on your infrastructure, you can take this a bit further. I recommend that if you have any VMFS-3 datastores, upgrade them to VMFS-5 to allow for a smoother experience with SRDS Maintenance Mode.

About the Author

James Brown, vExpert, VCP, MCSE, is a senior virtualization engineer and CEO of Virtuxperts and VMware Users Group Leader in Las Vegas, NV. James' area of expertise includes virtualization, infrastructure and Windows systems.

Featured

Most   Popular

Virtualization Review

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.