Operating System - Linux
1753778 Members
7547 Online
108799 Solutions
New Discussion

Multipath Configuration LVM

 
agumarjo
New Member

Multipath Configuration LVM

Thanks in advance!

I have and RHEL5.4 conecceted to an SAN HSV200.


When I present a LUN to it, In system-confg-lvm gui appears a device like /dev/mapth/mapth0 (that´s the correct device to multipath) and other like /dev/sda or /dev/dm-N, as uninitialized entities.

How could I configure to not display this device (/dev/sda) and prevent human errors?

I´ve probed to put on lvm.conf with filter = [ "a/dev/mapper/mpath.*/","a/dev/cciss/.*/","r/.*/" ], but It doesn´t work...
4 REPLIES 4
Alzhy
Honored Contributor

Re: Multipath Configuration LVM

You can always try changing as well:

# An array of directories that contain the device nodes you wish
# to use with LVM2.
scan = [ "/dev" ]

and

# Try to avoid using undescriptive /dev/dm-N names, if present.
#preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]

In our case, we simply ignore the non-multipath devices.

We also additionally instituted standards to wit:

- all disks are to be "friendlier named" (aka alias'ed in multipath.conf) so our multipath devices are friendlier than /dev/mapper/mpathNN. With this standard, we have our SAN Multipathed disks named like - /dev/mapper/EVA200_vgSAP01_disk1

- we ALWAYS partition PVs -- even if the whole disk is to be used as a PV,,, so it is /dev/mapper/EVA200_vgSAP01_disk1p1 that will be pvcreated.

Our filter now ends up to be something like:

filter = [ "a/mapper/.*p1$/", "a|/dev/cciss/*|", "a|/dev/sda[0-9]|", "a|/dev/sdb[0-9]|", "r/.*/" ]



Cheers and Hope this Helps!
Hakuna Matata.
P Arumugavel
Respected Contributor
agumarjo
New Member

Re: Multipath Configuration LVM

Thanks for your answers!

I have attached a screenshot of system-confg-lvm GUI , where you can view all that I have try to expain.

This is the things I need:

1- I want (if it is posible...) to disappear the part where it says "uninitialized entities"

2- Is It necesary mantain the partitioning done to default (like /dev/mapper/mpath0p1) with device-mapper-multipath (kpartx command)? or Can I delete it without future problems?

This is the actual configuration that I have:

1- /etc/lvm/lvm.conf

preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]

filter = [ "a/dev/mapper/mpath.*/","a/dev/cciss/.*/","r/.*/" ]

2- /etc/multipath.conf

#blacklist {
# devnode "*"
#}

devnode_blacklist {
devnode "^cciss!c[0-9]d[0-9]*"
devnode "^vg*"
}
defaults {
user_friendly_names yes
path_grouping_policy multibus
}

devices {
device {
vendor "HP"
product "HSV200"
path_grouping_policy multibus
no_path_retry "5"
}
}

multipaths {
multipath {
wwid 3600508b4000e83d20000300000300000
alias mpath0
path_grouping_policy multibus
path_checker readsector0
path_selector "round-robin 0"
failback "5"
rr_weight priorities
no_path_retry "5"
}
}
Alzhy
Honored Contributor

Re: Multipath Configuration LVM

1.) I don't think it is possible. As I mentioned in my earier reply - we SIMPLY ignore the non mapper entries. We have an edict to always use the "custom named/aliased" disk names and always partition them "wholly" --- p1 (the whole disk!). And besides - system-lvm-config GUI is very slow, buggy and prone to hangs when you have lots of disks already involved. Do your LVM gyrations CLI way.

2.) As I said again in my previous post - come up with sensible naming standards sir. Your "alias mpath0" is NOT sensinble as mpathN would be the default name given by udev under multipath anyway.... give it something like "EVA_DG1_vdisk01".

BTW, did you install HP Device Mapper Multipath kit? If you have it - then multipath.conf should be ready to go with the only section you need to name being the multipaths secition to give your LUNs a friendlier name.

You will also need to relocate your /var/lib/multipath/bindings to /etc/multipath/bindings as recomended by RHEL support to avoid those situations where possibel corruptions could happen and also address boot time error messages relating to /var being read-only. Simply copy /var/lib/multipath to /etc/multipath and add to your multipath.conf defaults section the following:

bindings_file /etc/multipath/bindings


Cheers and HTH!


Hakuna Matata.