I ran into an issue this past Sunday at a client's site. A newly built XenServer pool had been running just fine until the system had to be rebooted because of a physical move. When the XenServers came back online, they could not connect to their iSCSI targets. I tried disabling CHAP on the SAN, removing XenServers from the pool, you name it we tried it. Finally, I was able to get 1 server functional and moved all the VMs over to that server.
But, I still had a server that was not working and I did not know why. No matter what, I could not connect via iSCSI to the SAN. We had a CIFS share on the SAN and that server could connect just fine. After some digging, I finally found the issue. XenServer was set to use CHAP on discovery and for some reason, my SAN did not like that and would refuse the connection giving me the error "Initiator error (02/01)". I checked this setting on the XenServer that was functional and sure enough, that XenServer was not set to use CHAP on discovery. So all I have to do now is disable CHAP during discovery, easy enough:
SSH or use the console to log into the problematic XenServer
Go to the local command shell of the problematic XenServer
Navigate to the following director: /etc/iscsi/send_targets/[SAN IP, Port]
Open the st_config file located underneath your target directory
Add the following line: discovery.sendtargets.auth.authmethod = None
Remove the following line: discovery.sendtargets.auth.username = [username]
Remove the following line: discovery.sendtargets.auth.password = [password]
Save the file
Verify the problem has been resolved
To make this change permanent, modify the following file with step # 5: /etc/iscsi/iscsid.conf
Comments