How to connect to remote storage on CentOS server
- Tips and Tricks
- 1,573 views
- Aelswith E.

PLEASE NOTE: This option is currently only available for a certain group of users. Please stay tuned if youâ$™re also interested in remote storage.
All commands should be run from the root user.
To start, you will need to install the necessary package that works with iSCSI:
yum install iscsi-initiator-utils

Now edit configuration files with your parameters in order to connect to the remote storage:
iscsid.conf

initiatorname.iscsi

systemctl restart iscsid.service

iscsiadm -m discovery -t st -p XXXXX.web-hosting.com -I default -P1

iscsiadm -m discovery -P 1

iscsiadm -m node -l
iscsiadm -m session -P 3

4. Create partition and filesystem on scsi disk
If you connect to remote iSCSI storage for the first time, you need to create partition and filesystem on this disk:
parted /dev/sdX mklabel msdos

Finally, you should mount the drive and add the mount parameters to /etc/fstab for automounting in case of server reboots. In other words, you should create a folder for the disk and transfer it to this folder:
backup folder name
