Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   Starting RAID on boot (http://www.linux-archive.org/fedora-user/111080-starting-raid-boot.html)

James Thorpe 06-21-2008 09:37 PM

Starting RAID on boot
 
Hi list,

I've configured two drives in a machine for RAID1, and once the machine
is up and running I can


mdadm --assemble /dev/md0
mount /dev/md0 /mirror

No problems. My question is - how do I get it to do this automatically
on boot? I've found references to /etc/init.d/mdadm, but that doesn't
seem to exist on my install (FC9).


Thanks,
James.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Sam Varshavchik 06-21-2008 10:02 PM

Starting RAID on boot
 
James Thorpe writes:


Hi list,

I've configured two drives in a machine for RAID1, and once the machine
is up and running I can


mdadm --assemble /dev/md0
mount /dev/md0 /mirror

No problems. My question is - how do I get it to do this automatically
on boot? I've found references to /etc/init.d/mdadm, but that doesn't
seem to exist on my install (FC9).


Although there are several ways to do this, I would suggest this approach:

* Add /dev/md0 to /etc/fstab.

* Run: mkinitrd /boot/initrd.new `uname -r`

* Reboot. At the grub prompt, edit the initrd command line, and replace your
existing initrd image filename with initrd.new


* If you succesfully end up booting, with /dev/md0 getting mounted by
default, replace your usual initrd image filename with initrd.new


This hinges on mkinitrd succesfully detecting that you're running RAID, and
inserting the necessary startup voodoo into initrc.


Or, you can always edit /etc/rc.d/rc.local, and manually add your mdadm and
mount commands. But that's a rather boring way to do it. The other way, you
have to deal with the excitement of being one typo away from a
temporarily-unbootable brick. That's much more fun, IMO.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


All times are GMT. The time now is 09:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.