[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#280571: initrd-tools: Should initialize only LVM VG needed for root fs, not all



On Wed, Nov 10, 2004 at 11:09:24AM +0100, Christian Grigis wrote:
> Package: initrd-tools
> Version: 0.1.74
> Severity: important
> Tags: patch
> 
> The '/script' script in the initrd image generated by mkinitrd contains
> a line initializing the VG's when the root fs is on LVM, using the
> vgchange command. The problem is that it initializes all VG's, which in
> my case fails because one of them depends on a feature not initialized
> at this point (my root fs is on a VG on top of a software raid1, and
> I have another VG on top of a software raid0, and the raid0 module is
> not loaded).
> 
> In any event, only the VG containing the root fs should be initialized
> at this point, the other ones being taken care by the real system
> initialization.
> 
> My suggested patch, which corrected the problem for me:
> 
> --- /usr/sbin/mkinitrd.orig     2004-11-10 10:47:02.000000000 +0100
> +++ /usr/sbin/mkinitrd  2004-11-10 10:48:06.000000000 +0100
> @@ -273,7 +273,7 @@
>                         echo '[ -c /dev/lvm ] || mknod /dev/lvm c 109 0'
>                         echo mount_tmpfs /etc
>                         echo vgscan
> -                       echo vgchange -a y
> +                       echo vgchange -a y ${vg}
>                         echo umount -n /etc
>                 } >&5
>                 {
> @@ -303,7 +303,7 @@
>                                 cat /var/lvm.conf > /etc/lvm/lvm.conf
>                         fi
>                         mount -nt devfs devfs /dev
> -                       vgchange -a y
> +                       vgchange -a y ${vg}
>                         umount /dev
>                         umount -n /var
>                         umount -n /etc/lvm
> 
> 
> 
> I have not tested the part for LVM1, only LVM2.

Hi Christian,

thanks for your bug report and patch. The fix looks good to me.
However, not being that familiar with LVM, can you shed some
light on how the other VG are activated on your system with this
patch in place.

-- 
Horms



Reply to: