In another article, I discussed how to config storage device in multipath. How about device configuration in a cluster? 

The first thing you want to do to config multipath device name in a cluster is to make them identical.

Consistent Multipath Device Names in a Cluster

When the user_friendly_names configuration option is set to yes, the name of the multipath device is unique to a node, but it is not guaranteed to be the same on all nodes using the multipath device. Similarly, if you set the alias option for a device in the multipaths section of the multipath.conf configuration file, the name is not automatically consistent across all nodes in the cluster. This should not cause any difficulties if you use LVM to create logical devices from the multipath device, but if you require that your multipath device names be consistent in every node it is recommended that you leave the user_friendly_names option set to no and that you not configure aliases for the devices. By default, if you do not set user_friendly_names to yes or configure an alias for a device, a device name will be the WWID for the device, which is always the same. If you want the system-defined user-friendly names to be consistent across all nodes in the cluster, however, you can follow this procedure:

Use multipath bindings configuration

  1. Set up all of the multipath devices on one machine.

  2. Disable all of your multipath devices on your other machines by running the following commands:

    # systemctl stop multipathd
    # multipath -F
    
  3. Copy the /etc/multipath/bindings file from the first machine to all the other machines in the cluster.

  4. Re-enable the multipathd daemon on all the other machines in the cluster by running the following command:

    # systemctl start multipathd

If you add a new device, you will need to repeat this process.

Use multipath aliases configuration

Similarly, if you configure an alias for a device that you would like to be consistent across the nodes in the cluster, you should ensure that the /etc/multipath.conf file is the same for each node in the cluster by following the same procedure:

  1. Configure the aliases for the multipath devices in the in the multipath.conf file on one machine.

    multipaths {
              multipath {
                         wwid    360080e50002d26520000067a4f7a3fb8
                         alias   lun0
              }
              multipath {
                         wwid    360080e50002d2124000006d14f7a3f92
                         alias   lun1
              }
              multipath {
                         wwid    360080e50002d26520000067e4f7a3fcc
                         alias   lun2
              }
    ...
    }
  2. Disable all of your multipath devices on your other machines by running the following commands:

    # systemctl stop multipathd
    # multipath -F
    
  3. Copy the multipath.conf file from the first machine to all the other machines in the cluster.

  4. Re-enable the multipathd daemon on all the other machines in the cluster by running the following command:

    # systemctl start multipathd

When you add a new device you will need to repeat this process.