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?
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.
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.