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

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

Flashcards in Configure a System as Either an iSCSI Target or Initiator That Persistently Mounts an iSCSI Target - Target Setup Deck (2):
1

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

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

2

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

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