User Tools

Site Tools


vmware:vmdklock

This is an old revision of the document!


Who is locking that file?

Sometimes you run into a situation where you think or know a file is being used, but you have no idea who is using it. It could be that you attached it to another VM, or it could be that something like VPXa is locking it because someone left a datastore browser window open, regardless, you need to know who so you can unlock it, how to do that?

Well, the good news is that this is relatively easy to do, at least under block storage.

  1. Which ESX is locking that file?

Remember that a VMDK has 2 parts: descriptor and data, the descriptor is rarely locked, you need to focus on the data portion, which has a file name ending in -delta.vmdk or -flat.vmdk

vmkfstools -D <filename>

This will result in an output similar to this:

Lock [type 10c00001 offset 67784704 v 190, hb offset 4038656 
gen 19, mode 1, owner 4aa5c319-7272c09a-3976-00221925665d mtime 9451] 
Addr <4, 141, 178>, gen 179, links 1, type reg, flags 0x0, uid 0, gid 0, mode 100600 
len 4294967296, nb 4096 tbz 3897, cow 0, zla 3, bs 1048576 vmkernel: 0:11:33:16.169
vmware/vmdklock.1424877758.txt.gz · Last modified: 2015/02/25 15:22 by naccad