TargetCLI CentOS 7

Install targetcli

yum install targetcli -y 
systemctl enable target 
systemctl start target

Configure targetlci

Use the "cd' command (no args) inside target cli to browse through the paths

The iqn names below are the ones from the nodes you will later connect the iSCSI

targetcli

cd /backstores/block/
create disk0 /dev/sdb

cd /iscsi 
/iscsi> create

cd /iscsi/.../tpg1/acls
create iqn.1991-05.com.microsoft:node01.example.local
create iqn.1991-05.com.microsoft:node02.example.local

cd /iscsi/iqn..../tpg1/luns
create /backstores/block/disk0

exit

Configure firewall

systemctl start firewalld

firewall-cmd --list-all

firewall-cmd --permanent --zone=internal --add-interface=eth0
firewall-cmd --permanent --zone=public --add-interface=eth1

firewall-cmd --permanent --zone=internal --add-source=10.0.0.0/24
firewall-cmd --permanent --zone=internal --add-port=3260/tcp

firewall-cmd --permanent --zone=public --add-source=1.1.1.1/32
firewall-cmd --permanent --zone=public --add-port=22/tcp

firewall-cmd --reload

systemctl enable firewalld

Revision #2
Created 25 July 2019 20:49:55 by Dave
Updated 25 July 2019 20:56:09 by Dave