Connect CentOS server to the internet (in case of no internet, you will have download the rpms and upload them on CentOS manually)
# yum install epel-release
# yum install iscsi-initiator-utils
node.session.auth.authmethod = CHAP node.session.auth.username = admin node.session.auth.password = 123456
# systemctl enable iscsid # systemctl start iscsid
# iscsiadm -m discovery -t sendtargets -p 192.168.0.1
(where 192.168.0.1 - ISCSi-target IP address)
# iscsiadm -m node --login
Check new disk in system
# lsblk
Mark-up a new disk:
# parted /dev/{} mktable gpt (where {} - your disk) # parted /dev/{} mkpart --primary ext4 1M -1 # mkfs.ext4 -F -L TrassirArchive /dev/{}
# blkid
# mkdir /media/[Foldername] && sudo chmod 777 /media/[Foldername]
For example, [Foldername] can be TrassirArchive4
# mount /dev/{} /media/[Foldername]
UUID=XXXXX /media/Foldername ext4 _netdev,x-systemd.after=iscsi.service 0 0 (where XXXXX - UUID)
# chattr +i -VR /media/[Foldername]
iSCSI login failed due to authorization failure
If the login error will appear, you can try to change the language encoding from English to West Europe/Latin