Thanks to Jeff Waugh's advice, I now seem to have all the pieces in
place to create a RAID array (using mdadm). (Thanks very much, Jeff!)
Except that when I try:
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda7 /dev/sda7
it refuses, as /dev/hda7 ("/") is mounted.
I read the man page with care, and have googled for info and searched
the Ubuntu forums, to no avail. It looks like everyone expects you to
own all the hardware and setup the raid during installation - not add
the extra drive and add the raid afterwards.
I couldn't even find a howto for setting up a software raid (well, not
one that talked about mdadm - only old ones talking about the older
raidtools).
Can I do what I'm trying here (having got all the SATA etc. modules
loaded and running)? Or do I have to boot from CD and unmount
everything before I create the array?
Also, how will it know to mirror the carefully setup hda7 to the empty
filesystem on sda7, and not the other way around, wiping out my
installation and all my work?
I'm toying with the idea of dd if=/dev/hda7 of=/dev/sda7 (given that
I've made all the partitions to be raid-ed the exact same number of
cylinders).
I'm coming to the conclusion that I'm doing something that's quite
unusual, and that it's going to be messy - that I have to do things
like change the partition type to "Linux raid autodetect", fake up the
mdam.conf entries, then tell it that the empty mirror was bad but can
now be added back to the raid array and re-mirrored ... ugh.
Obviously I should try this on the /home partition, not slash, until I
get the steps worked out. At least that way if I lose any data, it'll
be a tiny amount of junk instead of 10GB of carefully setup Linux
system!
luke
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html