Multipath and lvm: can't create lvm disk

Kaya

Member
Jun 20, 2012
111
2
18
So, I'm in a lot of trouble with making LVM up and running.
The server is the old Intel modular server with 2 compute module.
Storage model is:
One virtual disk with multipath for pve and root file system working great.
Three virtual disk mapped as sdb, sdc and sde (and, respctively, sdf, sdg and sdh) mapped to both server

The problem is that I cant' create phisical disk volumes.

First of all multipath is working:
root@promxox1:~# multipath -ll
GRUPPO03 (22257000155ea3e5f) dm-3 Intel,Multi-Flex
size=1.4T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 0:0:0:3 sdd 8:48 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
`- 0:0:1:3 sdh 8:112 active ready running
root_system (222df000155df9ebf) dm-0 Intel,Multi-Flex
size=280G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 0:0:0:0 sda 8:0 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
`- 0:0:1:0 sde 8:64 active ready running
GRUPPO02 (2221c000155dc81df) dm-2 Intel,Multi-Flex
size=1.8T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 0:0:1:2 sdg 8:96 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
`- 0:0:0:2 sdc 8:32 active ready running
GRUPPO01 (22247000155de47ae) dm-1 Intel,Multi-Flex
size=1.8T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 0:0:0:1 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
`- 0:0:1:1 sdf 8:80 active ready running

lvs and pvs are working fine with pve:
oot@promxox1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- 186.12g 0.00 0.42
root pve -wi-ao---- 69.75g
swap pve -wi-ao---- 8.00g
root@promxox1:~# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/root_system-part3 pve lvm2 a-- 279.87g 15.81g
Now if i watch at /dev/mapper/:
root@promxox1:~# ls -lah /dev/mapper/
total 0
drwxr-xr-x 2 root root 300 Jan 13 12:53 .
drwxr-xr-x 19 root root 4.7K Jan 13 12:53 ..
crw------- 1 root root 10, 236 Jan 13 12:50 control
lrwxrwxrwx 1 root root 7 Jan 13 12:53 GRUPPO01 -> ../dm-1
lrwxrwxrwx 1 root root 7 Jan 13 12:53 GRUPPO02 -> ../dm-2
lrwxrwxrwx 1 root root 7 Jan 13 12:53 GRUPPO03 -> ../dm-3
lrwxrwxrwx 1 root root 8 Jan 13 12:50 pve-data -> ../dm-11
lrwxrwxrwx 1 root root 8 Jan 13 12:50 pve-data_tdata -> ../dm-10
lrwxrwxrwx 1 root root 7 Jan 13 12:50 pve-data_tmeta -> ../dm-9
lrwxrwxrwx 1 root root 7 Jan 13 12:50 pve-root -> ../dm-7
lrwxrwxrwx 1 root root 7 Jan 13 12:50 pve-swap -> ../dm-8
lrwxrwxrwx 1 root root 7 Jan 13 12:53 root_system -> ../dm-0
lrwxrwxrwx 1 root root 7 Jan 13 12:53 root_system-part1 -> ../dm-4
lrwxrwxrwx 1 root root 7 Jan 13 12:53 root_system-part2 -> ../dm-5
lrwxrwxrwx 1 root root 7 Jan 13 12:53 root_system-part3 -> ../dm-6
Seems everything ok.
But if i try to create lvm disk:
root@promxox1:~# pvcreate /dev/mapper/GRUPPO01
Device /dev/mapper/GRUPPO01 not found (or ignored by filtering).

I already edited lvm.conf:

root@promxox1:~# cat /etc/lvm/lvm.conf | grep filter
global_filter = [ "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|" ] filter = [ "a|/dev/disk/by-id/.*|","a|mapper/*|", "r|.*|" ]

So, what's I'm doing wrong?

Thanks!
 
@Kaya,

from your config,
i suppose you've named mpath devices in a non-std way (GRUPPOxx....)

for lvm configuration....

PS: pls check your filter directive....
it seems me strange

filter = [ "a|/dev/disk/by-id/.*|","a|mapper/*|", "r|.*|" ]
may be the correct way is:

filter = [ "a|/dev/disk/by-id/.*|","a|/dev/mapper/*|", "r|.*|" ]​

if this fails,

try to lower all your filters (see the section starting with: #by default we accept all block devices ....)

or

try to refine your lvm config touching the 'preferred_name' directive...


have a nice day!
francesco
 
After try & fix, nothing work!
I've decided to change disk mapping and avoid shared storage with multipath.

Just to say, u can have a simple "a|mapper/*" cause it's like regoular expression and mapper is inside /dev/mapper (I guess)
 
@Kaya,

actually no other suggestions to give!

i still think multipath on shared storage is a good idea (for redundancy accessing lvm....)
i need some time to check config of lvm filters on other installations....

i'll provide other info when availbale!

bye
francesco
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!