Tob_Sch@gmx.de kirjoitti 16.8.2006 kello 10.28:
So my questions are: 1. How can I setup a raid1 device with only one valid disk with the intention to extend the raid1 device later with a second valid disk?
Quote from the mdadm man page: "To create a "degraded" array in which some devices are missing, simply give the word "missing" in place of device name. This will cause mdadm to leave the corresponding slot in the array empty." So, your initial attempt was almost correct. Just change it to: mdadm -C /dev/md0 -l raid1 -n 2 /dev/hda1 missing and you should be good to go.
2. How can change a spare device to a active (raid1) device without recreating the raid1 md device?
I haven't tried this myself, but you should first add the new device with mdadm -a /dev/md0 /dev/hdb1 This will make it a spare disk. Then change the number of active devices in raid1 with mdadm --grow /dev/md0 -n 2 I hope these instructions will help you. -- Martti Laaksonen