Connect to DTS in Linux for CentOS/RHEL 7

Overview

To interact with an iSCSI LUN in Linux-based operating systems, users must connect to the LUN by entering a series of commands in the terminal based on the operating system being used to perform the interactions.  The tool used to interact with an iSCSI LUN in a Linux-based OS is dependent upon the type and version of the OS installed on the device.

 

These instructions are for CentOS 7 and RHEL 7

 

  • Install iscsi-initiator and multipath mapper for Linux

    yum -y install iscsi-initiator-utils device-mapper device-mapper-multipath
     
  • Create the iscsid.conf configuration file
     
  • Backup the original configuration:

     cp /etc/iscsi/iscsid.conf{,.save}
     
  • Open /etc/iscsi/iscsid.conf with your favorite text editor and replace the contents with the following:

    node.startup = automatic
    node.session.auth.username = ISCSI_USER
    node.session.auth.password = ISCSI_PASS
    discovery.sendtargets.auth.username = ISCSI_USER
    discovery.sendtargets.auth.password = ISCSI_PASS

    node.session.timeo.replacement_timeout = 120
    node.conn[0].timeo.login_timeout = 15
    node.conn[0].timeo.logout_timeout = 15
    node.conn[0].timeo.noop_out_interval = 10
    node.conn[0].timeo.noop_out_timeout = 15
    node.session.iscsi.InitialR2T = No
    node.session.iscsi.ImmediateData = Yes
    node.session.iscsi.FirstBurstLength = 262144
    node.session.iscsi.MaxBurstLength = 16776192
    node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536

     
  • Start iscsid:

    /etc/init.d/iscsi start

     
  • Run a discovery against the iscsi target host:

    iscsiadm -m discovery -t sendtargets -p [IP Address in StorageLayer]
     
  • Connect to the iscsi target host:

    iscsiadm -m node -T [output from above starting with iqn.] -p [IP Address in storagelayer] -l
     
  • Restart the iscsi service (Since node.startup was set to automatic in iscsid.conf it will automatically login to the target host).

    /etc/init.d/iscsi restart