- 패키지 설치 및 (부팅시)기동
# yum install targetcli
# systemctl start target
# systemctl enable target
- ISCSI LUN 생성
# targetcli
/> cd /backstores/block/
/backstores/block> create lun1 /dev/sdb
/backstores/block> cd /iscsi
/iscsi> create iqn.2018-05.com.rplinux:target1
/iscsi/iqn.20.../tpg1/portals> cd ../luns
/iscsi/iqn.20...17a/tpg1/luns> create /backstores/block/lun0
- 보안설정 아래와 같이 안하면 보안때문에 연결이 안됨.
# disable authentication
/iscsi/iqn.20...:target1/tpg1> set attribute authentication=0
Parameter authentication is now '0'.
# enable read/write mode
/iscsi/iqn.20...:target1/tpg1> set attribute demo_mode_write_protect=0
Parameter demo_mode_write_protect is now '0'.
# Enable generate_node_acls mode. This can be thought of as
# "ignore ACLs mode" -- both authentication and LUN mapping
# will then use the TPG settings.
/iscsi/iqn.20...:target1/tpg1> set attribute generate_node_acls=1
Parameter generate_node_acls is now '1'.