iSCSI Initiator Configuration in CentOS/Rhel 7.x
Prerequisites : https://www.natsav.com/blog/2016/12/27/iscsi-target-configuration-in-centosrhel-7-x/
Install the following packages for iSCSI Initiator :
#yum -y install iscsi-initiator-utils
configure the /etc/iscsi/initiatorname.iscsi,and change the default initiater name by configured acl rule in iSCSI Target :
InitiatorName=iqn.2015-26.com.example:iSCSI_client
Now start the iscsi service as follows :
#systemctl start iscsi
enable the iSCSI service at boot :
#systemctl enable iscsi
Now discover the server as follows :
#iscsiadm -m discovery -t st -p 192.168.1.2
Now login as follows :
#iscsiadm -m node -t iqn.2015-26.com.example:iSCSI_TARGET -p 192.168.1.2 -l
Now check the disk as follows :
#cat /proc/partitions
Now create a xfs Filesystem as follows :
#mkfs.xfs /dev/sdc
Mount the disk in the iSCSI directory :
#mkdir -p /iscsi #mount /dev/sdc /iscsi
If mounting the disk permanent add the following content in the fstab :
/dev/sdc /iscsi xfs defaults,_netdev 0 0
Permanent mount the disk :
#mount -av