iscsi tools: manage qla4xxx iscsi sessions with iscsiadm
This patch is based on initial work done by Mike Christie here,
http://groups.google.com/group/open-iscsi/browse_thread/thread/
193fe9037f3127da#
This patch modifies iscsiadm so it can control sessions that are
accessed
through qla4xxx.
To do discovery using the qla4xxx iscsi class interface first check the
available qla4xxx iface
./iscsiadm -m iface -P 0
will display the different ifaces like this:
qla4xxx.00:0e:1e:04:87:fa qla4xxx,00:0e:1e:04:87:fa,192.168.1.112,\
<empty>,<empty>
qla4xxx.00:0e:1e:04:87:fe
qla4xxx,00:0e:1e:04:87:fe,<empty>,<empty>,<empty>
Issue discovery command
./iscsiadm -m discovery -t sendtargets -I qla4xxx.00:0e:1e:04:87:fa \
-p 192.168.1.10:3260
192.168.1.10:3260,1 iqn.2001-05.com.target:0-
7d76ca2b7d54b541-disk2
192.168.1.10:3260,1 iqn.2001-05.com.target:0-
46f6ca2b7d84b541-disk3
192.168.1.10:3260,1 iqn.2001-05.com.target:0-
4c76ca2b7db4b541-disk4
192.168.1.10:3260,1 iqn.2001-05.com.target:0-
7346ca2b6d04b6bb-disk1
To view discovered nodes do
./iscsiadm -m node
To login
./iscsiadm -m node -T iqn.2001-05.com.target:0-
7346ca2b6d04b6bb-disk1 \
-I qla4xxx.00:0e:1e:04:87:fa -p 192.168.1.10:3260 -l
An error or ok message is displayed to indicate login failure or
success.
To see the sessions use
./iscsiadm -m session
And then to logout do
./iscsiadm -m node -T iqn.2001-05.com.target:0-
7346ca2b6d04b6bb-disk1 \
-I qla4xxx.00:0e:1e:04:87:fa -p 192.168.1.10:3260 -u
An error or a ok message is displayed to indicate logout failure or
success.
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>