Removing VMFS Volume locks on datastores - Unable to mount the datastore
search cancel

Removing VMFS Volume locks on datastores - Unable to mount the datastore

book

Article ID: 344722

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms

  • Trying to mount the volume on the host fails with below error -

    "Mount VMFS volume failed!
    An error occurred during host configuration: .Operation failed, diagnostics report: Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Lock was not free"



  • VM on the problematic datastore shows up as inaccessible.
 

Environment

VMware vSphere ESXi 

Cause

  • The datastore remains inaccessible to other hosts because the underlying device is locked by an active host.

  • In /var/run/log/vobd.log, below entries will be seen -
    2026-03-25T08:11:39.931Z In(14) vobd[2097588]:  [vmfsCorrelator] 5797683849us:[esx.problem.vmfs.error.volume.is.locked] Volume on device naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1 is locked, possibly because some remote host encountered an error during a volume operation and could not recover.

Parallely, in /var/run/log/vmkernel.log  -

2026-03-25T08:11:24.827Z In(182) vmkernel: cpu6:2099233 opID=1e42dfba)LVM: 7387: Device <naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1> locked by 69a6afd8-dc2d873e-85f3-xxxxxxxxxxxx at 1772626529465929 (29 tries left)

2026-03-25T08:11:39.930Z Wa(180) vmkwarning: cpu6:2099233 opID=1e42dfba)WARNING: LVM: 17686: The volume on the device naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1 locked, possibly because some remote host encountered an error during a volume operation and could not recover

2026-03-25T08:11:39.930Z Wa(180) vmkwarning: cpu6:2099233 opID=1e42dfba)WARNING: LVM: 7495: If you are _sure_ this is the case, please break the device lock with `vmkfstools -B /vmfs/devices/disks/naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1` 2026-03-25T08:11:39.930Z In(182) vmkernel: cpu6:2099233 opID=1e42dfba)LVM: 7078: Forcing APD unregistration of devID 62cff73f-fe8734a8-ab26-xxxxxxxxxxxx in state 1.
2026-03-25T08:11:39.930Z In(182) vmkernel: cpu6:2099233 opID=1e42dfba)LVM: 16191: Failed to open device naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1 : Lock was not free

Resolution

To resolve this issue, remove the lock on the affected ESXi host, run the below command:
  1. Connect to the ESXi host with an SSH session and root credentials.

  2. Break the existing LVM lock on the datastore:
[root@esxi1:~] vmkfstools –B /vmfs/devices/disks/naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
Note: You can use the parameter --breaklock instead of -B with the vmkfstools command.
  1. You will prompted similar to:
VMware ESX Question:
LVM lock on device /vmfs/devices/disks/naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:<partition number> 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) No
Please choose a number [0-1]:
  1. Enter 0 to break the lock.

Select a number from 0-1: 0

Successfully broke LVM device lock for /vmfs/devices/disks/naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1

  1. Re-read and reload VMFS datastore metadata to memory with:
[root@esxi1:~] vmkfstools –V
  1. From the vSphere UI, refresh the Storage Datastores View under Configuration tab.

  2. If the above steps, does not release the lock, reboot the ESXi host.