You are not logged in.

#1 2021-03-14 12:49:58

qupfer
Member
Registered: 2014-04-02
Posts: 14

Open-iSCSI - Autologin seems not working

Hi,
I want to  add and mount an iscsi device autmatiocly after boot up. (but not the rootfs on the iscsi)

Manual login works well, but not the automatic one. And I can't see why.

node.startup and node.conn[0].startup is set to automatic, and iscsid.service is enabled and active.


node config

user@neustadt ~ % sudo iscsiadm -m node --targetname=iqn.2004-04.com.qnap:ts-253b:iscsi.neustadt.2d899e -p 10.10.12.39         
# BEGIN RECORD 2.1.4
node.name = iqn.2004-04.com.qnap:ts-253b:iscsi.neustadt.2d899e
node.tpgt = 1
node.startup = automatic
node.leading_login = No
iface.iscsi_ifacename = default
iface.net_ifacename = <empty>
iface.ipaddress = <empty>
iface.prefix_len = 0
iface.hwaddress = <empty>
iface.transport_name = tcp
iface.initiatorname = <empty>
iface.state = <empty>
iface.vlan_id = 0
iface.vlan_priority = 0
iface.vlan_state = <empty>
iface.iface_num = 0
iface.mtu = 0
iface.port = 0
iface.bootproto = <empty>
iface.subnet_mask = <empty>
iface.gateway = <empty>
iface.dhcp_alt_client_id_state = <empty>
iface.dhcp_alt_client_id = <empty>
iface.dhcp_dns = <empty>
iface.dhcp_learn_iqn = <empty>
iface.dhcp_req_vendor_id_state = <empty>
iface.dhcp_vendor_id_state = <empty>
iface.dhcp_vendor_id = <empty>
iface.dhcp_slp_da = <empty>
iface.fragmentation = <empty>
iface.gratuitous_arp = <empty>
iface.incoming_forwarding = <empty>
iface.tos_state = <empty>
iface.tos = 0
iface.ttl = 0
iface.delayed_ack = <empty>
iface.tcp_nagle = <empty>
iface.tcp_wsf_state = <empty>
iface.tcp_wsf = 0
iface.tcp_timer_scale = 0
iface.tcp_timestamp = <empty>
iface.redirect = <empty>
iface.def_task_mgmt_timeout = 0
iface.header_digest = <empty>
iface.data_digest = <empty>
iface.immediate_data = <empty>
iface.initial_r2t = <empty>
iface.data_seq_inorder = <empty>
iface.data_pdu_inorder = <empty>
iface.erl = 0
iface.max_receive_data_len = 0
iface.first_burst_len = 0
iface.max_outstanding_r2t = 0
iface.max_burst_len = 0
iface.chap_auth = <empty>
iface.bidi_chap = <empty>
iface.strict_login_compliance = <empty>
iface.discovery_auth = <empty>
iface.discovery_logout = <empty>
node.discovery_address = 10.10.12.39
node.discovery_port = 3260
node.discovery_type = send_targets
node.session.initial_cmdsn = 0
node.session.initial_login_retry_max = 8
node.session.xmit_thread_priority = -20
node.session.cmds_max = 128
node.session.queue_depth = 32
node.session.nr_sessions = 1
node.session.auth.authmethod = None
node.session.auth.username = admin
node.session.auth.password = ********
node.session.auth.username_in = <empty>
node.session.auth.password_in = <empty>
node.session.auth.chap_algs = MD5
node.session.timeo.replacement_timeout = 120
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.err_timeo.host_reset_timeout = 60
node.session.iscsi.FastAbort = Yes
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = Yes
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.session.iscsi.DefaultTime2Retain = 0
node.session.iscsi.DefaultTime2Wait = 2
node.session.iscsi.MaxConnections = 1
node.session.iscsi.MaxOutstandingR2T = 1
node.session.iscsi.ERL = 0
node.session.scan = auto
node.session.reopen_max = 0
node.conn[0].address = 10.10.12.39
node.conn[0].port = 3260
node.conn[0].startup = automatic
node.conn[0].tcp.window_size = 524288
node.conn[0].tcp.type_of_service = 0
node.conn[0].timeo.logout_timeout = 15
node.conn[0].timeo.login_timeout = 15
node.conn[0].timeo.auth_timeout = 45
node.conn[0].timeo.noop_out_interval = 5
node.conn[0].timeo.noop_out_timeout = 5
node.conn[0].iscsi.MaxXmitDataSegmentLength = 0
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
node.conn[0].iscsi.HeaderDigest = None
node.conn[0].iscsi.DataDigest = None
node.conn[0].iscsi.IFMarker = No
node.conn[0].iscsi.OFMarker = No
# END RECORD

Could not find anythin bad in journal

