Skip to contentSkip to conversation

Multipath / LVM2

linux-lvm [email protected] 3 participants 7 messages Mar 16, 2010

lore
Share & tools
lore
#0 lore raw

hello

I have troubles to get multipathing working on gentoo. I have an identical setup working on a debian box.
The problem is that LVM does not detect labels on the multipath device node; instead it does try to use a physical path (eg /dev/sda1)

the device nodes /dev/dm-X are not automaticaly created like they get on debian, I did run dmsetup mknodes which did not create /dev/dm-X nodes, so i created /dev/dm-0 with the minor/major of the corresponding /dev/mapper/ node. I don't know if this is a problem.

anyway, I've pasted alot of output to http://pastebin.com/wheL4nyE

hope somebody can help me :)

regards

#1 lore raw
Quoted 7 lines · On Tue, Mar 16, 2010 at 05:40:20PM +0100, [email protected] wrote:

hello

I have troubles to get multipathing working on gentoo. I have an identical setup working on a debian box.
The problem is that LVM does not detect labels on the multipath device node; instead it does try to use a physical path (eg /dev/sda1)

Quoted 7 lines

the device nodes /dev/dm-X are not automaticaly created like they get on debian, I did run dmsetup mknodes which did not create /dev/dm-X nodes, so i created /dev/dm-0 with the minor/major of the corresponding /dev/mapper/ node. I don't know if this is a problem.

anyway, I've pasted alot of output to http://pastebin.com/wheL4nyE

change the preferred_names in /etc/lvm.conf to reference /dev/mapper entries before /dev/sd

eg:
preferred_names = [ "^/dev/mapper/" ]

L.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
#2 lore raw

hello
thanks for trying to help :)

I've changed the filter and preferred_names variables to

preferred_names="^/dev/mapper/"
filter=["a|/dev/mapper/.*|", "r/.*/"]

without luck :(

new pvscan output:
http://pastebin.com/5PysR0rD

Quoted 41 lines · On Tue, Mar 16, 2010 at 05:40:20PM +0100, [email protected] wrote:
Quoted 8 lines

hello

I have troubles to get multipathing working on gentoo. I have an identical
setup working on a debian box.
The problem is that LVM does not detect labels on the multipath device node; instead it does try to use a physical path (eg /dev/sda1)

Quoted 9 lines

the device nodes /dev/dm-X are not automaticaly created like they get on debian, I did run dmsetup mknodes which did not create /dev/dm-X nodes, so
i created /dev/dm-0 with the minor/major of the corresponding /dev/mapper/
node. I don't know if this is a problem.

anyway, I've pasted alot of output to http://pastebin.com/wheL4nyE

change the preferred_names in /etc/lvm.conf to reference /dev/mapper entries before /dev/sd

eg:
preferred_names = [ "^/dev/mapper/" ]

L.

--
Luca Berra -- [email protected]
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#3 lore raw

Do "rm -rf /etc/lvm/cache" to remove the LVM cache. If you need this at boot time, of course, you need to create new initramfs with the new /etc/lvm/lvm.conf file.

Quoted 5 lines · [email protected] [[email protected]] wrote:

hello
thanks for trying to help :)

I've changed the filter and preferred_names variables to

Quoted 7 lines

preferred_names="^/dev/mapper/"
filter=["a|/dev/mapper/.*|", "r/.*/"]

without luck :(

new pvscan output:
http://pastebin.com/5PysR0rD

I don't see any warnings about any duplicates. What is the problem?

Thanks, Malahal.

#4 lore raw
In reply to [email protected]
Quoted 9 lines · On Tue, Mar 16, 2010 at 08:09:16PM +0100, [email protected] wrote:

hello
thanks for trying to help :)

I've changed the filter and preferred_names variables to

preferred_names="^/dev/mapper/"
filter=["a|/dev/mapper/.*|", "r/.*/"]

without luck :(

reading your output again i noticed you partitioned the luns on the HDS (hope at least you aligned the partition)
but i fail to see the partitioned multipath luns in /dev/mapper rereading again i see a "livecd" prompt
are you by chance using systemrescuecd (gentoo based)? i tried it once and it did not run kpartix on /dev/mapper.
you should check your udev rules and see why kpartx is not called and partitions are not created

L.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
#5 lore raw

i could resolve the issue, thanks to all who helped :)
the problem was that there is indeed a partition the the array's and the partition map was not created. i did use the gentoo live cd, but on an installed gentoo system the partition maps are not created out-of-the-box by udev either

anyway, thanks again :)

Quoted 37 lines · On Tue, Mar 16, 2010 at 08:09:16PM +0100, [email protected] wrote:
Quoted 9 lines

hello
thanks for trying to help :)

I've changed the filter and preferred_names variables to

preferred_names="^/dev/mapper/"
filter=["a|/dev/mapper/.*|", "r/.*/"]

without luck :(

reading your output again i noticed you partitioned the luns on the HDS (hope at least you aligned the partition)
but i fail to see the partitioned multipath luns in /dev/mapper rereading again i see a "livecd" prompt
are you by chance using systemrescuecd (gentoo based)? i tried it once and it did not
run kpartix on /dev/mapper.
you should check your udev rules and see why kpartx is not called and partitions are not created

L.

--
Luca Berra -- [email protected]
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#6 lore raw
In reply to [email protected]
Quoted 6 lines · [email protected] [[email protected]] wrote:

hello

I have troubles to get multipathing working on gentoo. I have an identical setup working on a debian box.
The problem is that LVM does not detect labels on the multipath device node; instead it does try to use a physical path (eg /dev/sda1)

One easy way to avoid using the paths rather than actual multipath devices is to use filtering in /etc/lvm/lvm.conf. Like below:

# Use only names from /dev/mapper directory
filter = [ "a|/dev/mapper/.*|", "r/.*/" ]

Quoted 4 lines

the device nodes /dev/dm-X are not automaticaly created like they get on debian, I did run dmsetup mknodes which did not create /dev/dm-X nodes, so i created /dev/dm-0 with the minor/major of the corresponding /dev/mapper/ node. I don't know if this is a problem.

This is odd, maybe something to do with udev rules? Anyway, you don't need /dev/dm-X nodes if you use LVM filtering.