CTL iSCSI -- more than 8 LUNs won't show for target

Hi all,

I have a very basic iSCSI server set up basically right out of the hand book: https://www.freebsd.org/doc/handbook/network-iscsi.html

I am running ZFS and using ZVOLs as the underlying block storage.

In my ctl.conf, lun 0 through lun 7 all work perfectly. When I add a lun 8 and do a service ctld reload I see my additional LUN when doing a ctladm lunlist. However, on the initiator, I only see luns 0-7, no lun 8. The initiator is Windows Server 2016. There are no errors from ctld that I can find.

Just for testing I created a second target, and set up the same ZVOL as lun 0 under that target. That worked perfectly.

Any ideas why I can't have a working lun 8 on my first target?
 
In the traditional (parallel cable) SCSI protocol, the LUN (logical unit number) is encoded in a 3-bit field. For example, if you look at the traditional READ(6) command, the first byte is the OpCode, the second byte has the LUN as the uppermost three bits. It's theoretically possible that the Windows Server implementation is so broken, it still uses the traditional 3-bit limitation for modern versions of the SCSI protocol (Fiber Channel, iSCSI, ...). In practice, I don't believe that, since things like Fiber Channel and iSCSI have been around since the early or late 90s, and Microsoft had ample time to fix this. Today, the LUN is not delivered in the SCSI command (the CDB) itself, but in the transport-specific header before the SCSI command, so that 3-bit limitation is long gone. A quick web search says that Windows Server should be able to handle 255 LUNs per target.
 
Back
Top