Multipath device mapper provide redundancy i/o channels for block devices, disk drives, tape drives, etc.. Its configuration is located in /etc, named multipath.conf. Before we start the configuration, let's familar with the configuration first.

The multipath configuration file is divided into the following sections:

blacklist

Listing of specific devices that will not be considered for multipath.

For example:

blacklist {
device {
vendor "LSI"
product "Logical Volume"
}
device {
vendor "ServeRA"
}
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
}
blacklist_exceptions

Listing of multipath candidates that would otherwise be blacklisted according to the parameters of the blacklist section.

defaults

General default settings for DM-Multipath.

defaults {
        udev_dir                /dev
        polling_interval        15
        path_selector "round-robin 0"
        path_grouping_policy group_by_prio
        path_checker rdac
        getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
        rr_min_io 1000
        rr_min_io_rq 1
        rr_weight uniform
        failback immediate
        no_path_retry 3
        user_friendly_names     yes
        features "0"
        prio rdac
        find_multipaths yes
        log_checker_err always
}
multipath

Settings for the characteristics of individual multipath devices. These values overwrite what is specified in the defaults and devices sections of the configuration file.

multipaths {
          multipath {
                     wwid    360080e50002d26520000067a4f7a3fb8
                     alias   lun0
          }
          multipath {
                     wwid    360080e50002d2124000006d14f7a3f92
                     alias   lun1
          }
          multipath {
                     wwid    360080e50002d26520000067e4f7a3fcc
                     alias   lun2
          }
...
}
devices

Settings for the individual storage controllers. These values overwrite what is specified in the defaults section of the configuration file. If you are using a storage array that is not supported by default, you may need to create a devices subsection for your array.

       device {
               vendor "NETAPP"
               product "LUN.*"
               path_grouping_policy group_by_prio
               getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
               path_selector "round-robin 0"
               path_checker tur
               features "3 queue_if_no_path pg_init_retries 50"
               hardware_handler "0"
               prio ontap
               failback immediate
               rr_weight uniform
               rr_min_io 128
               rr_min_io_rq 1
               flush_on_last_del yes
               fast_io_fail_tmo 5
               dev_loss_tmo infinity
               retain_attached_hw_handler yes
               detect_prio yes
       }

When the system determines the attributes of a multipath device, first it checks the multipath settings, then the per devices settings, then the multipath system defaults.