how to create persistent names in a multipath configuration?

Hi,

situation: two HP Proliant server, each with SLES11SP4. Each has a FC HBA, connected to a HP FC SAN. Each FC HBA has two channels.
I read man 5 multipath.conf. The problem is: i don’t have a file multipath.conf. Is this normal ? Do i have to create one ? Where ?

The volume from the SAN appears in each host as two disks: /dev/sd[a-c]. How can i create/obtain persistent names for the volume ? So they don’t change when adding/removing a disk.
I have links in /dev/disk/by-path/ which points to the disks. E.g. pci-0000:0d:00.0-fc-0x247000c0ff128f6e-lun-0 → …/…/sdb. Are these persistent ?

Also i’d like to have peristent names for the devices created by the device-mapper.
Currently e.g.:

sunhb65278:~ # multipathd -k
multipathd> list paths
hcil dev dev_t pri dm_st chk_st dev_st next_check
7:0:0:0 sdb 8:16 10 active ready running XXXXXXXXXX 20/20
8:0:0:0 sdc 8:32 50 active ready running XXXXX… 11/20

multipathd> list maps
name sysfs uuid
3600c0ff00012824b04af7a5201000000 dm-4 3600c0ff00012824b04af7a5201000000

multipathd> list topology
3600c0ff00012824b04af7a5201000000 dm-4 HP,P2000 G3 FC
size=1007G features=‘1 queue_if_no_path’ hwhandler=‘0’ wp=rw
|-± policy=‘service-time 0’ prio=50 status=active
| - 8:0:0:0 sdc 8:32 active ready running -± policy=‘service-time 0’ prio=10 status=enabled
`- 7:0:0:0 sdb 8:16 active ready running

I have symlinks in /dev/disk/by-id pointing to dm-4:
lrwxrwxrwx 1 root root 10 Jun 8 20:39 dm-name-3600c0ff00012824b04af7a5201000000 → …/…/dm-4

Are these links persistent ? Or do i have to provide something magic in /etc/udev/rules.d/70-kpartx.rules ?

Thanks.

Bernd

Hi Bernd,

to me it looks as if these devices are handled (mostly) like all other devices: udev creates symlinks based on the information it gets.

E.g. pci-0000:0d:00.0-fc-0x247000c0ff128f6e-lun-0 → …/…/sdb. Are these persistent ?

As long as you don’t change the hardware layout (-> PCI bus device numbering), yes.

lrwxrwxrwx 1 root root 10 Jun 8 20:39 dm-name-3600c0ff00012824b04af7a5201000000 → …/…/dm-4
Are these links persistent ?

As long as the DM UUIDs don’t change, yes.

Depending on what you’re trying to achieve (iow - what base information won’t change for you), you’ll have to use the proper /dev/disk/by-/ entry.

For devices, I usually prefer the “by-id” entries. In case of mountable file systems, I prefer “by-label”. Of course, your taste or your requirements may be very different.

Regards,
J

Hi J,

thanks for your answer. I have another question. While reading about multipath i stumbled upon a toll called mpathconf. But i can’t find it anywhere. Do you know where i find a rpm for SLES 11 SP4 ?
Normally i find a lot of packages here: http://software.opensuse.org/search . But no mpathconf. And zypper se also does not find it.

Bernd

Hi Bernd,

first, I forgot to answer one question in the original post:

The problem is: i don’t have a file multipath.conf. Is this normal ? Do i have to create one ? Where ?

From https://www.suse.com/documentation/sles11/stor_admin/data/bbillhs.html:

i stumbled upon a toll called mpathconf. But i can’t find it anywhere.

Sorry, I have not been able to spot a source for that. But probably the Storage Guide will help you to properly creating and modifying /etc/multipath.conf?

Regards,
J

On 13/06/2016 17:44, berndgsflinux wrote:
[color=blue]

thanks for your answer. I have another question. While reading about
multipath i stumbled upon a toll called mpathconf. But i can’t find it
anywhere. Do you know where i find a rpm for SLES 11 SP4 ?
Normally i find a lot of packages here:
http://software.opensuse.org/search . But no mpathconf. And zypper se
also does not find it.[/color]

mpathconf appears to be a script only available in Red Hat-related
device-mapper-multipath packages. From a quick look at the script
included in the package on RHEL7.2 media I don’t see why it shouldn’t
work for SLES so you just need to find an available RPM from Fedora or
CentOS then extract the script using rpm2cpio and cpio.

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.