VMware Cloud Community
lldmka
Enthusiast
Enthusiast
Jump to solution

LUN locks

Was just wondering, when a host makes a metadata update is the entire LUN locked for writing, or just the metadata itself?

Reply
0 Kudos
1 Solution

Accepted Solutions
depping
Leadership
Leadership
Jump to solution

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



Duncan

Blogging: http://www.yellow-bricks.com

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

View solution in original post

Reply
0 Kudos
12 Replies
Leafy911
Expert
Expert
Jump to solution

Hello

I believe its the whole LUN, which is an issue if you have to many hosts trying to access the same LUN.

Regards

Leafy911

(Dont forget you recieve points when you award points)

Regards Leafy911 (Dont forget you recieve points when you award points)
Reply
0 Kudos
Stu_McHugh
Hot Shot
Hot Shot
Jump to solution

I belive that to be the case too. Make sure you don't put too many VM guests on one LUN. It's hard to recommend an ideal number as it depends on what type of guests you have. I am running about 10 vm's per LUN and I'm ok but don't trust this value.

Stuart

Stuart ------------------------------------------------ Please award points to any useful answers..
Reply
0 Kudos
williambishop
Expert
Expert
Jump to solution

I'm running 180vm's per lun....but don't trust this value.

He's right, there is no ideal number, it's based on what you're doing..... and what you're doing it with.

--"Non Temetis Messor."
Reply
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

When the metadata changes the entire LUN locks. This could cause a SCSI Reservation Conflict, which will show up in /var/log/vmkernel on the host. You will see quite a few of those when there are issues with LUN Locks. Note that the normal running of a VM with default VMDK formats, there are no locks when the VM is running as the data is already allocated, opened, and ready for writing. So VM runtime has been optimized.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos
lldmka
Enthusiast
Enthusiast
Jump to solution

I'm troubleshooting an issue where 6 of 12 LUNs in a lab environment became inaccessible, I suspect due to unreleased LUN locks. I used to be able to identify hosts with locks by running something similar to the following, but the directory structure looks to have changed in v3.5...

tail -1 /proc/vmware/scsi/vmhba{0-9}/{0-9}:*

(square brackets replaced with curly brackets, to maintain formatting)

Anyone know how I can identify the offending host/s now?

Reply
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

Check out http://communities.vmware.com/docs/DOC-2290


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos
lldmka
Enthusiast
Enthusiast
Jump to solution

Hi Edward,

That article discusses locks on individual VM files - I need to identify host/s with unreleased SCSI resevations on LUNs. I've been able to do it before with the command I listed earlier, but the directory structure has changed and I now can't find that information.

Regards,

Mark

PS Found the KB article I took the command from...

Message was edited by: lldmka

Reply
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

To get lock info about a volume run:

vmkfstools -D vmhbaC:T:L:P

Where C is the Controller, T the Zone Target, L the LUN, and P the partition. You have to run it for each partition used for VMFS on every host. Most people forget the Partition number. I.e.

vmkfstools -D vmhba2:0:1:0


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos
lldmka
Enthusiast
Enthusiast
Jump to solution

That isn't working for me...

esxcfg-vmhbadevs -m

vmhba2:0:10:1 /dev/sdb1 4563cd4a-494fc0ab-985c-0017a44bc147

vmkfstools -D vmhba2:0:10:1

Could not get the dump information for 'vmhba2:0:10:1' (rv -1)

Error: Inappropriate ioctl for device

I have asked VMware about the tail -1 /proc/vmware/scsi/vmhba{0-9}/{0-9}😘 command, but haven't received a response yet.

Reply
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

I would also investigate the information form esxcfg-info -s

I do not have a LUN locked so could not tell you anything specific about this, but that is definitely an option to get stats on the LUN.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
depping
Leadership
Leadership
Jump to solution

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



Duncan

Blogging: http://www.yellow-bricks.com

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

Reply
0 Kudos
lldmka
Enthusiast
Enthusiast
Jump to solution

Thanks for all responses... esxcfg-info -s | grep -i -B 12 pending does the job!

I still haven't heard back from VMware. Smiley Sad

Reply
0 Kudos