targetcli
ls
backstores/block create iscsi
#server#
yum -y install targetcli
chkconfig target on
service target start
firewall-cmd --permanent --add-port=3260/tcp
service target status
firewall-cmd --reload
firewall-cmd --list-all
fdisk /dev/vdb
n,p,,,+3G,w
targetcli
>ls
>backstores/block create iscsi_data /dev/sdb1
>ls
iscsi/ create iqn.2015-05.com.example.network3:system1
ls
iscsi/iqn.2015-05.com.example.network3:system1/tpg1/acls create iqn.2015-05.com.example.network3:system2
iscsi/iqn.2015-05.com.example.network3:system1/tpg1/luns create /backstores/block/iscsi_data
ls
iscsi/qin.2015-05.com.example.network3:system1/tpg1/portals create 192.168.220.29
exit
service target restart
#desktop#
yum -y install targetcli
vim /etc/iscsi/initiationame.iscsi
initiatorName=iqn.2015-05.com.example.network3.system2
(可man iscsiadm)
iscsiadm -m discovery -t st -p 172.25.3.11
iscsiadm -m node -T iqn.20145-05.com.example.network3:system2 -p 172.25.3.11 -l
fdisk -l
fdisk /dev/sda1
n,p,1,,+1900M,w
partprobe
mkfs.xfs /dev/sda1
mkdir /mnt/data
vim /etc/fstab
/dev/sda1 /mnt/data xfs _netdev 0 0
mount -a
init 6 init 6
mount
/dev/vdb1
ls
iscsi/ create iqn.2014-10.com.example:server9
ls
iscsi/iqn.2014-10.com.example:server9/tpg1/luns create /backstores/block/server9.disk1
iscsi/iqn.2014-10.com.example:server9/tpg1/portals create 192.168.220.11
ls