Short tipp: multipath LUN gets no alias under Linux

When a logical storage device unit (LUN) of a SAN storage system shall be connected to a Linux server multiple access paths are often used to increase the availability of the storage - especially in case of failures. To implement this technique the multipath daemon (multipathd) is often used under Linux. This software bundles the appropriate paths to one abstracted device file. This file always uses the best path to the storage unit and is used like a device file of a conventional local hard disk. In case of a failure an alternative path is used to transfer data. The higher the amount of paths (normally between 2 and 8) the higher the availability.

Each LUN of a storage system has its own unique ID called WWN (World Wide Name) or WWID (World Wide Identifier). Using this ID the multipath daemon serves a single device file.

To facilitate administration the multipath daemon is able to assign a user-defined alias (e.g. /dev/mapper/database1) instead of an automatically created name (e.g. /dev/mapper/mpath01). The first example is much easier to remember.

It is possible that this alias isn't applied even if is mentioned in the configuration file /etc/multipath.conf of the multipath daemon. In this case the multipath topology might look like this:

1# multipath -ll
2...
3mpath01 (xxxx02e1) dm-10 IBM,1337
4[size=200G][features=1 queue_if_no_path][hwhandler=0][rw]
5_ round-robin 0 [prio=100][active]
6 _ 3:0:1:3 sdn  8:208  [active][ready]
7_ round-robin 0 [prio=20][enabled]
8 _ 3:0:0:3 sdh  8:112  [active][ready]

In this example a LUN with 200 GB and two paths was created and assigned - but instead of a user-defined alias defined in the configuration file an automatically created alias (mpath01) is used:

1# vi /etc/multipath.conf
2...
3        multipath {
4                wwid         xxx02E1
5                alias        database1
6        }
7...

Often the WWID notation - which is case-sensitive - is the reason for this issue. In this case a letter was qualified in upper-case instead of lower-case. Customizing the notation often fixes the problem:

1...
2                wwid         xxx02e1
3...
4
5ESC ZZ

Reload the configuration of the multipath daemon to make the service fixing the alias:

 1# service multipathd reload
 2# rescan-scsi-bus.sh
 3# multipath -ll
 4...
 5database1 (xxxx02e1) dm-10 IBM,1337
 6[size=200G][features=1 queue_if_no_path][hwhandler=0][rw]
 7_ round-robin 0 [prio=100][active]
 8 _ 3:0:1:3 sdn  8:208  [active][ready]
 9_ round-robin 0 [prio=20][enabled]
10 _ 3:0:0:3 sdh  8:112  [active][ready]

🙂

Translations: