Managing RAID on Linux - Derek Vadala [130]
Repeat step 6 for each existing filesystem. When you're done, you should have populated each new array with the corresponding system partition.
Now run /sbin/lilo and reboot the system into single-user mode. After the system reboots, you should notice that your degraded arrays are mounted (use df or mount to confirm this).
Next, add the old (/dev/sda) system partition to the new arrays, taking them out of degraded mode. If you're working with raidtools, use the raidhotadd command. For mdadm, use:# mdadm -a /dev/md0 /dev/sda1
Repeat this command for each remaining partition and array until all of them are out of degraded mode. As you add partitions to the arrays, each one will begin reconstructing. So, the system might be a bit sluggish until the rebuild tasks have completed.
Use fdisk on /dev/sda to change the partition types of Linux Raid Auto.
Edit /etc/lilo.conf and change the boot line so that it points to the boot partition (for example, boot=/dev/md0). Now run /sbin/lilo to rebuild the boot sector on your array.
For more information about booting using software RAID, I recommend the "Boot + Root + Raid + Lilo : Software Raid mini-HOWTO," written by Michael Robinton. You can find it at http://www.tldp.org/HOWTO/mini/Boot+Root+Raid+LILO.html or at any Linux Documentation project mirror.
Appendix A. Additional Resources
The following web sites, books, mailing lists, and magazines are valuable supplements to the material covered in this book.
Mailing Lists
The best resource for Linux RAID is the linux-raid mailing list. Many experts and developers read this list, and it's generally the best place to look for information. Be certain to check the archives before posting to the list. Archives are available at http://marc.theaimsgroup.com/?l=linux-raid or http://groups.google.com/groups?group=mlist.linux.raid.
To subscribe to the list, send a message to majordomo@vger.kernel.org, with the word "subscribe" in the message body (not the subject).
Web Sites and Online Resources
This section contains online resources that offer RAID and filesystem information, as well as hardware reviews.
RAID
Here are some web sites that provide information about RAID.
The Linux Documentation (http://www.tldp.org) project provides a free, comprehensive library covering Linux and open source software. Of particular note are the following documents. The Software RAID HOWTO provides a quick tutorial on configuring arrays, using raidtools. You can find this tutorial at http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html.
The Boot+Root+Raid+LILO mini-HOWTO provides cookbook examples for booting directly from a software RAID using LILO. You can access the document at http://www.tldp.org/HOWTO/mini/Boot+Root+Raid+LILO.html.
"A Case for Redundant Arrays of Inexpensive Disks (RAID)," also known as the start of the Berkeley Papers, is available from the ACM web site (http://www.acm.org/sigmod/dblp/db/conf/sigmod/PattersonGK88.html), provided you have a subscription to their digital library.
http://www.nobell.org/~gjm/linux/ide-raid/ contains a case study of various ATA RAID setups.
Filesystems
The following web sites provide information about filesystems.
http://www.research.att.com/~gjm/linux/ide-raid.html
The ext2 home page
http://e2fsprogs.sourceforge.net/ext2intro.html
A technical paper authored by the developers of ext2
http://www.ibm.com/developerworks/oss/jfs/
IBM's JFS for Linux home page
http://oss.sgi.com/projects/xfs/
The XFS for Linux home page
http://www.namesys.com/
The ReiserFS home page
http://www.zip.com.au/~akpm/linux/ext3/
The ext3 home page
Hardware
Storage Review (http://www.storagereview.com) is an excellent resource that evaluates hard disks, RAID controllers, and standalone disk controllers.
Books
Bibliography
Books
You might find the following reading material useful when building RAID systems. I'd like to specifically recommend Advanced PC Architecture,