iscsiadm: buffer size 32768 too small for data length 32768

344 views
Skip to first unread message

Bart Van Assche

unread,
Mar 31, 2008, 3:32:48 AM3/31/08
to Open iSCSI
Hello,

Has anyone here experience with letting the open-iscsi initiator
connect to an iSCSI target system on which many (hundreds) of target
have been configured ? From a certain number of targets on the
open-iscsi initiator starts complaining that the buffer size is too
small. Can I increase the 32768 byte buffer limit without recompiling
open-iscsi ?

Thanks,

Bart.

Mike Christie

unread,
Mar 31, 2008, 3:14:12 PM3/31/08
to open-...@googlegroups.com

Do you see this error during discovery? What is the error exactly?


In http://www.open-iscsi.org/bits/open-iscsi-2.0-865.15.tar.gz you can set:

# To specify the maximum number of data bytes the initiator can receive
# in an iSCSI PDU from a target during a discovery session, edit the
# following line.
#
# The value is the number of bytes in the range of 512 to (2^24-1) and
# the default is 32768
#
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768

Some targets have a limit of 64K and there is a bug where we do not
handle multiple pdus correctly.

In http://www.open-iscsi.org/bits/open-iscsi-2.0-869-rc2.tar.gz you can
set the same value and the pdu handling should be fixed.

Bart Van Assche

unread,
Apr 1, 2008, 3:03:00 AM4/1/08
to open-...@googlegroups.com
On Mon, Mar 31, 2008 at 9:14 PM, Mike Christie <mich...@cs.wisc.edu> wrote:
> Bart Van Assche wrote:
> > Has anyone here experience with letting the open-iscsi initiator
> > connect to an iSCSI target system on which many (hundreds) of target
> > have been configured ? From a certain number of targets on the
> > open-iscsi initiator starts complaining that the buffer size is too
> > small. Can I increase the 32768 byte buffer limit without recompiling
> > open-iscsi ?
>
> Do you see this error during discovery? What is the error exactly?

This error did indeed happen during discovery (against an OpenSolaris
iSCSI target):

# dpkg -l open-iscsi
...
ii open-iscsi 2.0.865-1 High performance, transport independent iSCS
# iscsiadm -m discovery -t sendtargets -p 10.100.101.51
iscsiadm: buffer size 32768 too small for data length 32768


> In http://www.open-iscsi.org/bits/open-iscsi-2.0-865.15.tar.gz you can set:
>
> # To specify the maximum number of data bytes the initiator can receive
> # in an iSCSI PDU from a target during a discovery session, edit the
> # following line.
> #
> # The value is the number of bytes in the range of 512 to (2^24-1) and
> # the default is 32768
> #
> discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
>
> Some targets have a limit of 64K and there is a bug where we do not
> handle multiple pdus correctly.
>
> In http://www.open-iscsi.org/bits/open-iscsi-2.0-869-rc2.tar.gz you can
> set the same value and the pdu handling should be fixed.

This works a lot better:

# /open-iscsi-2.0-869-rc2/sbin/iscsiadm -m discovery -t sendtargets -p
10.100.101.51 | wc
889 1778 84341

Thanks for providing a solution so quickly. Has it already been
decided when open-iscsi version 2.0-869 will be released ?

Bart.

Mike Christie

unread,
Apr 1, 2008, 12:50:52 PM4/1/08
to open-...@googlegroups.com
Bart Van Assche wrote:
> On Mon, Mar 31, 2008 at 9:14 PM, Mike Christie <mich...@cs.wisc.edu> wrote:
>> Bart Van Assche wrote:
>> > Has anyone here experience with letting the open-iscsi initiator
>> > connect to an iSCSI target system on which many (hundreds) of target
>> > have been configured ? From a certain number of targets on the
>> > open-iscsi initiator starts complaining that the buffer size is too
>> > small. Can I increase the 32768 byte buffer limit without recompiling
>> > open-iscsi ?
>>
>> Do you see this error during discovery? What is the error exactly?
>
> This error did indeed happen during discovery (against an OpenSolaris
> iSCSI target):
>
> # dpkg -l open-iscsi
> ...
> ii open-iscsi 2.0.865-1 High performance, transport independent iSCS
> # iscsiadm -m discovery -t sendtargets -p 10.100.101.51
> iscsiadm: buffer size 32768 too small for data length 32768
>

Yeah, that is the silly bug that was fixed in
http://www.open-iscsi.org/bits/open-iscsi-2.0-869-rc2.tar.gz. We were
doing a >= instead of a >.

>
>> In http://www.open-iscsi.org/bits/open-iscsi-2.0-865.15.tar.gz you can set:
>>
>> # To specify the maximum number of data bytes the initiator can receive
>> # in an iSCSI PDU from a target during a discovery session, edit the
>> # following line.
>> #
>> # The value is the number of bytes in the range of 512 to (2^24-1) and
>> # the default is 32768
>> #
>> discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
>>
>> Some targets have a limit of 64K and there is a bug where we do not
>> handle multiple pdus correctly.
>>
>> In http://www.open-iscsi.org/bits/open-iscsi-2.0-869-rc2.tar.gz you can
>> set the same value and the pdu handling should be fixed.
>
> This works a lot better:
>
> # /open-iscsi-2.0-869-rc2/sbin/iscsiadm -m discovery -t sendtargets -p
> 10.100.101.51 | wc
> 889 1778 84341
>
> Thanks for providing a solution so quickly. Has it already been
> decided when open-iscsi version 2.0-869 will be released ?
>

I am going to try and get it out the same time 2.6.25 is released.
Thanks for testing.

Reply all
Reply to author
Forward
0 new messages