REDHAT7 Building iSCSI Target
Dividing new partitions (steps)
# FDISK/DEV/SDC
# partprobe (update partition table)
Create a volume group first
# 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 (native 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
This article is from the "Linux" blog, so be sure to keep this source http://yangzhiming.blog.51cto.com/4849999/1755519
REDHAT7 Building iSCSI Target