Re: Starting RAID on boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: pgpRNp2D1UOdu.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux