标签:target iscsi target targetcli
Redhat7 搭建ISCSI target
划分新分区(步骤略)
# fdisk /dev/sdc
# partprobe (更新分区表)
先创建卷组
# pvcreate /dev/sdc1
# vgcreate vgming /dev/sdc1
# lvcreate -L 2G -n /dev/vgming/lvming
# lvscan
ISCSI target
# yum install targetcli
# targetcli
> backstores/block create /dev/vgming/lvming
> cd iscsi
/iscsi> create iqn.2016-03.com.ming:aa
> ls
> cd iqn.2016-03.com.ming:aa/tpg1
/iscsi/iqn.2016-03.com.ming:aa/tpg1> ls
/iscsi/iqn.2016-03.com.ming:aa/tpg1> cd acls
/iscsi/iqn.2016-03.com.ming:aa/tpg1/acls> create iqn.2016-03.com.ming:aa
/iscsi/iqn.2016-03.com.ming:aa/tpg1/acls> cd ../luns/
/iscsi/iqn.2016-03.com.ming:aa/tpg1/luns> create /backstores/block/disk1
/iscsi/iqn.2016-03.com.ming:aa/tpg1/luns> cd ../portals
/iscsi/iqn.2016-03.com.ming:aa/tpg1/portals> create 10.0.0.2 (本机ip)
/iscsi/iqn.2016-03.com.ming:aa/tpg1/portals> exit
# systemctl start target
# systemctl enable target
# firewall-cmd --permanent --add-port=3260/tcp
# firewall-cmd -reload
本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1755519
标签:target iscsi target targetcli
原文地址:http://yangzhiming.blog.51cto.com/4849999/1755519