Today I had a customer running VMware ESXi 5.1 on three hosts connected to a Dell EqualLogic SAN. The issue at hand was out of 10 datastores on the SAN one datastore could suddenly no longer be mounted.
It showed up as (inactive)(unmounted):
Obviously the logical solution would be to just try and mount the datastore but this gave an error message:
Operation failed, diagnostics report: Sysinfo error on operation returned status : Lock was not free. Please see the VMkernel log for detailed error information
I then enabled SSH on the host and checked the mentioned VMkernel log located in /var/log and found the following entries at the bottom:
WARNING: LVM: 12969: The volume on the device naa.6090a078f04af0b0a7ea54aecf002067:1 locked, possibly because some remote host encountered a error during a volume operation and could not recover.
WARNING: LVM: 4925: If you are _sure_ this is the case, please break the device lock with `vmkfstools -B /vmfs/devices/disks/naa.6090a078f04f0b0a7ea54aecf002067:1`
To ensure nothing was still locking this I emptied each server one at a time with vMotion and rebooted it. After rebooting the last host I checked if it was possible to mount the datastore, but unfortunately it was still the same.
I then proceeded to execute the suggested command:
After the command finished I was finally able to mount the datastore on all ESXi hosts.
UPDATE
As written by Ibecake in the comments, please make sure you do NOT! have any VMs running on the datastore from any host before removing the lock.
As always, if this helped you please leave a comment 🙂
You forgot to mention that the vmkfstools -B command will break all locks to that device and any Vm’s using that datastore will also have their locks broken possibly causing them to fail worst case scenario.
Thank you for taking time to reply Ibecake!
You are entirely correct! I will update the post to reflect this more clearly.
However in my case none of the hosts had access to the datastore and due to this no VMs were able to use the datastore.
thanks a lot it’s work for me
Thanks – saved my bacon at 2am on a Sunday morning! We had been working on this for hours – am really REALLY grateful you took time to post this info