Multipath - Use bindings or multipath.conf ?

Latest response

In the multipath documentation there is a configuration parameter called user_friendly_names with the following definition:

 

If set to yes, specifies that the system should use the /etc/multipath/bindings file to assign a persistent and unique alias to the multipath, in the form of mpathn. If set to no, specifies that the system should use use the WWID as the alias for the multipath. In either case, what is specified here will be overridden by any device-specific aliases you specify in the multipaths section of the configuration file. The default value is no.

 

So, what does everyone recommend using? The bindings file or the multipath.conf file? To me it seems easier to use a bindings file and just like the documentation says, you can copy it to all nodes in a cluster to have consistant alias naming for all nodes in a cluster.

 

Also, what happens if a drive gets replaced and the value of the WWN changes? A multipath.conf entry looks like this and specifies the WWN:

 

        multipath {
                wwid                    360060160e7102200309ddfd6efa5df11
                alias                   mpath-bubba
        }
 

A similar entry in a bindings file would look like this:

 

mpath-bubba   360060160e7102200309ddfd6efa5df11

 

So if a drive gets replaced and the WWN changes, do you have to edit these files or is there a command to automatically update the entries?

 

Thanks in advance for your advice and comments,

 

Mark

Responses

Hi Mark,

 

>>
In the multipath documentation there is a configuration parameter called user_friendly_names with the following definition:

If set to yes, specifies that the system should use the /etc/multipath/bindings file to assign a persistent and unique alias to the multipath, in the form of mpathn. If set to no, specifies that the system should use use the WWID as the alias for the multipath. In either case, what is specified here will be overridden by any device-specific aliases you specify in the multipaths section of the configuration file. The default value is no.

So, what does everyone recommend using? The bindings file or the multipath.conf file? To me it seems easier to use a bindings file and just like the documentation says, you can copy it to all nodes in a cluster to have consistant alias naming for all nodes in a cluster.
>>

If you are using user_friendly_names as yes, system will use the bindings file to keep the persistent names. Same file can be copied to another cluster nodes for the same names and need to do for every new LUN added (assuming at times multiples LUNs will be added). If the "user_friendly_names" is not used, use the alias option in multipath.conf file as mentioned below for "mpath-bubba" and copy same settings to the multipath.conf file of the other node.

One more option you have is to use LVM as mentioned here

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/DM_Multipath/index.html
"2.2. Consistent Multipath Device Names in a Cluster"

>>
Also, what happens if a drive gets replaced and the value of the WWN changes? A multipath.conf entry looks like this and specifies the WWN:

       multipath {
                wwid                    360060160e7102200309ddfd6efa5df11
                alias                   mpath-bubba
        }
 
A similar entry in a bindings file would look like this:

mpath-bubba   360060160e7102200309ddfd6efa5df11

So if a drive gets replaced and the WWN changes, do you have to edit these files or is there a command to automatically update the entries?
>>

the lines in the multipath.conf file need to be removed manually.
 

 

Thank you

Nitin

check below update

Hi, Mark

 

I my conf file also include the user_friendly_names yes, but i have never use the alias.

 

so, I use the /dev/mpath/mpathX as our device

Please see

 

https://access.redhat.com/knowledge/solutions/5549

 

on what device names to be used.

 

-Nitin