VMware Cloud Community
TedH256
Expert
Expert

remove iSCSI datastores from ESXi 5.0

I live in fear of APD situaltions, and I need to remove/delete several iSCSI datastores. What is the process to follow for this, given vSPhere 5.0?

1)remove all virtual disks

2)is there an un-mount process that I must do from each host? I think in 5.1 "unmount" is in the Vsphere client GUI - how do I do it in 5.0?

3)Delete datastore from one host

3)rescan for datastores from other hosts

Is this process correct? Anything else I need to do to ensure that I don't end up with an APD?

0 Kudos
7 Replies
jeremychivers
Contributor
Contributor

Hi,

You can perform this process via the GUI under Host > Configuration > Storage > right click on VMFS

Some additional things to consider;

  • If your using HA then you need to make sure the VMFS store is not being used as a heartbeat location.
  • If your using SDRS then you will need to remove it from the SDRS cluster.
  • All VM's and VMDKs need to be removed.

VMware will provide a warning if all the pre-reqs are not meet when trying to remove a VMFS.

Jeremy

0 Kudos
vmroyale
Immortal
Immortal

I always follow the instructions in http://kb.vmware.com/kb/2004605

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
TedH256
Expert
Expert

I have found this KB:

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=2004605&sl...

But per usual, the article makes some vague statements that ... I am not sure what to do with. Specifically in the section below it says : "Caution: You should successfully unmount the  datastore using the documented method prior to completing the steps  described below" - bu then the steps below are, in fact, the process for unmounting" !?!?!

What the heck - so do I just:

use the vsphere client to:

1)perform the unmount for each host (or can be done for all hosts at once from the datastores and clusters view), then

2)perform the "detach" operation for each host individually from the vsphere client (step 3 below)

3)unpresent the LUN using vendor-specific storage tools/consoles

4)rescan from all hosts using the vsphere client

Is this correct?

"Unmounting a LUN using the vSphere Client

To detach a storage device using the vSphere client, see Detach Storage Devices in the vSphere 5 Documentation Center.
Caution: You should successfully unmount the  datastore using the documented method prior to completing the steps  described below. For more instructions, see Unmount VMFS or NFS Datastores in the vSphere 5 Documentation Center.


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 select 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.

  4. The LUN can now be 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 represented (that is, the detached state is persistent). To  bring the device back online, the device must be attached."

0 Kudos
TedH256
Expert
Expert

Brian Atkinson wrote:

I always follow the instructions in http://kb.vmware.com/kb/2004605

yes, but see my last post - I'm a nervous nelly maybe, but I sure hate it when technical articles are written so poorly. Is my short list of steps correct?

0 Kudos
TedH256
Expert
Expert

yes so some more to chew on. From this part of the documentation:

http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc_50%2FGUID-1B56EF...

we learn about unmounting, and from this:

http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc_50%2FGUID-F2E75F...

We learn about detaching.

These are seperate things, apparently - but detaching seems to also unmount. So is there any reason why not to detach the datastore one at a time (which also unmounts it) rather than doing unmounting then detaching as seperate steps? Am I missing something here?

0 Kudos
fr0nk
Contributor
Contributor

If this doesn't help, set claimrules. This is like dropping an anvil on an egg in order to cack it, but in the end it does the job 😉

0 Kudos
TedH256
Expert
Expert

fr0nk wrote:

If this doesn't help, set claimrules. This is like dropping an anvil on an egg in order to cack it, but in the end it does the job 😉

If what doesn't help - the procedure I sketched out?

I guess I just want to understand what exactly I need to do to avoid an issue - if the "unmount and then detach" process works and is what I am supposed to do, then great! But the docu and kb leave so much to be desired in terms of being clear!

0 Kudos