Re: Raid1 and mdadm
From: Paul Clements <hidden>
Date: 2003-04-02 20:22:58
Hi Neil,
No. I would not accept patches. Not because I fundamentally disagree with autostart, but because it wouldn't work. I suggest you try it.
Maybe I didn't explain very clearly what my goal is...allow me to clarify: As it is now, if you compile md as a module and happen to have a partition tagged as RAID, you'll panic the kernel. There's code in fs/partitions (and in 2.5, in init/do_mounts.c) that is calling into md....yechhh. What I'd like to do is make a clean separation between the boot up and partitioning code and the md driver, so md can be compiled as a module. (This would also allow other volume managers to use the partition tagging to identify devices, if they wanted.)
quoted
Or is there a better way to do this?Yes. initrd/initfs is "the right way". As far as I know, it *does* work.(*) You do not need md linked into the kernel. You have md.o and whatever personalities you want in the initrd image, then in the initrd script (linuxrc I think) you load the modules, and use mdadm to assemble the raid arrays. You then mount the real root and off you go.
Right, sorry, I wasn't clear. This is basically what I meant. All I want
to do is allow autostart_arrays() to be called when md is compiled as a
module. Then, let the initrd/linuxrc (later initramfs) call
autostart_arrays() (ioctl("/dev/md0", RAID_AUTORUN) is all, really).
I've hacked on 2.5.63. I'll attach the patch, it's fairly short...and
might give you a better idea what I'm proposing...
Any comments would be appreciated.
Thanks,
Paul Attachments
- md_modular_patch.diff [text/plain] 5543 bytes · preview