Step 1: First you need to install iSCSI and multipath utilities to your host

   # yum install iscsi-initiator-utils device-mapper-multipath -y

 

Step 2: Create or edit your multipath configuration file.

Edit /etc/multipath.conf with the minimum configuration provided in the following commands

Be aware that for RHEL7/CentOS7, multipath.conf can be blank as the OS has built-in configurations.

defaults {

user_friendly_names no
max_fds max
flush_on_last_del yes
queue_without_daemon no
dev_loss_tmo infinity
fast_io_fail_tmo 5
}
# All data under blacklist must be specific to your system.
blacklist {
wwid "SAdaptec*"
devnode "^hd[a-z]"
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^cciss.*"
}
devices {
device {
vendor "NETAPP"
product "LUN"
path_grouping_policy group_by_prio
features "3 queue_if_no_path pg_init_retries 50"
prio "alua"
path_checker tur
failback immediate
path_selector "round-robin 0"
hardware_handler "1 alua"
rr_weight uniform
rr_min_io 128
}
}

Step 3: Load the multipath module, start multipath services and set it start on boot.

  1. # modprobe dm-multipath

  2. # service multipathd start

  3. # chkconfig multipathd on

Step 4: Verify multipath is working.

  1. # multipath -l (if it returns blank at this time it is working. RHEL 7/CentOS 7 may return No fc_host device for 'host-1', which can be ignored. )

 

Step 5: Now Create a unique iSCSI IQN name for the client initiator. Otherwise you will not able to connect/login into IQN

    # vim /etc/iscsi/initiatorname.iscsi

    InitiatorName=iqn.2014-10.com.example.server1:server2

    :wq (save and exit)

 

Step 6: Edit the CHAP settings in /etc/iscsi/iscsid.conf using the username and password from the SoftLayer Portal (minus the quotation marks). Use upper case for CHAP names.

    node.session.auth.authmethod = CHAP
    node.session.auth.username = "Username-value-from-SL-Portal"
    node.session.auth.password = "Password-value-from-SL-Portal"
    discovery.sendtargets.auth.authmethod = CHAP
    discovery.sendtargets.auth.username = "Username-value-from-SL-Portal"
    discovery.sendtargets.auth.password = "Password-value-from-SL-Portal" 
Note:Leave the other CHAP settings commented. SoftLayer storage uses only one-way authentication.

 

Step 7: Set iSCSI to start at boot and start it at this time.

  1. # chkconfig iscsi on

  2. # chkconfig iscsid on

  3. # service iscsi start

  4. # service iscsid start

 

Step 8: Discover the device using the Target IP address obtained from the SoftLayer Portal.

  1. Run the discovery against the iSCSI array:

     # iscsiadm -m discovery -t sendtargets -p "ip-value-from-SL-Portal"

  2. Set the host to automatically log into the iSCSI array:

      # iscsiadm -m node -L automatic

Step 9: Verify that the host has logged into the iSCSI array and maintained its sessions.

  1. # iscsiadm -m session

  2. # multipath -l (should report the paths at this time)

Step 10: Verify the device is connected.  By default the device will attach to /dev/mapper/mpathX where X is the generated ID of the connected device.

  1. # fdisk -l | grep /dev/mapper

    Should report something similar to the following,
          Disk /dev/mapper/3600a0980383030523424457a4a695266: 73.0 GB, 73023881216 byte
    The volume is now mounted and accessible on the host.