Hi, the proper way to do it is to generate an /etc/mdadm/mdadm.conf config file and have udadm/udev do the right thing on boot. I have simply create the config file as per a number of howtos and from the manpage:

echo 'DEVICE /dev/hd*[0-9] /dev/sd*[0-9]' > mdadm.conf
        mdadm --detail --scan >> mdadm.conf
This will create a prototype config file that describes currently active arrays that are known to be made from partitions of IDE or SCSI drives. This file should be reviewed before being used as it may contain unwanted detail.

You can probably adapt that. Not sure which distro you are using, but on an ubuntu i believe that works ok. You may also need to edit /etc/default/mdadm and make sure AUTOSTART=true. this also changed depending on what version of ubuntu you are using.
The udev/mdadm/kernel interactions can bite a bit here :( upstart might help

dave


slug list wrote:
Hi All

I am Mucking around wit setting up some Software RAID Disks. I brought 5 x
500Gb USB2 external Disks and got them really Cheap. I have a situation
where I dont need Llightening fast access to files, but I need a Lot of
Space and as Much redundancy as I can get.

So I want to add these 5 x 500Gb disks into a RAID 5 array. I used the
following command:

mdadm -v --create /dev/md1 --level=raid5 --raid-devices=5 --spare-devices=0
/dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1

And now have a running /dev/md1. After running a mkfs -t ext3 /dev/md1 I got
a Fully formatted Data Area and Mounted it to /mnt/raid

All was well and I copied over Data and had a good old Play around. Then I
re-booted the box, I got a MD1 does not exist type of error so my forst
question is this. How do I make it Stick? How do I make the /dev/md1 still
be recognised after a Reboot?

My Next Step is to mount my /home on the RAID array, but first lets see if I
can get it up and running after a Re-boot.

Kev
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to