[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 Sun, Nov 21, 2004 at 12:24:35AM +0000, Martin Michlmayr wrote:
> * Christian Grigis <glove@grigri.org> [2004-11-20 16:24]:
> > In other words, there are still a few issues...
> 
> But your last patch which Horms applied didn't make it worse or did
> it?  i.e should we back that out?

My first patch fixed it for me for the ROOT=/dev/real_root case, and made
it slightly worse for the ROOT=probe case. I have now tried the following
patch (that includes the first one), and it works for me for both cases:

--- /usr/sbin/mkinitrd.orig	2004-11-10 10:47:02.000000000 +0100
+++ /usr/sbin/mkinitrd	2004-11-21 02:08:48.000000000 +0100
@@ -82,7 +82,6 @@
 	IDE_CORE=
 	IDE_MODULE=
 	SHARE=/usr/share/initrd-tools
-	LVM=
 }
 
 usage() {
@@ -261,11 +260,6 @@
 	vg=${vg%/*}
 	DEVLINKS="$DEVLINKS $vg"
 
-	if [ $LVM ]; then
-		return
-	fi
-	LVM=yes
-
 	if module_exists drivers/md/lvm-mod && [ -d /lib/lvm-10 ]; then
 		echo lvm-mod
 		echo /dev/lvm >&4
@@ -273,7 +267,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 +297,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.e. it allows lvm() to be executed more than once.

Can you see cases where this would break where it would originally work?

Best regards,

-Christian



Reply to: