Removing Datastore No Longer Needed

Mindwatering Incorporated

Author: Tripp W Black

Created: 02/27/2018 at 03:29 AM

 

Category:
VMWare
Host Configuration, vCenter

Task:
Remove a datastore on a iSCSI or NAS server which is no longer desired.

Steps (Summary):
1. Verify datastore is not used for HA heartbeats, host logs, vswap files, crash dump files, etc.

2. Via the VMs tab for the datastore, verify no VMs are on the datastore.

3. Via the Files tab for the datastore, verify no files exist which any host or VM is using.

Tips before doing the next part:
- With 5.5 and 6, you don't have to Detach and then manually remove from the kernel. You can simply use the Delete datastore option.
- After you have deleted the datastore, you need to take it offline before removing it from the SAN. You can also mask it, but that is a bit more work later. Regardless, the hosts will still look for the offline datastore, and your iSCSI SAN management will most likely send you a bunch of messages before you run the Rescan on the hosts.
- If the messages keep coming, you may have missed one of the hosts dropping/deleting the datastore. Check each host individually to see if the datastore is in the UI. If it is, check for something missed from step #1 above. Fix that problem, and then click the Delete button again for that datastore.
- If none of the hosts have the datastore in the UI, and you have already run the rescan, SSH into the server and run the command:
~ esxcli storage core device detached list

4. In the SAN, set the datastore offline.

5. Go back to each host and do a Rescan. (The notifications from the SAN should stop after this.)

Note:
If you have trouble, do the esxcli command above to see if you have any hosts that didn't detach the datastore. You can also run the command esxcli storage core device list and scroll through each result and see if any are offline.

6. After you have confirmed none of the hosts are using the datastore, you can now delete it from your Volume Group w/in the SAN.









previous page

×