Thursday, February 8, 2018

Setting up iSCSI initiator to connect to iSCSI target in Linux.

  1. Install open-iscsi
    • # sudo apt-get install open-iscsi
    • # sudo apt-get install open-iscsi-utils
  2. Configure the iscsid.conf file with your login credentials.
    • vi /etc/iscsi/iscsid.conf
    • edit the line 'node.session.auth.username='
    • edit the line 'node.session.auth.password='
    • enable CHAP authentication
    • uncomment the line 'node.session.auth.authmethod = CHAP'
  1. Restart open-iscsi service
    • /etc/init.d/open-iscsi restart
  2. Discover your iSCSI targets
    • # iscsiadm -m discovery -t sendtargets -p <ip address of the iscsi target>:3260
  3. List your iSCSI nodes
    • # iscsiadmin -m node
  4. Restart open-iscsi service
    • /etc/init.d/open-iscsi restart
  5. Find the disk
    • # dmesg | tail
  6. Mount the disk
    • # mount /dev/sdb1 /mnt/iscsi