user@neustadt ~ % sudo journalctl -b -g iscsi
-- Journal begins at Tue 2021-03-02 07:39:28 CET, ends at Sun 2021-03-14 13:44:27 CET. --
Mär 14 13:44:10 neustadt.07q.de systemd[1]: Listening on Open-iSCSI iscsid Socket.
Mär 14 13:44:10 neustadt.07q.de systemd[1]: Listening on Open-iSCSI iscsiuio Socket.
Mär 14 13:44:10 neustadt.07q.de systemd[1]: Condition check resulted in One time configuration for iscsi.service being skipped.
Mär 14 13:44:13 neustadt.07q.de systemd[1]: Starting iSCSI UserSpace I/O driver...
Mär 14 13:44:13 neustadt.07q.de systemd[1]: Started iSCSI UserSpace I/O driver.
Mär 14 13:44:13 neustadt.07q.de audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=iscsiuio comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mär 14 13:44:13 neustadt.07q.de kernel: Loading iSCSI transport class v2.0-870.
Mär 14 13:44:20 neustadt.07q.de systemd[1]: Starting Open-iSCSI...
Mär 14 13:44:20 neustadt.07q.de systemd[1]: Started Open-iSCSI.
Mär 14 13:44:20 neustadt.07q.de audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=iscsid comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mär 14 13:44:20 neustadt.07q.de kernel: audit: type=1130 audit(1615725860.450:30): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=iscsid comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mär 14 13:44:27 neustadt.07q.de dbus-daemon[323]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.9' (uid=0 pid=478 comm="sudo journalctl -b -g iscsi ")
Mär 14 13:44:27 neustadt.07q.de sudo[478]:  henning : TTY=pts/0 ; PWD=/home/henning ; USER=root ; COMMAND=/usr/bin/journalctl -b -g iscsi

And service status looks also good

user@neustadt ~ % sudo systemctl status iscsid.service                                                                         
● iscsid.service - Open-iSCSI
     Loaded: loaded (/usr/lib/systemd/system/iscsid.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2021-03-14 13:44:20 CET; 1min 8s ago
TriggeredBy: ● iscsid.socket
       Docs: man:iscsid(8)
             man:iscsiuio(8)
             man:iscsiadm(8)
   Main PID: 385 (iscsid)
     Status: "Ready to process requests"
      Tasks: 1 (limit: 4612)
     Memory: 2.8M
     CGroup: /system.slice/iscsid.service
             └─385 /sbin/iscsid -f
Mär 14 13:44:20 neustadt.07q.de systemd[1]: Starting Open-iSCSI...
Mär 14 13:44:20 neustadt.07q.de systemd[1]: Started Open-iSCSI.

Could also not see any hint, starting the deamon manualy.

user@neustadt ~ % sudo iscsid -d 8 -c /etc/iscsi/iscsid.conf -i /etc/iscsi/initiatorname.iscsi -f
iscsid: sysfs_init: sysfs_path='/sys'
iscsid: in ctldev_open
iscsid: created NETLINK_ISCSI socket...
iscsid: InitiatorName=iqn.2016-04.com.open-iscsi:23347c384a86
iscsid: InitiatorName=iqn.2016-04.com.open-iscsi:23347c384a86
iscsid: InitiatorAlias=neustadt.07q.de
iscsid: iscsid.safe_logout=Yes
iscsid: Max file limits 1024 524288
iscsid: found 10.10.12.39,3260
iscsid: Looking for config file /etc/iscsi/send_targets/10.10.12.39,3260
iscsid: Looking for config file /etc/iscsi/send_targets/10.10.12.39,3260 config st_config.
iscsid: updated 'discovery.startup', 'manual' => 'manual'
iscsid: updated 'discovery.type', 'sendtargets' => 'sendtargets'
iscsid: updated 'discovery.sendtargets.address', '' => '10.10.12.39'
iscsid: updated 'discovery.sendtargets.port', '0' => '3260'
iscsid: updated 'discovery.sendtargets.auth.authmethod', 'None' => 'None'
iscsid: updated 'node.session.auth.chap_algs', 'MD5' => 'MD5'
iscsid: updated 'discovery.sendtargets.timeo.login_timeout', '15' => '15'
iscsid: updated 'discovery.sendtargets.use_discoveryd', 'No' => 'No'
iscsid: updated 'discovery.sendtargets.discoveryd_poll_inval', '30' => '30'
iscsid: updated 'discovery.sendtargets.reopen_max', '5' => '5'
iscsid: updated 'discovery.sendtargets.timeo.auth_timeout', '45' => '45'
iscsid: updated 'discovery.sendtargets.timeo.active_timeout', '30' => '30'
iscsid: updated 'discovery.sendtargets.iscsi.MaxRecvDataSegmentLength', '32768' => '32768'
iscsid: st_start 10.10.12.39:3260 0
iscsid: current time 187
iscsid: nothing on pend_list, deactivating alarm

I always need to run something like
sudo iscsiadm -m node --targetname=iqn.2004-04.com.qnap:ts-253b:iscsi.neustadt.2d899e -p 10.10.12.39 -l
or
sudo iscsiadm -m node --targetname=iqn.2004-04.com.qnap:ts-253b:iscsi.neustadt.2d899e -p 10.10.12.39 --loginall=automatic` , so its look the correct files are read and the problem is anythere else.

Can anybody give me a hint or an explanation? Thanks a lot!

Last edited by qupfer (2021-03-14 12:52:00)

Offline

#2 2021-03-14 14:32:53

edacval
Member
From: .LT
Registered: 2008-10-23
Posts: 96

Re: Open-iSCSI - Autologin seems not working

For autologin you need iscsi.service to be enabled too - note missing 'd' smile

Offline

#3 2021-03-14 16:40:59

qupfer
Member
Registered: 2014-04-02
Posts: 14

Re: Open-iSCSI - Autologin seems not working

Thanks, it works now!

Offline

Board footer

Powered by FluxBB