ctld: only 579 iSCSI targets can be created

Eugene M. Zheganin emz at norma.perm.ru
Fri Sep 22 05:36:50 UTC 2017


Hi,

I have old 11-STABLE as an iSCSI server, but out of the blue I 
encountered weird problem: only 579 targets can be created. I mean, I am 
fully aware that the out-of-the-box limit is 128 targets, with is 
enforced by the CTL_MAX_PORTS define, and I've set it to 1024 (and of 
course rebuilt and installed a new kernel), but when I add more that 579 
targets I start to get the protocol errors:

Sep 22 10:16:48 san1 ctld[8657]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x4
Sep 22 10:16:48 san1 ctld[8658]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x46
Sep 22 10:17:31 san1 ctld[8746]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x4
Sep 22 10:17:31 san1 ctld[8747]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x46
Sep 22 10:19:58 san1 ctld[9190]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x4
Sep 22 10:19:58 san1 ctld[9191]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x46
Sep 22 10:21:33 san1 ctld[9518]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x4
Sep 22 10:21:33 san1 ctld[9519]: 10.0.3.127 
(iqn.1991-05.com.microsoft:worker296): protocol error: received invalid 
opcode 0x46

So, the question is - is it possible to have more than 579 targets and 
if yes - how can this be achieved ?
Right now I'm experimenting with extending luns, not targets. One may 
think that I am merey greedy, but the thing is, I really have hundreds 
of initiatorsm and it's just logical to have as many targets as I do.

Thanks.
Eugene.


More information about the freebsd-stable mailing list