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 nomax_fds maxflush_on_last_del yesqueue_without_daemon nodev_loss_tmo infinityfast_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_priofeatures "3 queue_if_no_path pg_init_retries 50"prio "alua"path_checker turfailback immediatepath_selector "round-robin 0"hardware_handler "1 alua"rr_weight uniformrr_min_io 128}}
Step 3: Load the multipath module, start multipath services and set it start on boot.
# modprobe dm-multipath
# service multipathd start
# chkconfig multipathd on
Step 4: Verify multipath is working.
# multipath -l
(if it returns blank at this time it is working. RHEL 7/CentOS 7 may returnNo 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.
# chkconfig iscsi on
# chkconfig iscsid on
# service iscsi start
# service iscsid start
Step 8: Discover the device using the Target IP address obtained from the SoftLayer Portal.
Run the discovery against the iSCSI array:
# iscsiadm -m discovery -t sendtargets -p "ip-value-from-SL-Portal"
Set the host to automatically log into the iSCSI array:
# iscsiadm -m node -L automatic
# iscsiadm -m session
# 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.
Should report something similar to the following,# fdisk -l | grep /dev/mapper
Disk /dev/mapper/3600a0980383030523424457a4a695266: 73.0 GB, 73023881216 byte
The volume is now mounted and accessible on the host.