2

I have two Debian Wheezy machines and am trying to set up storage for one of them on the other's disk using iSCSI (they do not have synchronized users, so NFS won't work for this application). I have installed ietd on the server and open-iscsi on the client.

My configuration on the server is as follows:

ietd.conf

Target iqn.2015-02.uk.co.meridiandigital:email
    Lun 0 Path=/storage/email/email_export.img,Type=fileio,IOMode=rw
    IncomingUser myuser mypass
    Alias LUN1

initiators.allow

ALL ALL

targets.allow

ALL ALL

On the client the configuration is:

iscsid.conf

iscsid.startup = /usr/sbin/iscsid
node.startup = automatic
node.leading_login = No
node.session.auth.authmethod = CHAP
node.session.auth.username = myuser
node.session.auth.password = mypass
discovery.sendtargets.auth.authmethod = CHAP   
discovery.sendtargets.auth.username = myuser
discovery.sendtargets.auth.password = mypass
node.session.timeo.replacement_timeout = 120
node.conn[0].timeo.login_timeout = 15
node.conn[0].timeo.logout_timeout = 15
node.conn[0].timeo.noop_out_interval = 5
node.conn[0].timeo.noop_out_timeout = 5
node.session.err_timeo.abort_timeout = 15
node.session.err_timeo.lu_reset_timeout = 30
node.session.err_timeo.tgt_reset_timeout = 30
node.session.cmds_max = 128
node.session.queue_depth = 32
node.session.xmit_thread_priority = -20
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = Yes
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
node.conn[0].iscsi.MaxXmitDataSegmentLength = 0
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
node.session.iscsi.FastAbort = Yes

initiatorname.iscsi

GenerateName=no
InitiatorName=iqn.2015-02.net.meridiandigital:client

When I run discovery with iscsiadm -m discovery -t st -p athena I get the following error message:

iscsiadm: Cannot perform discovery. Invalid Initiatorname.
iscsiadm: Could not perform SendTargets discovery: invalid parameter

What do I need to do to get discovery and login working for this system?

1 Answer 1

1

The key to answering this question was to enable logging of errors in ietd, which isn't enabled by default for some reason. I stopped the service with /etc/init.d/ietd stop, and manually ran ietd -d 2 to get logging turned on. This gave me (along with a whole load of extra junk) the following error message:

Feb 17 17:15:50 athena ietd: unable to create logical unit 0 in target 1: 22

Error number 22 is EINVAL, so I have an invalid parameter somewhere. It turns out that the IOMode parameter cannot have the value "rw": the valid values are "ro", "wb" and "wt".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .