iscsi target
-
Install iscsi utils:
yum install scsi-target-utils
chkconfig tgtd on
service tgtd start
# tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2012-10.com.linuxweblog.srv01:lv1_iscsi0
# tgtadm --lld iscsi --op delete --mode target --tid 1
# tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/vg1/lv1_iscsi0
# tgtadm --lld iscsi --op delete --mode logicalunit --tid 1 --lun 1
# tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
# tgtadm --lld iscsi --op show --mode target
# tgt-admin --dump >/etc/tgt/targets.conf
iscsi initiator
-
install the initiator client:
# yum install iscsi-initiator-utils
# chkconfig iscsid on
# chkconfig iscsi on
# service iscsid start
# iscsiadm --mode discovery --type sendtargets --portal 192.168.1.11
# service iscsi restart
# iscsiadm --mode node --targetname iqn.2012-10.com.linuxweblog.srv01:lv1_iscsi0 --portal 192.168.1.11 --login
# iscsiadm --mode node --targetname iqn.2012-10.com.linuxweblog.srv01:lv1_iscsi0 --portal 192.168.1.11 --logout
# iscsiadm --mode node --targetname iqn.2012-10.com.linuxweblog.srv01:lv1_iscsi0 --portal 192.168.1.11 -o delete
# iscsiadm -m session
# iscsiadm -m node
References:
-
http://www.cyberciti.biz/tips/howto-setup-linux-iscsi-target-sanwith-tgt.html
http://www.cyberciti.biz/tips/rhel-centos-fedora-linux-iscsi-howto.html
http://knowledgelayer.softlayer.com/questions/265/Can+I+connect+multiple+servers+to+a+single+iSCSI+LUN%3F
http://prefetch.net/blog/index.php/2009/04/12/configuring-the-open-iscsi-initiator-on-centos-linux-hosts/