Documentation for multipathd

Documentatuon for MultipathD

The multipathd supports the devicemapper with the configuration of the harddrives which are mounted with more than one path.

Important Files

The configuration file for the multipathd is the following: – /etc/multipath.conf This file holds the configuratipn… — Blacklisting — Exceptions — Assignment — and so on…

This files would be generated by the multipathd:

  • /etc/multipath/bindings

Controls the assignment

  • /etc/multipath/wwids

Includes the wwids

Tools

The tool to build and change the configurationsfiles is mpathconf. With it you can modify the /etc/multipath.conf. You also could modify the /etc/multipath.conf manually. Example:

defaults {
         udev_dir               /dev
         no_path_retry          1
         polling_interval       10
         path_checker           tur
         path_grouping_policy   group_by_prio
         user_friendly_names    yes
         selector               "round-robin 0"
         max_fds                "4128"
}

blacklist {
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^hd[a-z]"
        devnode "^dcssblk[0-9]*"
        wwid "*"
}

blacklist_exceptions {
        wwid "3600d0230000000000e13955cc3757802"
        wwid "3600d0230000000000e13955cc3757801"
        wwid "3600d0230000000000e13955cc3757800"
        wwid "3600d0230000000000e13955cc3757803"
        wwid "3600d0230000000000e13955cc3757804"
}
multipaths {
        multipath {
                uid 54321
                gid 0
                wwid "3600d0230000000000e13955cc3757800"
                mode 0660
                alias AliasA
        }
        multipath {
                uid 54321
                gid 0
                wwid "3600d0230000000000e13955cc3757801"
                mode 0660
                alias AliasB
        }
        multipath {
                uid 54321
                gid 0
                wwid "3600d0230000000000e13955cc3757802"
                mode 0660
                alias AliasC
        }
        multipath {
                uid 54321
                gid 0
                wwid "3600d0230000000000e13955cc3757803"
                mode 0660
                alias AliasD
        }
        multipath {
                uid 54321
                gid 0
                wwid "3600d0230000000000e13955cc3757804"
                mode 0660
                alias AliasE
        }
}

I think this file is selfexplained 🙂

Determine WWIDs

To get the WWIDs you can use the command scsi_id -g -u /dev/sdb. You will get the WWID for the device sdb. With this little for-loop for device in /dev/sd*; do echo "Device: ${device} $(scsi_id -g -u ${device})"; done you will get all WWIDs for the devices. The output should look like that:

> Device: /dev/sdb 3600d0230000000000e13955cc3757800
> Device: /dev/sdc 3600d0230000000000e13955cc3757801
> Device: /dev/sdd 3600d0230000000000e13955cc3757802
> Device: /dev/sde 3600d0230000000000e13955cc3757803
> Device: /dev/sdf 3600d0230000000000e13955cc3757804
> Device: /dev/sdg 3600d0230000000000e13955cc3757800
> Device: /dev/sdh 3600d0230000000000e13955cc3757801
> Device: /dev/sdi 3600d0230000000000e13955cc3757802
> Device: /dev/sdj 3600d0230000000000e13955cc3757803
> Device: /dev/sdk 3600d0230000000000e13955cc3757804
> Device: /dev/sdl 3600d0230000000000e13955cc3757800
> Device: /dev/sdm 3600d0230000000000e13955cc3757801
> Device: /dev/sdn 3600d0230000000000e13955cc3757802
> Device: /dev/sdo 3600d0230000000000e13955cc3757803
> Device: /dev/sdp 3600d0230000000000e13955cc3757804
> Device: /dev/sdq 3600d0230000000000e13955cc3757800
> Device: /dev/sdr 3600d0230000000000e13955cc3757801
> Device: /dev/sds 3600d0230000000000e13955cc3757802
> Device: /dev/sdt 3600d0230000000000e13955cc3757803
> Device: /dev/sdu 3600d0230000000000e13955cc3757804

You have to put this WWIDs into the multipath.conf. You also can use other criterias to set the exceptions, the vendor for example.

Autoconfig with multipathd

When everything in the configurationsfile is done correctly , the multipathd needs to be restartet service multipathd restart and the devicemapper should do his magic.

You should check if the multipathd is in the autostart. chkconfig multipathd --list when not chkconfig multipathd on.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax