Forgive if this seems obvious, but the manual page I was looking at for the mdadm.conf file didn't do (to me) a sufficient job of explaining this question.
I'm preparing to setup a small RAID, but if possible I'd rather the system automatically re-add partitions in the event of a disk failure (using a Raid 6, FWIW, with five drives + one hot spare). I've seen the policy line, and I think it should read something like: POLICY domain=myraid metadata=1.x type=part action=force-space but I'm not sure that's right because the examples in the man file all use PCI bus reference points, i.e. POLICY domain=domain1 metadata=imsm path=pci-0000:00:1f.2-scsi-* action=spare POLICY domain=domain1 metadata=imsm path=pci-0000:04:00.0-scsi-[01]* action=include Do I really need that path= line? All I want (if possible) is for mdadm --monitor to watch the drives, and take certain actions: 1) if a drive fails, remove from the array and replace it with the hot spare 2) If a drive is inserted into the system and the array is in degraded mode due to a missing drive, rebuild onto that drive 3) if a drive is inserted into the system and the array is NOT in degraded mode, but the drive falls within the range specified on the DEVICES line, then add it as a hot spare. (the partition would probably need to be made first for these last two, so as soon as fdisk exits and the kernel sees the partition mdadm should take appropriate action) Here's what my mdadm.conf looks like so far, and no I haven't tested it yet. I'll get to that, but I was hoping if someone sees an error the recognize, they'll warn me: DEV /dev/sd[bcdefg]1 ARRAY /dev/md0 num-devices=5 spares=1 level=6 MAILADDR [email protected] POLICY domain=myraid metadata=1.x type=part action=force-spare Also, since I have almost no experience building an initrd, the manual page seems to indicate that auto detecting and starting of the array is not supported with 1.x superblocks and isn't a good idea anyway, but that you should use an initrd to start the array. My question would be: HOW? Like I said, I've never built an initrd, but have always just gone with a monolithic kernel when I rebuild things. It's always been easier, and since I only compile the drivers for the hardware I have I've never needed the modules and so never needed an initrd. Any tips and/or web sites containing tips/how-tos are MOST welcome! Thanks all! --- Dan /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
