Package: lvm10
Version: 1.0.8-8
Severity: critical

Problem description:

lvm10 is the logical volume manager userspace utility package for the 
official 2.4 kernel series. When setting up a system which has its root 
partition on LVM, the kernel has to be loaded from a non-LVM boot 
partition (which the bootloader can handle), together with an initrd that 
contains

/sbin/vgscan
/sbin/vgchange -a y

in its linuxrc to detect and initialize the LVM partitions. Only after 
this, / can be moved to LVM.

the lvmcreate_initrd utility is supposed to create a ramdisk image that 
does precisely this job. If this ever worked as advertised, it seems as if 
the behaviour of vgscan/vgchange changed in a way not respected by 
lvmcreate_initrd. In particular, either vgscan or vgchange tries to write 
a considerable amount of temporary data into the ramdisk, more than it can 
handle, which causes partition detection to fail.

Effect: it is not possible to disk-boot a system with / installed on LVM. 
This presumably justifies the rating of this bug as "critical". (One may 
argue that / never should be on LVM, however, (1) the official 
documentation does not explicitly state so, (2) there are situations where 
snapshotting for / is highly desirable.)

Solution:

The initrd created by lvmcreate_initrd should be a (compressed) ext2 image
of about 6 MB (uncompressed) size, created with increased inode density 
(mke2fs -i 1024), containing everything from the image created by the 
broken lvmcreate_initrd, as well as a directory etc/lvmtab.d - with such 
an initrd, LVM detection and boot will work.

For completeness, here is a working GRUB menu.lst entry showing how to 
boot such a system:

title   Debian GNU/Linux LVM, kernel 2.4.31
root    (hd0,0)
kernel  /vmlinuz-2.4.31 root=3a05 ro vga=ext ramdisk_size=8192
initrd  /initrd-lvm-2.4.30-repaired-manually.gz
savedefault
boot

Notes:

(*) It does not work to give part of the kernel args in the 'kernel' line, 
and others (like ramdisk_size) in an extra 'append' line.

(*) Specifying the root= kernel parameter as [0-9a-f]{4} causes the kernel 
to first look for a /dev/ entry with that name. If that fails, it tries to 
boot from the device whose [major][minor] ID is the one given. LVM 
usually has major ID 58, which is 3a in hex. The minor id designates the 
partition and can be found out e.g. by looking into /proc/partitions of a 
CD-booted system which has LVM activated.

-- 
regards,               [EMAIL PROTECTED]              (o_
 Thomas Fischbacher -  http://www.cip.physik.uni-muenchen.de/~tf  //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y)           V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1))                  (Debian GNU)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to