VMware Cloud Community
ted_byrne
Contributor
Contributor

Procedure for deleting VMFS volumes?

What's the recommended procedure for deleting (empty) VMFS volumes? We need to re-organize some storage on our SAN, and I've migrated the VMs off of the volumes we want to delete.

It does not appear that vmkfstools can delete vmfs volumes, although the help and man pages for the command appear to indicate that simply deleting the underlying LUN and rescanning the vmhba will remove the volume. From the description of the -s switch:

"If an existing device or LUN

is not being used and now appears to be gone, it will be removed from

ESX Server data structures and will no longer be accessible to

virtual machines.

What have other peoples' experiences been?

Thanks,

Ted

Reply
0 Kudos
7 Replies
RParker
Immortal
Immortal

First you have to make the LUN offline. Then make the volume offline, then delete the volume, then rescan HBA from ESX.

Then go into VI console, click on View -> Inventory -> datastores.

Verify there are NO VM's listed, if there are you need to remove them from inventory from this page.

Then you should be good.

Reply
0 Kudos
ted_byrne
Contributor
Contributor

When you say make the LUN and Volume offline do you mean simply make it inaccessible from the ESX server, such as removing the host-to LUN mapping on the SAN storage device?

Reply
0 Kudos
BUGCHK
Commander
Commander

\[ wrong cut&paste Smiley Sad ]

Message was edited by:

BUGCHK

Reply
0 Kudos
BUGCHK
Commander
Commander

I would REMOVE the datastore through the VI Client.

Last time I checked, it also wiped the partition table.

Then, unpresent the LUN and rescan.

That makes it easy to redeploy the disk(s).

Depending on the storage array, a stale partition table could pop up again and confuse an administrator..

RParker
Immortal
Immortal

No, this is from the SAN side.

Do you have rights to change LUN / Volumes on the SAN?

If you do, then you can remove them, and ESX won't see them. But if you have orphaned VM's they will still show up on the datastore (even though they no longer exist).

That's the easiest way to delete a LUN. It's difficult to remove a LUN while it's online, so you use the SAN management to make it "offline", and ESX can no longer access it.

Reply
0 Kudos
ted_byrne
Contributor
Contributor

RParker,

I do have rights to change LUNs/volumes on the SAN. I tried your suggestion, and deleted the LUNS from the device. It's true that ESX (v3.0.2) no longer saw them. but it did not react gracefully. At one point, I was getting an error when simply trying to get a directory listing of the /vmfs/volumes directory. A rescan of the storage adapters appeared to be hung, to the point where I was contemplating whether a reboot of the host might be needed.

Fortunately, I let the process go, and when I came back to the host later, I was able to access the directory listing. I now need to see how the other hosts with access to that LUN react to the lack of the filesytem that they are configured to access.

Ted

Reply
0 Kudos
RParker
Immortal
Immortal

It's not graceful, but it's the only way to get those VMFS "offline" because they are tough to delete while ESX is still using them.

I have done it like this in the past with no problem.

Reply
0 Kudos