On Tue, Jul 10, 2007 at 09:59:39AM +0200, martin f krafft wrote:
> On 2007-07-10 07:37, Andrew Sackville-West wrote:
> > patch works. here is set -x output from a domU boot with new initramfs
>
> I have reverted the patch and instead put a warning in place:
>
> piper:~> sudo update-initramfs -u -k all -t #[314]
> update-initramfs: Generating /boot/initrd.img-2.6.21-2-amd64
> I: mdadm: using configuration file: /etc/mdadm/mdadm.conf
> E: mdadm: invalid level specified in ARRAY statement in /etc/mdadm/mdadm.conf:
> E: mdadm: ARRAY /dev/md1 level=1 num-devices=4 UUID=f69e3966:97736078:3d186b3c:53958f34
> E: mdadm: levels should be either raid*, linear, or multipath.
> W: mdadm: falling back to emergency procedure in initramfs.
>
> This is a better approach than trying to cater for human error,
> I think.
I was going to flat out agree, but then I wanted to check into why I
had what appears to be an erroneous mdadm.conf and came up with some
interesting stuff that may affect how you want to patch this.
man mdadm says
...
-l, --level=
Set raid level. When used with --create, options are:
linear, raid0, 0, stripe, raid1, 1, mirror, raid4,
4, raid5, 5, raid6, 6, raid10, 10, multipath, mp,
faulty. Obviously some of these are synonymous.
...
note that it is perfectly acceptable in this context to simply use the
number instead of raid+number. which to my reading means that the
previous patch is likely more appropriate since users who read the man
page (rare that may be) could make a logical assumption that a
mdadm.conf like mine is correct.
man mdadm.conf says
...
level= The value is a raid level. This is not normally
used to identify an array, but is supported so that
the output of
mdadm --examine --scan
can be use directly in the configuration file.
...
which is sort of vague. the examples further down the manpage do not
make use of level= at all to provide a reference.
I think the two items taken together rather strongly imply that if one
uses the level= option in mdadm.conf that the 'raid' is not
required. I think it also implies that sourcing the level= option in
mdadm.conf as a way to determine the required modules for the
initramfs may not be valid, but my bash-foo is not up to snuff and I
can't really tell what hooks/mdadm does in anything more than a
general way. There may be no other good way to tell which modules are
needed and just cramming all of them in the image is obviously a
less-than-ideal solution.
anyway, that's my .02 on it. thanks for your attention.
A
Attachment:
signature.asc
Description: Digital signature