7.13 Configuring Multipath I/O for an Existing Software RAID

Ideally, you should configure multipathing for devices before you use them as components of a software RAID device. If you add multipathing after creating any software RAID devices, the DM-MPIO service might be starting after the multipath service on reboot, which makes multipathing appear not to be available for RAIDs. You can use the procedure in this section to get multipathing running for a previously existing software RAID.

For example, you might need to configure multipathing for devices in a software RAID under the following circumstances:

  • If you create a new software RAID as part of the Partitioning settings during a new install or upgrade.

  • If you did not configure the devices for multipathing before using them in the software RAID as a member device or spare.

  • If you grow your system by adding new HBA adapters to the server or expanding the storage subsystem in your SAN.

NOTE:The following instructions assume the software RAID device is /dev/mapper/mpath0>, which is its device name as recognized by the kernel. It assumes you have enabled user-friendly-names in the /etc/multipath.conf file as described in Configuring User-Friendly Names or Alias Names.

Ensure that you modify the instructions for the device name of your software RAID.

  1. Open a terminal console, then log in as the root user or equivalent.

    Except where otherwise directed, use this console to enter the commands in the following steps.

  2. If any software RAID devices are currently mounted or running, enter the following commands for each device to dismount the device and stop it.

    umount /dev/mapper/mpath0
    mdadm --misc --stop /dev/mapper/mpath0
  3. Stop the boot.md service by entering

    /etc/init.d/boot.md stop
  4. Start the boot.multipath and multipathd services by entering the following commands:

    /etc/init.d/boot.multipath start
    /etc/init.s/multipathd start
  5. After the multipathing services are started, verify that the software RAID’s component devices are listed in the /dev/disk/by-id directory. Do one of the following:

    • Devices Are Listed: The device names should now have symbolic links to their Device Mapper Multipath device names, such as /dev/dm-1.

    • Devices Are Not Listed: Force the multipath service to recognize them by flushing and rediscovering the devices.

      To do this, enter the following commands:

      multipath -F
      multipath -v0

      The devices should now be listed in /dev/disk/by-id, and have symbolic links to their Device Mapper Multipath device names. For example:

      lrwxrwxrwx 1 root root 10 2011-01-06 11:42 dm-uuid-mpath-36006016088d014007e0d0d2213ecdf11 -> ../../dm-1
  6. Restart the boot.md service and the RAID device by entering

    /etc/init.d/boot.md start
  7. Check the status of the software RAID by entering

    mdadm --detail /dev/mapper/mpath0

    The RAID’s component devices should match their Device Mapper Multipath device names that are listed as the symbolic links of devices in the /dev/disk/by-id directory.

  8. Make a new initrd to ensure that the Device Mapper Multipath services are loaded before the RAID services on reboot. Running mkinitrd is needed only if the root (/) device or any parts of it (such as /var, /etc, /log) are on the SAN and multipath is needed to boot.


    mkinitrd -f multipath
  9. Reboot the server to apply these post-install configuration settings.

  10. Verify that the software RAID array comes up properly on top of the multipathed devices by checking the RAID status. Enter

    mdadm --detail /dev/mapper/mpath0

    For example:

    • Number Major Minor RaidDevice State
    • 0 253 0 0 active sync /dev/dm-0
    • 1 253 1 1 active sync /dev/dm-1
    • 2 253 2 2 active sync /dev/dm-2