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.
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 🙂
Incoming search terms:
- vmkctl hostctl exception