VirtualKenneth
Virtuoso
Virtuoso

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

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
Rubeck
Virtuoso
Virtuoso

Could this be used?

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

/Rubeck

View solution in original post

0 Kudos
10 Replies
Rubeck
Virtuoso
Virtuoso

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

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

Nobody who knows this?

I can't imagen that they removed this from 3.5

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

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

0 Kudos
Rubeck
Virtuoso
Virtuoso

Could this be used?

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

/Rubeck

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

Yep that's it.. Thanks!

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

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?

0 Kudos
oreeh
Immortal
Immortal

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

The locking mechanisms have changed with this version.

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

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?

0 Kudos
oreeh
Immortal
Immortal

See this post from Todd Roberts.

depping
Leadership
Leadership

cool info, thanks guys!

Duncan

My virtualisation blog:

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

0 Kudos