Skip to end of metadata
Go to start of metadata
For connecting NAS to CentOS via Iscsi you need to setup file-based LUN
  • Install Epel repository

yum install epel-release

  • Install Iscsi-initiator utils

yum install iscsi-initiator-utils

  • If you using CHAP authentification - edit /etc/iscsi/iscsid.conf

Uncomment next strings and add login/password

node.session.auth.authmethod = CHAP
node.session.auth.username = admin
node.session.auth.password = 123456
  • Add service in auto-boot and start it

systemctl enable iscsid

systemctl start iscsid

  • Search Iscsi-targets

iscsiadm -m discovery -t sendtargets -p (where - Iscsi-target IP address)

  • Connect to Iscsi-target

iscsiadm -m node --login

  • Check new disk in system


  • Marked-up a new disk

parted /dev/{} mktable gpt (where {} - your disk)
parted /dev/{} mkpart --primary ext4 1M -1
mkfs.ext4 -F -L TrassirArchive /dev/{}

  • Check UUID of new disk


  • Create a new folder in /media

mkdir /media/Foldername

  • Mount new disk in /media/Foldername

mount /dev/{} /media/Foldername

  • Add a new disk in /etc/fstab (as a new string)

UUID=XXXXX /media/Foldername ext4 _netdev,x-systemd.after=iscsi.service 0 0 (where XXXXX - UUID)

  • Disable archive writing in /media/Foldername

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

  • No labels