The VMware Configuration Maximums document is something I reference quite often. One configuration maximum that became relevant for me this week was under ESXi Host Maximums – Storage Maximums – Fibre Channel: LUN ID. According to the document the maximum LUN ID is 255, but what does that mean? Does it mean that you can have a maximum of 255 LUN IDs or the maximum LUN ID number allowed is 255?
For those who know the answer, let me explain where my confusion came from:
- Two items above LUN ID in the Configuration Maximums document is ‘LUNs per host’. The maximum for ‘LUNs per host’ is 256. Like most numbering in Linux (e.g. arrays) LUN IDs start at 0. This means LUN IDs 0 to 255 are valid and would total 256, the maximum number of ‘LUNs per host’.
- Looking at the storage side, a very important piece of information would be the maximum number of LUNs per storage system. For an EMC VNX7500, the maximum number of LUNs (including private LUNs) is 8192. Since every LUN has to have a unique LUN ID this means on a VNX7500 at a minimum the LUN IDs 0 to 8191 must be valid.
So why was I looking at this maximum in the first place?
Backstory
I was creating some scripts for the VNX7500s I had been working on. One of these scripts was to create storage groups and then add hosts as well as LUNs to them. Using the CLI, I was required to specify somethings that were not even an option via the GUI:
- ‘alu’ – LUN ID as set on and seen by the array
- ‘hlu’ – LUN ID as seen by the target (e.g. ESXi host)
When I discovered this I had a couple questions:
- What happens on the GUI as ‘alu’ and ‘hlu’ cannot be specified?
- Why does the ‘hlu’ exist / Why not just use the ‘alu’?
I started by answering my first question. To do this, I created a storage group via the GUI and called it ‘Test Storage Group 1’. I then added two 1TB LUNs with the following LUN IDs: 33 and then 35. Next, I checked the CLI to see what the HLU was set to.
Based on this test it would appear that the HLU when set by the GUI starts at zero for the first connected LUN and then gets incremented by one for each additional LUN. While I did not understand why the HLU started at zero, I could think of no reason why the ALU and HLU could not be the same. In addition, I needed a way to come up with a HLU number given only the ALU number for my script. As such, I configured my script to use the ALU number for the HLU number.
Once I was done creating my scripts I brought up my second question to the storage administrators on the team and they said many systems have a limitation on the highest LUN number accepted. This led me to look at the Configuration Maximums document.
Testing
In order to test the configuration maximum I removed both LUNs from the test storage group and added them back via the command line such that the configuration was as follows:
No matter what the Configuration Maximums document actual meant about the LUN ID maximum, this configuration should prove which was valid. I then added an ESXi host to the storage group and from the vSphere client navigated from the host to: Configuration – Storage Adapters. After selecting Rescan all I saw the following:
Question answered: LUNs with IDs above 255 cannot be seen.
© 2011, Steve Flanders. All rights reserved.
Hi,
MANY THANKS for this useful info. as I was about to create a LUN with id: 1000 and just double checked the config Max documentation and was a bit confused until I cam across your posting.
MANY THANKS and best wishes for 2012.
Dave ( http://WWW.CAI.ORG )
I am glad you found this information helpful 🙂
Thanks for this info
Glad you found it helpful!
You actually can set the ALU and HLU from the GUI, and have always been able to.
Hey Brendon — Thanks for the comment! I know the option is there today, but back in 2011 I could not find it and my EMC rep stated the CLI had to be used. Perhaps it was hiding somewhere and he did not know where it was.
Quite some time has passed since this post, but I’m really glad that you shared it as I was puzzling over this for a while this morning (I had 2 luns presented with IDs of 1000 and 1001)! You have saved me having to do the same investigation that you performed 4 years ago! Thanks!
Thanks and I am glad it helped you!
Very important Info