[opensuse] Bug in mkinitrd if using md raid
Hi, i use this layout: /boot is on /dev/md0 mirror at the beginning of the 2 disks. lvm volumegroup is on /dev/md1 mirror / is a lvm volume swap and other filesystems are also lvm volumes. mkinitrd creates a /etc/mdadm.conf inside the initrd that contains only the /dev/md1. The system stops when it it trying to check the /boot filesystem - because it is not found. When i add the /dev/md0 into the initrd mdadm.conf then booting works. Am i doing something wrong? Has anyone compared lvm mirroring vs. md mirroring? Reliability, performance, ...? Thanks Florian
Florian Gleixner wrote:
Hi,
i use this layout: /boot is on /dev/md0 mirror at the beginning of the 2 disks. lvm volumegroup is on /dev/md1 mirror / is a lvm volume swap and other filesystems are also lvm volumes.
mkinitrd creates a /etc/mdadm.conf inside the initrd that contains only the /dev/md1. The system stops when it it trying to check the /boot filesystem - because it is not found. When i add the /dev/md0 into the initrd mdadm.conf then booting works. Am i doing something wrong?
Has anyone compared lvm mirroring vs. md mirroring? Reliability, performance, ...?
Thanks
Florian
You are not doing anything wrong, at least in the sense that the system ought to work the way you have it. You may be hitting known mkinit bugs in oss 11.1, for which updates are available. 11.1 has been, for me at least, highly difficult to work with when machines use lvm + md raid - I am still having difficulties in upgrading one machine 11.0 to 11.1 because 11.1 upgrade refuses to see any Linux partitions on it. The same machines worked great from 10.0 through upgrades to various other versions before reaching the quagmire that 11.1 is turning out to be for me. -- --Moby They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi there, On Fri, 27 Mar 2009, 22:42:08 +0100, Florian Gleixner wrote:
Hi,
i use this layout: /boot is on /dev/md0 mirror at the beginning of the 2 disks. lvm volumegroup is on /dev/md1 mirror / is a lvm volume swap and other filesystems are also lvm volumes.
mkinitrd creates a /etc/mdadm.conf inside the initrd that contains only the /dev/md1. The system stops when it it trying to check the /boot filesystem - because it is not found. When i add the /dev/md0 into the initrd mdadm.conf then booting works. Am i doing something wrong?
Which version of the OS is this with? I happened to face a similar issue when I added two additional disks and created a separate VG on the additional MD-raid1 device. The system stopped booting because mkinitrd decided that my root-fs is on the other MD device :-( The attached patch to /lib/mkinitrd/scripts/setup-md.sh fixed it for me. FWIW, this was on openSUSE-10.3
Has anyone compared lvm mirroring vs. md mirroring? Reliability, performance, ...?
AFAIK, the MD code is much more mature than the dm-mirror stuff, and also has more features (write-intent bitmaps to reduce resync times, raid10, ...).
Thanks
Florian
HTH, cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 28 Mar 2009, 11:52:59 +0100, Manfred Hollstein wrote:
Hi there,
On Fri, 27 Mar 2009, 22:42:08 +0100, Florian Gleixner wrote:
Hi,
i use this layout: /boot is on /dev/md0 mirror at the beginning of the 2 disks. lvm volumegroup is on /dev/md1 mirror / is a lvm volume swap and other filesystems are also lvm volumes.
mkinitrd creates a /etc/mdadm.conf inside the initrd that contains only the /dev/md1. The system stops when it it trying to check the /boot filesystem - because it is not found. When i add the /dev/md0 into the initrd mdadm.conf then booting works. Am i doing something wrong?
Which version of the OS is this with? I happened to face a similar issue when I added two additional disks and created a separate VG on the additional MD-raid1 device. The system stopped booting because mkinitrd decided that my root-fs is on the other MD device :-( The attached patch to /lib/mkinitrd/scripts/setup-md.sh fixed it for me. FWIW, this was on openSUSE-10.3
Actually attaching the patch would help...
Has anyone compared lvm mirroring vs. md mirroring? Reliability, performance, ...?
AFAIK, the MD code is much more mature than the dm-mirror stuff, and also has more features (write-intent bitmaps to reduce resync times, raid10, ...).
Thanks
Florian
HTH, cheers.
l8er manfred
On Sat, Mar 28, 2009 at 11:53:53AM +0100, Manfred Hollstein wrote: [ 8< ]
Actually attaching the patch would help...
And filing bugs in bugzilla too. It's now 490008 in bugzilla.novell.com which includes the initial report, a reference to this thread and the suggested fix. Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
On Sat, 28 Mar 2009, 13:09:00 +0100, Lars Müller wrote:
On Sat, Mar 28, 2009 at 11:53:53AM +0100, Manfred Hollstein wrote: [ 8< ]
Actually attaching the patch would help...
And filing bugs in bugzilla too. It's now 490008 in bugzilla.novell.com which includes the initial report, a reference to this thread and the suggested fix.
thx Lars! To be honest, yes, I probably became a bit lazy reporting bugs (at least those, which I can easily fix myself ;-) ...
Lars
Cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi, thanks, that did the trick. When looking at the script i wonder why the script tries to find the md device of the root device. It does not matter if the root device resides on a md. It should simply include all running or configured md devices or do i miss something? Florian Manfred Hollstein wrote:
On Sat, 28 Mar 2009, 11:52:59 +0100, Manfred Hollstein wrote:
Hi there,
On Fri, 27 Mar 2009, 22:42:08 +0100, Florian Gleixner wrote:
Hi,
i use this layout: /boot is on /dev/md0 mirror at the beginning of the 2 disks. lvm volumegroup is on /dev/md1 mirror / is a lvm volume swap and other filesystems are also lvm volumes.
mkinitrd creates a /etc/mdadm.conf inside the initrd that contains only the /dev/md1. The system stops when it it trying to check the /boot filesystem - because it is not found. When i add the /dev/md0 into the initrd mdadm.conf then booting works. Am i doing something wrong? Which version of the OS is this with? I happened to face a similar issue when I added two additional disks and created a separate VG on the additional MD-raid1 device. The system stopped booting because mkinitrd decided that my root-fs is on the other MD device :-( The attached patch to /lib/mkinitrd/scripts/setup-md.sh fixed it for me. FWIW, this was on openSUSE-10.3
Actually attaching the patch would help...
Has anyone compared lvm mirroring vs. md mirroring? Reliability, performance, ...? AFAIK, the MD code is much more mature than the dm-mirror stuff, and also has more features (write-intent bitmaps to reduce resync times, raid10, ...).
Thanks
Florian HTH, cheers.
l8er manfred
Hi there, On Sun, 29 Mar 2009, 18:50:38 +0200, Florian Gleixner wrote:
Hi,
thanks, that did the trick. When looking at the script i wonder why the script tries to find the md device of the root device. It does not matter if the root device resides on a md. It should simply include all running or configured md devices or do i miss something?
that's exactly what my patch does, but the reason for the way how the original script works is probably some kind of an optimization; imagine you're using some complicated setup with about 20 md's; scanning all available block devices for the UUIDs noted in /etc/mdadm.conf can take some time (depending on which kind of devices are connected...), and I remember some e-mail threads about how booting the system can be made faster.. ;-) But for this optimization to be valid, it should simply work!
Florian
Cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 03/30/2009 02:03 AM, Manfred Hollstein wrote:
On Sun, 29 Mar 2009, 18:50:38 +0200, Florian Gleixner wrote:
Hi,
thanks, that did the trick. When looking at the script i wonder why the script tries to find the md device of the root device. It does not matter if the root device resides on a md. It should simply include all running or configured md devices or do i miss something?
that's exactly what my patch does, but the reason for the way how the original script works is probably some kind of an optimization; imagine you're using some complicated setup with about 20 md's; scanning all available block devices for the UUIDs noted in /etc/mdadm.conf can take some time (depending on which kind of devices are connected...), and I remember some e-mail threads about how booting the system can be made faster.. ;-) But for this optimization to be valid, it should simply work!
From the README.initramfs file in the mdadm package, "It should be noted up front that only the array containing the root filesystem should be assembled from the initramfs. Any other arrays should be assembled under the control of files on the main filesystem as this enhanced flexibility and maintainability."
So it appears this has more to do with the creation of the device nodes needed while running from the initrd than anything else. I wonder if it has any relation to bnc#445490. But this fix is in the mkinitrd package. I may need to do some experimenting... Can you tell Manfred? I am not a programmer. -- Joe Morris Registered Linux user 231871 running openSUSE 11.1 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 30 Mar 2009, 00:19:59 +0200, Joe Morris wrote:
On 03/30/2009 02:03 AM, Manfred Hollstein wrote:
On Sun, 29 Mar 2009, 18:50:38 +0200, Florian Gleixner wrote:
Hi,
thanks, that did the trick. When looking at the script i wonder why the script tries to find the md device of the root device. It does not matter if the root device resides on a md. It should simply include all running or configured md devices or do i miss something?
that's exactly what my patch does, but the reason for the way how the original script works is probably some kind of an optimization; imagine you're using some complicated setup with about 20 md's; scanning all available block devices for the UUIDs noted in /etc/mdadm.conf can take some time (depending on which kind of devices are connected...), and I remember some e-mail threads about how booting the system can be made faster.. ;-) But for this optimization to be valid, it should simply work!
From the README.initramfs file in the mdadm package, "It should be noted up front that only the array containing the root filesystem should be assembled from the initramfs. Any other arrays should be assembled under the control of files on the main filesystem as this enhanced flexibility and maintainability."
While this is true in general, I'm just using the host's /etc/mdadm.conf file from inside the initrd, so the arrays should look exactly the same as they will after potential re-assembly later on.
So it appears this has more to do with the creation of the device nodes needed while running from the initrd than anything else. I wonder if it has any relation to bnc#445490. But this fix is in the mkinitrd package. I may need to do some experimenting... Can you tell Manfred? I am not a programmer.
It may be related, but my situation was different, as for me (remember, I'm still on openSUSE 10.3!) the bug was caused by mkinitrd (or one of its scripts) identifying the wrong md-device to be used for the root file system :-( You should unpack the generated initrd and look at its etc/mdadm.conf file; I bet you'll find some inconsistencies compared to the one from your root file system at /etc/mdadm.conf . Did you try, if my patch helps in your situation? You just need to ensure, that your system has a valid /etc/mdadm.conf file before you run mkinitrd. HTH, cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Florian Gleixner
-
Joe Morris
-
Lars Müller
-
Manfred Hollstein
-
Moby