Chris Keim document this at 1bitatatime.blogspot.com.au.
I had this problem with a new Qnap 870 NAS I could connect using a NFS share, but not using iSCSI.
I wanted to use iSCSI as detailed in this post - as a particular disk with a lot of small files would generate errors and hang the Xenserver.
To diagnose
1) connect from another iSCSI initiator (e.g. Windows). Note you can connect, discover targets and connect to a LUN.
2) attempt from Xenserver - both XenCenter and the command line.
3) attempt to connect using iscsadm
[root@xennet2 ~]# iscsiadm --mode discovery --type sendtargets --portal 192.168.40.2
iscsiadm: Login failed to authenticate with target
iscsiadm: discovery login to 192.168.40.2 rejected: initiator error (02/01), n on-retryable, giving up
iscsiadm: Could not perform SendTargets discovery.
The clue is the error - "failed to authenticate with target". The Qnap NAS doesn't like the authentication passed during the discovery.
To fix - as documented in Chris' blog, edit the st_config file - in /etc/iscsi/send_targets/192.168.40.2,3260
remove the lines
discovery.sendtargets.auth.username = <user>
discovery.sendtargets.auth.username = <password>
and add:
discovery.sendtargets.authmethod = none
To be persistent (after reboots) make sure /etc/iscsid.conf also has auth.method set to none for discovery.sendtargets (or is commented out).
I am using XenServer 6.2 and after reboot the st_config files are regenerated with the CHAP credentials and it appears that the "discovery.sendtargets.authmethod = none" in /etc/iscsid.conf is being ignored and CHAP is being using for discovery anyway.
ReplyDeleteWhat version of XenServer are you using?