Validate LUN ID for associated targets
Dropdown menu provides 0-24. You can add a number greater than 24, and the web gui will display it but when you go to edit the number shows 0.
Also, Josh S. mentioned we support up to 65K or so? An ID of 10,000 or generates the following console error:
error in configuration file at line 30 near '"test"': LU number is too big
It will still display the customer value then show 0 on edit.
#2 Updated by Cyber Jock almost 3 years ago
- Target version set to 11.0-U3
There's multiple problems. While I agree the doc team should have some stuff added, I think we need to collectively discuss what the proper behavior should be and what the limits are for us with LUN IDs. So let me explain...
My understanding is that our iscsi LUN ID limit is either 255(or 254, something around there) or something like 65535. My admittedly hasty google search found https://forums.freebsd.org/threads/45857/ which claims an 8-bit number per the iscsi protocol for LUN ID values, which would be 255 LUNs. This doesn't seem to be documented anywhere, and the WebGUI doesn't seem to give much of a clue what the limit is, but the dropdown only goes to 24. So to a casual observer we seem to be limited to 24 LUNs.
1. We should definitely document the maximum number of allowed LUNs in the manual for future reference, after validating if the limit is truly 255. (mav probably knows this off the top of his head)
2. The WebGUI needs to either give us the options for the full 255 or not use a dropdown and have us type the number.
If we enter a value higher than 24, but less than 255 we can save the changes and all is well. If we then choose to edit the associated targets by clicking on an associated target and clicking the 'edit' button the LUN ID will have changed to zero. If we don't realize that the value has actually changed without our intervention, we could accidentally lose access to that LUN when we click 'Okay' to save the changes. Not to mention possibly have 2 different associated targets compete for the same LUN value. I think we can all agree that if you go to edit the associated target settings, the window should show us the current values, not modified values.
I'm guessing that since the WebGUI defaults to listing only the first 24 numbers, something gets angry when you choose something outside its designed range.
If we enter a value higher than 255, the WebGUI will let us do that and will not validate that our input makes sense and the LUN will never be accessible. This generated the error Shawn mentioned above, "error in configuration file at line 30 near '"test"': LUN number is too big" in the footer and /var/log/messages. However not all customers enable the footer, so they would see a silent failure of their iscsi services.
I hope this explains it all. So I think:
1. mav needs to tell us what the limit actually is.
2. doc team update the manual with the maximum allowed LUN ID.
2. dev team needs to fix the WebGUI to validate the inputs and not have the WebGUI change values on us without human input.
I had to put a target version as it is a required field, so I chose 11.0-U3. Please change it as appropriate.
#6 Updated by Alexander Motin almost 3 years ago
- Status changed from 15 to Unscreened
- Assignee changed from Alexander Motin to William Grzybowski
CTL limit on maximal LUN is controlled by tunable/sysctl kern.cam.ctl.lun_map_size. Its default value is 1024, which allows LUNs from 0 to 1023. Limitation of first 256 LUNs (0-255) often happen on initiator side (VMware, Windows, etc.), as a limitation of historical "Single level LUN structure using peripheral device addressing method".
So ideal it would be to report error if entered value is >= kern.cam.ctl.lun_map_size, and possibly warning if it is above 255.
#14 Updated by Rishabh Chauhan almost 3 years ago
- File editkeepslunid.png editkeepslunid.png added
- File lun_guide.png lun_guide.png added
- File lunid2023to2024.png lunid2023to2024.png added
- File lunid10000.png lunid10000.png added
- Needs QA changed from Yes to No
- QA Status Test Passes FreeNAS added
- QA Status deleted (
After reading through the comments and testing it, I was able to conclude that while editing the Id does not change to '0' by default, shown in figure with lunid 56.
Also, since supported lunId is 0-1023, i tried to put 10000 as id, i got a clear error stating the limits, I tested the boundary condition as well, i.e 1023 and 1024 and the error was clear.
Also, the doc states the limit of lunid as well as seen in the screenshot.