centos6.3 deployment iscsi

  Installation scsi-target-utils
# yum install scsi-target-utils
# /etc/init.d/tgtd start
Creating an id iscsi target of 1
# tgtadm –lld iscsi –op new –mode target –tid 1 -T iqn.2013-12-13.target.sdb
-lld iscsi specify the type of drive -op new New -mode target mode -tid 1 iscsi target to the back of an id number that represents the specified -T iqn.2013-12-13.target.sdb create iscsi identify a shared disk, iqn is a format identifier, 2013-12-13 is to describe the creation time can be any string, target iscsi server is the host name can be any string, sdb is a description of the device name can be shared for any string Back iscsi target to create a logical add
# tgtadm –lld iscsi –op new –mode logicalunit –tid 1 –lun 1 -b /dev/sdb
-mode logicalunit mode assigned to the logical 1 to logical TID iscsi target id is set lun -lun 1 1 No. 1 -b / dev / sdb specify the target physical device disposed iscsi access the logical volume used policy to allow everyone access to
tgtadm –lld iscsi –op bind –mode target –tid 1 -I ALL
View lun information
tgtadm –lld iscsi –op show –mode target
iscsi client installation 
# yum install iscsi-initiator-utils
Iscsi target found
# iscsiadm -m discovery –type sendtargets –portal 192.168.216.20 或者
# iscsiadm -m discovery -t st -p 192.168.216.20
View iscsi found Name
iscsiadm -m node
Login iscsi
iscsiadm -m node -T iqn.2013-12-13.target.sdb -p 192.168.216.20 –login
或者
iscsiadm -m node -T iqn.2013-12-13.target.sdb  -p 192.168.216.20 -l
Iscsi connection port
# iscsiadm -m node -T iqn.2013-12-13.target.sdb  -p 192.168.216.20 -u
Delete iscsi found
# iscsiadm -m node -o delete -T iqn.2013-12-13.target.sdb -p 192.168.216.20
This switched: http: //www.zhengdazhi.com/index.php/centos6-3-%E9%83%A8%E7%BD%B2iscsi/

Reproduced in: https: //my.oschina.net/766/blog/210950

Guess you like

Origin blog.csdn.net/weixin_33851604/article/details/91546526