VMware Cloud Community
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

How to check if a LUN is being locked by a host

Hi Guys,

An easy points-winner thread:

In ESX 3.0x you could watch the proc/vmware/scsi/vmhba1/<lunnumber> that either reads "Reserved: Y" or "Reserved: N" to see if a LUN is locked.

I can't however find this in ESX3.5, any ideas were to check this?

Thanks!

Kenneth

Reply
0 Kudos
1 Solution

Accepted Solutions
Rubeck
Virtuoso
Virtuoso
Jump to solution

Could this be used?

esxcfg-info -s | grep -i -B 12 pending ?

/Rubeck

View solution in original post

Reply
0 Kudos
10 Replies
Rubeck
Virtuoso
Virtuoso
Jump to solution

Hmmm.. Very good question, indeed.

vmkfstools -D dumps the UUID of the host which has locked a specific vmdk into the vmkernel log.

I wonder if this works for an entire LUN also..?

Just an idea..

/Rubeck

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

Nobody who knows this?

I can't imagen that they removed this from 3.5

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

What the hell.... apparently my reply's are being registered while I get a message "unable to find thread" when pressing the "post" button.

Reply
0 Kudos
Rubeck
Virtuoso
Virtuoso
Jump to solution

Could this be used?

esxcfg-info -s | grep -i -B 12 pending ?

/Rubeck

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

Yep that's it.. Thanks!

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

BTW, IMHO a reservation on the LUN should occur whenever the metadata changes. (powering on a VM, taking a snaphot, creating a VM, or even uploading a file to the datastore)

I placed a watch on esxcfg-info -s | grep -i pending so I could monitor if a LUN ever gets reserved but all the counters stay zeroed.

Am I doing something wrong here?

Reply
0 Kudos
oreeh
Immortal
Immortal
Jump to solution

Check if the LUN uses the new VMFS version (3.31).

The locking mechanisms have changed with this version.

Reply
0 Kudos
VirtualKenneth
Virtuoso
Virtuoso
Jump to solution

Yep it's using 3.31 (3.5 hosts)

Hmmmm apparently I missed that information, have you got more information about the new locking mechanism?

Reply
0 Kudos
oreeh
Immortal
Immortal
Jump to solution

See this post from Todd Roberts.

depping
Leadership
Leadership
Jump to solution

cool info, thanks guys!

Duncan

My virtualisation blog:

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos