Configure a System as Either an iSCSI Target or Initiator That Persistently Mounts an iSCSI Target - Target Setup Flashcards

1
Q

Configure a System as Either an iSCSI Target or Initiator That Persistently Mounts an iSCSI Target - Target Setup

A

yum install targetcli
systemctl enable target
fdisk -l

targetcli
/> backstores/block/ create testblock1 /dev/xvdf

/> iscsi/ create iqn.2018-07.com.mylabserver:t1

/> cd iscsi/iqn.2018-07

/> luns/ create /backstores/block/testblock1
/> ls

/> acls/ create iqn.2018.07.com.mylabserver:client
cd acl/iqn

/> set auth userid=lunuser
/> set auth password=password
exit

firewall-cmd –permanent –add-port=3260/tcp
firewall-cmd –reload

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Lecture: Configure a System as Either an iSCSI Target or Initiator That Persistently Mounts an iSCSI Target - Initiator Setup

A

On Client:

yum install -y iscsi-initiator-utils

cd /etc/iscsi
vim initiatorname.iscsi
InitiatorName=iqn.2018-07.com.mylabserver:client

vim iscsiid.conf
/authmet
Uncomment
node.session.auth.username= CHAP

node. session.auth.username=username
node. session.auth.password=password

systemctl start iscsi
systemctl enable iscsi

iscsiadm –mode discovery –type sendtargets –portal {ip.address}

iscsiadm –mode node –targetname iqn.2018-07.com.mylabserver:t1 –portal {ip.address} –login

lsblk –scsi | egrep “NAME|sda”
mkfs.ext4 /dev/sda

vim /etc/fstab
UUID= /mnt/iscsi ext4 _netdev 0 0

mkdir /mnt/scsi

mount -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly