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-MP 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:

[Note]Note

The following instructions assume the software RAID device is /dev/mapper/mpath0, which is its device name as recognized by the kernel. Make sure to 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 Jun 15 09:36 scsi-mpath1 -> ../../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. Enter

    mkinitrd -f mpath
    
  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

SUSE® Linux Enterprise Server Storage Administration Guide 10