Bug#539970: lvm2: several issues with minor device numbers
Frédéric Brière
fbriere at fbriere.net
Tue Aug 4 20:13:56 UTC 2009
Package: lvm2
Version: 2.02.44-3
Severity: normal
(Most of these issues have already been raised elsewhere[*], and are
probably known by upstream. Nevertheless, I thought it would be a good
idea to file this report, if only to help the next person who will
stumble upon them, especially since they don't show up much on Google.)
Some time ago, I got bitten by LVM shuffling the LV device numbers
around, thus confusing LILO. In the process of fixing things, this is
what I learned:
1. Most of us naively assume that LV device numbers are semi-permanent,
as they are with md, and that we can rely on them with regard to LILO.
I think there should be a big fat warning somewhere stating that this is
NOT the case, and that LILO users should either rely on UUID (which I
could never get to work) or use the permament device number option for
the root LV.
2. The --minor lvcreate/lvchange option also requires --major, even
though this is undocumented. There's especially no information on what
would be an appropriate major number; I've seen 253 and 254 co-exist on
my machine for no apparent reason.
3. The previous point is rather moot, since the kernel will gladly
ignore any major number when creating the LV device node. This can be
confusing, since attempting to create a 253:1 and a 254:1 LV *will*
result in a conflict.
4. Unlike md, LVM appears to scan LVs sequentially when assigning minor
numbers, so creating an LV with a low permanent minor number is not safe
if there are any other LVs with non-permanent minors, as that number
might already have been assigned by the time that LV is brought up. The
solution is to either assign a high enough minor number, or make sure
that *all* LVs have a permament minor.
[*] <http://markmail.org/message/r6fdj44pxczxlgrp>
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26.8 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lvm2 depends on:
ii libc6 2.9-23 GNU C Library: Shared libraries
ii libdevmapper1.02.1 2:1.02.30-3 The Linux Kernel Device Mapper use
ii libreadline5 5.2-5 GNU readline and history libraries
ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip
Versions of packages lvm2 recommends:
ii dmsetup 2:1.02.30-3 The Linux Kernel Device Mapper use
lvm2 suggests no packages.
-- no debconf information
More information about the pkg-lvm-maintainers
mailing list