Configuring Device-Mapper Multipath on Linux

Configuring multipath involves the following procedures:

Note: The following documentation is for (RHEL 6.X). The procedures might be similar for other flavors of Linux.

  1. Configure Multipath on ElastiCenter. For details, see section Configuring Multipath on ElastiCenter.
  2. On your Linux machine, log in as root.
  3. Discover and log in to iSCSI targets on Linux client. For details, see Discover and login to iSCSI targets.
  4. Run the following command to display the current partitions on the LUN:
    fdisk –l
    .
  5. The following CLI screen shows partitions on the LUN:

    multipath_linux_1
  6. Configure multipath on Linux client. For details, see Configuring multipath on Linux client.

Discover and login to iSCSI targets

  1. Run the following command to discover the iSCSI LUN using the VSM IP address:
    iscsiadm –m discovery –t st –p VSM_IP_address:3260  
  2. Note: You can use either the primary VSM IP address or secondary VSM IP address.

  3. Run the following command to log in to the iSCSI LUN from the Linux device using the primary VSM IP address:
    iscsiadm –m node –T complete Target Name	–p primary_VSM_IP_address:3260 –l
  4. Run the following command to log in to the iSCSI LUN from the Linux device using the secondary VSM IP address:
     iscsiadm –m node –T complete Target Name	–p primary_VSM_IP_address:3260 –l

Configure multipath on Linux client

  1. Run the following command to install the device-mapper-multipath RPM:
     rpm –ivh rpm package
    .
  2. Run the following command to verify that the rpm packages are successfully installed:
    rpm –qa |grep device-manager
    .
  3. The following screen shows the list of RPM packages installed on Linux machine:

    multipath_linux_2
  4. Run the following command to configure the multipath daemon multipathd (to start on system boot):
    chkconfig multipathd on
  5. Run the following command to set up multipath with the mpathconf utility:
    mpathconf –enable
    . This also creates the multipath configuration file
    /etc/multipath.conf
    with default attributes.
  6. multipath_linux_3

  7. Run the following command to start the multipathd service using the command: service multipathd start.
  8. Note: If you are editing the /etc/multipath.conf file, the multipathd service has to be reloaded using the command:

    service multipathd reload
    .

  9. Run the following command to observe the multipath device and scsi device names for the attached LUNs:
    fdisk –l
    .
  10. The following screen lists the multipath device along with the associated scsi devices.

    Note: There is a single pseudo-device name/multipath label for 2 SCSI devices.

    multipath_linux_4.jpg

  11. Run the following command to list the persistent multipath name mpathn for the scsi devices and to observe the default attributes: multipath –ll.

The following screen shows the default attributes for an ElastiStor LUN:

multipath_linux_5

Note: The default settings for device-mapper-multipath are compiled in to the system. You need not explicitly set the settings in the /etc/multipath.conf file. With the user_friendly_name set to yes, the multipath devices are created as

/dev/mapper/mpathn
.

Note: Multipath (path_selector) policy is by default set to round -robin, where the service loops through every path group, sending the same amount of I/O to each. There are other multipath configuration parameters which can be set as per client requirements (on a per LUN basis, if needed). For details, go to the following URL: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/DM_Multipath/config_file_defaults.html