Monday, March 02, 2009

Linux iSCSI Strangeness

To connect to an iSCSI LUN using the Linux iscsiadm command, we issue two commands. It turns out the syntax of the second command is completely unforgiving. The two commands that do not work:
# iscsiadm -m discovery -t sendtargets -p localhost,1 iqn.2009-02.lan.terran:lnxadm3.cumulus
# iscsiadm -m node --login -T -p localhost:3260
iscsiadm: no records found!
Notice it failed. The problem is that the part of the second command that says localhost:3260 absolutely must say what was reported by the discovery. In other words, it must say When this is run across a network, we see the same behavior. The correct syntax:
# iscsiadm -m discovery -t sendtargets -p lnxadm3.terran.lan,1 iqn.2009-02.lan.terran:lnxadm3.cumulus
# iscsiadm -m node --login -T iqn.2009-02.lan.terran:lnxadm3.cumulus -p
Logging in to [iface: default, target: iqn.2009-02.lan.terran:lnxadm3.cumulus, portal:,3260]
Login to [iface: default, target: iqn.2009-02.lan.terran:lnxadm3.cumulus, portal:,3260]: successful

No comments:

Post a Comment