Example:
If this issue occurs, the VMFS volume (and the virtual machines residing on the affected volume) are unavailable to the ESX/ESXi host.
LVM: 11245: Failed to open device naa.xxxxxx:1 : Lock was not free
Use the vmkfstools command to break the device lock on a particular partition.
When entering the device parameter, use the following format:
You can use this command when a host fails in the middle of a datastore operation, such as expand the datastore, add an extent, or resignature. When you run this command, make sure that no other host is holding the lock.
-
To break the lock:
-
Break the existing LVM lock on the datastore by running this command:
# vmkfstools –B vmfs device
Note: You can also use the parameter –breaklock instead of -B with the vmkfstools command.
From the preceding error message, this command is used:
# vmkfstools -B /vmfs/devices/disks/naa.60060160b3c018009bd1e02f725fdd11:1
You see output similar to:
VMware ESX Question:
LVM lock on device /vmfs/devices/disks/naa.60060160b3c018009bd1e02f725fdd11:1 will be forcibly broken. Please consult vmkfstools or ESX documentation to understand the consequences of this.Please ensure that multiple servers aren’t accessing this device.
Continue to break lock?
0) Yes
1) NoPlease choose a number [0-1]:
-
Enter 0 to break the lock.
-
Re-read and reload VMFS datastore metadata to memory by running this command:
# vmkfstools –V
-
From the vSphere UI, refresh the Storage Datastores View under Configuration tab.
-
Note: This issue can also be resolved by restarting all the hosts in the cluster.