码迷,mamicode.com
首页 > 其他好文 > 详细

Redhat7 搭建ISCSI target

时间:2016-03-26 20:28:28      阅读:229      评论:0      收藏:0      [点我收藏+]

标签: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

Redhat7 搭建ISCSI target

标签:target   iscsi target   targetcli   

原文地址:http://yangzhiming.blog.51cto.com/4849999/1755519

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!