VMware Cloud Community
timjwatts
Enthusiast
Enthusiast
Jump to solution

Detach corrupt empty VMFS datastore from hosts (datastore is an iSCSI LUN)

Sorry folks - cannot quite nail this with a Google.

I have a corrupt (sized beyond 2TB by accident) datastore. All hosts migrated off it - it is empty.

As it's corrupt, it will not delete in the usual way.

Now I CAN just rip it out from the EqualLogic SAN - but I don't want to confuse ESXi.

Can anyone tell me the "nice but firm" way to tell ESXi to let go of it before I remove it from the SAN?

Many many thanks - Tim

0 Kudos
1 Solution

Accepted Solutions
timjwatts
Enthusiast
Enthusiast
Jump to solution

As a bit of self help I have denied access from one host to the LUN and rebooted via maint mode.

It's not in that hosts view of the storage afterwards.

If I repeat this, will it clear it completely from vCenter?

Ta Tim

View solution in original post

0 Kudos
3 Replies
timjwatts
Enthusiast
Enthusiast
Jump to solution

As a bit of self help I have denied access from one host to the LUN and rebooted via maint mode.

It's not in that hosts view of the storage afterwards.

If I repeat this, will it clear it completely from vCenter?

Ta Tim

0 Kudos
timjwatts
Enthusiast
Enthusiast
Jump to solution

Well, by trial and error, it does seem to work. After all 4 hosts were blocked from accessing the LUN and rebooted, the corrupt datastore no longer shows in the datastore inventory.

I shall now delete the LUN from the SAN.

0 Kudos
FritzBrause
Enthusiast
Enthusiast
Jump to solution

Normally you unmount and detach the datastore/device first.

See VMware KB: Unmounting a LUN or detaching a datastore/storage device from multiple VMware ESXi 5.x/6.... for details.

If you "only" unpresent it from the SAN array, the ESX hosts normally look for it in an endless loop which can cause APD (All Paths Down) and PDL (Permanent Device Loss).

APDs and PDL can cause issues if there are still VMs running on them and the ESX host tries getting access to it endlessly (the ESX host can become unresponsive).

In your case, if the LUN was unpresented from the array (and normally an APD/PDL occurs), you would need rebooting the ESX hosts which had access to this LUN. During a reboot, this gets cleaned up.

0 Kudos