下一页 上一页 目录

3. ROOT RAID 快速入门

如果你使用 RedHat,请参阅附录 H 中的 如何设置 RedHat 章节。我没有尝试过这个方法。如果你成功使用,请告知我,以便我可以更新本文档。

如果你不想尝试构建和调试救援系统,你可以从以下地址获取一个基于 Slackware-3.4 创建的通用救援系统

ftp.bizsystems.com/pub/raid/raidboot-0.01.tar.gz
执行以下步骤更正 fstab 中的条目,将 /dev/md0 显示为根设备。确保你在启动时使用的分区包含在 fstab 中。

创建 /etc/raidboot.conf 文件,该文件描述了 RAID 启动配置。此文件的前三行不能包含注释,之后的内容则没有关系。

raidboot.conf

        /dev/sda1 /dev/sda2
        raidboot
        raid5.conf
# comments may only be placed 'after' the three
# configuration lines.
#
# This is '/etc/raidboot.conf'
#
# line one, the partition(s) containing the 'initrd' raid-rescue system
#       It is not necessary to boot from these partitions, however,
#       since the rescue system will not fit on floppy, it is necessary
#       to know which partitions are to be used to load the rescue system
#
# line two, the path to the raidboot config information
#       Where the shutdown status, etc... is located at boot time
#       It does NOT include the mount point information, only 'path'
#       /mntpoint/'path'
#
# line -3-, name of the raid configuration file
#       Current raid configuration file i.e. raid1.conf, raid5.conf
还有一些事情要做,RAID 系统就准备好启动了。

按照附录 F 中的描述,创建 rc.raidown,并将其复制到救援系统、开发系统和 RAID 系统上的 /etc/rc.d 目录。卸载救援系统并将其压缩。

        umount mnt
        losetup -d /dev/loop0
        mv rescue.clean rescue
        gzip rescue
将救援文件复制到 raidboot 分区。
        cp rescue.gz /mnt_point(1)/raidboot
        cp rescue.gz /mnt_point(2)/raidboot
激活 RAID 阵列。
        mdadd -ar
good 参考状态保存到 raidboot 分区
        cat /proc/mdstat | grep md0 > /mnt_point(1)/raidboot/raidgood.ref
        cat /proc/mdstat | grep md0 > /mnt_point(1)/raidboot/raidgood.ref
最后,按照 启动时配置参数 中概述的内容配置启动程序,并将你的系统重启到 RAID 阵列。


下一页 上一页 目录