Operating System - Linux
1830862 Members
2562 Online
110017 Solutions
New Discussion

"duplicate PV" warning with Device mapper

 
SOLVED
Go to solution
brian_31
Super Advisor

"duplicate PV" warning with Device mapper

We recently installed and configured linux multipath and get this "duplicate PV"warnings. How would get rid of these warnings??

Thanks

Brian.
5 REPLIES 5
Alzhy
Honored Contributor

Re: "duplicate PV" warning with Device mapper

You need to customise your LVM Scan filter /etc/lvm/lvm.conf so it scans only the PVs that should be scanned.

On my systems, I have my filter set to scan only partition 1's of all my SAN multipathed disks and my /dev/cciss disks..

Without the filter in place, LVM scans each individual device disk files that constitues a single multipath device...

Hakuna Matata.
Alzhy
Honored Contributor

Re: "duplicate PV" warning with Device mapper

Let me know if you want HELP with your filter sir.

But I need to know:

1.) What disk is your OS disk on.
2.) When you create LVM VGs, what devices do you use a PVs? (/dev/dm-NN or /dev/mapper/FRIENDLY01p1 or /dev/mpath/FRIENDLY01p1)



Hakuna Matata.
brian_31
Super Advisor

Re: "duplicate PV" warning with Device mapper

Alzhy

The OS is on /dev/sda. I pvcreate the /dev/mapper/mpath1 /dev/mapper/mpath2 etc like that. Thanks for helping me out!

Best Regards

Brian.
Alzhy
Honored Contributor
Solution

Re: "duplicate PV" warning with Device mapper

Here;s mine:
Covers both IBM xSeries and Proliants.

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


Note we pvcreate on /dev/mapper/FRDNLDSK01p1 (we always partition the disk on p1 - encompassing the whole disk. We avoid pvcreating on the whole unpatitioned disk)

Enjoy!

Note: If you use ASMLIb, you may also update scan order and scan exclude to speed up your boot times (ASMLib scan).

Hakuna Matata.
Alzhy
Honored Contributor

Re: "duplicate PV" warning with Device mapper

Note:

You can "test" your filter changes by simply doing a : pvscan

If pvscan comes out "clean" and you can see all your PVs - then that means your filter.conf is good.


Note most lvm.conf directives can also be passed to the "lvm" (/sbin/lvm) command line
Hakuna Matata.