[SOLVED] iSCSI read errors during iPXE boot
|
2019-02-13, 23:19
(This post was last modified: 2019-02-17 21:10 by tlum.)
Post: #1
|
|||
|
|||
[SOLVED] iSCSI read errors during iPXE boot
EDIT: Substantially updated 2019-02-16 to include additional troubleshooting information.
I've had iPXE and iSCSI environments in place for years now, but for the first time I'm attempting to do an iSCSI boot and the iPXE is having a problem with the conversation with the iSCSI target. The storage server Code: CentOS Linux release 7.6.1810 (Core) The backing block instance Code: Disk /dev/zpool1/jane: 8422 MB, 8422687232 bytes, 16450561 sectors The backing fileio instance Code: Disk /zpool1/nas1/Media/c0d0.img: 8422 MB, 8422686720 bytes, 16450560 sectors Simplified iSCSI Target configuration. This is an example of block using ZFS zvol, and I've also tried fileio which behaves no differently. Code: { The PXE/iPXE/TFTP/HTTP server Code: CentOS release 6.10 (Final) The iPXE implementation will first hand off to scripts matching host name, uuid, or mac in that order. This is the individual iPXE boot script for this mac mac-0007e90feaf5.ipxe Code: set username jane The initiator Code: Compaq ML370 (Generation 0) The PXE -> iPXE chain load Code: PXE 2.1 Build 084 (WfM 2.0), RPL V1.25 I've used a network trace to follow the iPXE sanboot iSCSI boot process. From a high level it is:
First, the Read Capacity(10) return an unexpected value of 63 for LBA, instead of 16450560. It then attempts a Read(10) at LBA 64 which predictably fails with Logical Block Address Out Of Range. Testing indicates this is caused by specific interaction between iPXE and LIO, but the exact cause is unknown. Read Capacity(10) - Request Code: Frame 27: 114 bytes on wire (912 bits), 114 bytes captured (912 bits) Read Capacity(10) - Response Code: Frame 29: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) Read(10) - Request Code: Frame 32: 114 bytes on wire (912 bits), 114 bytes captured (912 bits) Read(10) - Response Code: Frame 33: 214 bytes on wire (1712 bits), 214 bytes captured (1712 bits) The iPXE response to the console Code: Could not open SAN device: Input/output error (http://ipxe.org/1d704039 The message logged on the iSCSI target Code: Feb 13 09:17:41 san1srvp01 kernel: cmd exceeds last lba 64 (lba 64, sectors 4) Testing and Troubleshooting
-TIA |
|||
2019-02-17, 21:10
(This post was last modified: 2019-02-17 21:11 by tlum.)
Post: #2
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
The volume is LUN 2 on the storage server and iPXE needs to address LUN 2 explicitly. The storage server dosen't even have a LUN 0 so it not clear why the Test Unit Ready succeeded. Somewhat embarrassing that it was something so stupid simple.
|
|||
2019-02-17, 21:21
Post: #3
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
Great that you solved it!
It would maybe have helped if you have started with the iPXE error message - i really had to search to find the relevant bits in your post, but finally found this: Could not open SAN device: Input/output error (http://ipxe.org/1d704039) and the first suggestion on that page: Quote:Make sure you connect to the correct LUN on the iscsi target. See sanuri for the correct URI syntax for specifying the LUN. Use GitHub Discussions VRAM bin |
|||
2019-02-17, 21:48
(This post was last modified: 2019-02-17 21:56 by tlum.)
Post: #4
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
I did read that, and more, and it didn't help, since I believed it was correct, since the target was responding with a "Test Unit Ready" Success, and other indications that I was hitting the correct LUN, and in addition to expecting it to cry if it's wrong because that initiators acls only has that that one LUN.
What adds to the confusion is that the Target has a dozen LUNs, but the Initiators all do a discovery and then automatically create sequential block devices, like: client1 LUN3 = /dev/sda, LUN7 = /dev/sdb client2 LUN5 = /dev/sda, LUN8 = /dev/sdb So, it's easy to fall into the trap of thinking of the first device as being relative to the first LUN assigned to the initiators iqn. But that's not the case, iPXE wants the actual Target LUN #, and not a 0 based index relative to the initiators iqn acl. So in order to, "Make sure you connect to the correct LUN on the iscsi target", you first have to be exceptionally clear on exactly what the means. |
|||
2019-02-17, 21:52
Post: #5
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
Ok, so the issue here could maybe have been avoided, or simplified if iPXE had used LUN index, instead of actual LUN # ?
Is that how the targets are defined in other tools as well, and this could/should be considered a bug in iPXE? Use GitHub Discussions VRAM bin |
|||
2019-02-17, 23:08
Post: #6
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
I think iPXE works as designed, so it's not a bug. The "L" in LUN is part of the confusion, since it's a "Logical" unit that can be remapped along the way.
As a new feature, what I might do is enumerate the LUNs the target is exposing, check what the user is passing against it, and throw up and error and the list if they're asking for something that's not available. If I were to take that a step further I might implement an iPXE command that would dump a list in the console, so if you needed to you could interrogate the target and see what it looks like from iPXE's perspective. |
|||
2019-02-18, 18:15
Post: #7
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
In all fairness to iPXE, the largest amount of grief was caused by the LIO Target. For days I was hammering away at a non-existent LUN, but the Target reported that it was 63 Logical Blocks in size, with a sector size of 512, the TEST UNIT READY was succeeding, and when you tried to read from it the complaint was about a non-existent LBA... all of this while it was really a non-existent LUN. It was that deception that kept me distracted. Had it behaved more like a missing LUN, with a Service Unavailable fault, this issue would have been over before it even started. So, I'm not sure the degree to which iPXE ought to take on the weight of dealing LIOs confusion.
|
|||
2019-02-18, 20:02
Post: #8
|
|||
|
|||
RE: [SOLVED] iSCSI read errors during iPXE boot
The error message page is updated, I think it is the 3rd or 4th time this pops up even tho the error page tries to enforce checking LUN.
Use GitHub Discussions VRAM bin |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)