You do not need to do this. The command below will do it for you.
>
>
> [root@fish ~]# service iscsi restart
> iscsiadm: No matching sessions found
> Stopping iSCSI daemon:
> iscsid is stopped [ OK ]
> Starting iSCSI daemon: [ OK ]
> [ OK ]
> Setting up iSCSI targets: Logging in to [iface: default, target:
> iqn.2000-01.com.synology:rackstation.name, portal: 192.168.214.199,3260]
> iscsiadm: Could not login to [iface: default, target:
> iqn.2000-01.com.synology:rackstation.name, portal: 192.168.214.199,3260].
> iscsiadm: initiator reported error (24 - iSCSI login failed due to
> authorization failure)
Is there some more info in /var/log/messages? Something from "iscsid"
indicating a login error value?
For that target is the chap info what you wrote above? Do
iscsiadm -m node -T iqn.2000-01.com.synology:rackstation.name -p
192.168.214.199
to see.
> iscsiadm: Could not log into all portals
> [ OK ]
>
> dmesg output:
> Loading iSCSI transport class v2.0-871.
> cxgb3i: tag itt 0x1fff, 13 bits, age 0xf, 4 bits.
> iscsi: registered transport (cxgb3i)
> Broadcom NetXtreme II CNIC Driver cnic v2.0.1 (Oct 01, 2009)
> Broadcom NetXtreme II iSCSI Driver bnx2i v2.0.1e (June 22, 2009)
> iscsi: registered transport (bnx2i)
> iscsi: registered transport (tcp)
> iscsi: registered transport (iser)
> scsi20 : iSCSI Initiator over TCP/IP
> BUG: warning at drivers/scsi/libiscsi2.c:465/iscsi_complete_task()
> (Tainted: G )
When you did the restart, were there sessions already running? Were you
also running IO to those sessions? This trace is bad because it
indicates a double free. I am not sure if it is related to the login
error above though. Could you do:
echo 1 > /sys/module/libiscsi2/paramters/debug_libiscsi
echo 1 > /sys/module/libiscsi_tcp/paramters/debug_libiscsi_tcp
echo 1 > /sys/module/iscsi_tcp/paramters/debug_iscsi_tcp
Then rerun your test?
> When you did the restart, were there sessions already running? Were you
> also running IO to those sessions? This trace is bad because it
> indicates a double free. I am not sure if it is related to the login
> error above though. Could you do:
>
> echo 1 > /sys/module/libiscsi2/paramters/debug_libiscsi
> echo 1 > /sys/module/libiscsi_tcp/paramters/debug_libiscsi_tcp
> echo 1 > /sys/module/iscsi_tcp/paramters/debug_iscsi_tcp
>
> Then rerun your test?
>
I ended up fixing this by removing all the scanned targets and readding them.
Apparently if you change the config to chap from default config after you've
added targets then you have to delete them, re-add them, then restart the iscsi
service.
By config you must meant the iscsid.conf settings. iscsid.conf settings
are the ones used for the initial discovery session and used to create
the per portal iscsi node db. If you have already discovered
targets/portals then to update specific portals settings you need to run
iscsiadm -m node -T target -p ip -o update -n name-of-setting -v value
Or you can set them in iscsid.conf then rerun the discovery command.
That will overwrite the current node db with settings based on
iscsid.conf values.
But even if you did not do this, you should not hit that OOPS/BUG you
were hitting in the kernel.
Data digests are not supported in centos/rhel 5. You should get a
different error though. You should not get that stack trace below. If
you guys are getting a stack trace like below I will try to do some more
debugging. I did not see that below when I tested here.