> You are nuts if you think the docs are of ANY help. They are so > out of date, and full of error/omissions I wonder why you are pointing > this fellow there. I disagree. The docs are pretty okay if you run 2.0.x, raidtools 0.42 and take the time to really understand what you're doing. =:) This is exactly why I'm running these versions. As promised, my INSTALL file, fwiw, is enclosed. But the whole story is at my "Linux disk mirroring cookbook": http://teak.wiscnet.net/linux-mirror-cookbook which has The OVERVIEW of how WiscNet does disk mirroring with raidtools-0.42 The INSTALL file with details for baking a mirrored disk RedHat Linux system README file for recovering from a *system* crash README file for recovering from a *disk* crash README file re-installing a replacement disk patch file for starting raid services from /etc/rc.d/rc.sysinit patch file for stopping raid services from /etc/rc.d/init.d/halt bash script for automagically re-configuring when a mirror disk is dead bash script for automagically re-configuring a replacement disk perl script that sends an email msg to root when a disk is dead raidtab file for /dev/md0 when both disks are working raidtab file for /dev/md1 when both disks are working raidtab file for /dev/md0 when only one disk is working raidtab file for /dev/md1 when only one disk is working If anyone has any questions, comments, suggestions, heckling, snide remarks, etc about this stuff, feel free to drop me a line. later steve - - - systems guy wiscnet.net ================================================================== Overview ------------------------------------------------------------------ - install RedHat "primary system" on disk0 partition1 with swap on disk0 partition2 - install RedHat "secondary system" on disk1 partition1 with swap on disk1 partition2 - build and use 2.0.36 kernel on disk0 - build raidtools 0.42 - make RAIDs on disk0/disk1 partition3 and disk0/disk1 partition4 - boot "primary system" (disk0 partition1) system - copy over kernel, raidtools, etc to "secondary system" - boot "secondary system" and tell disk1's master boot record about the 2.0.36 kernel on the secondary system - boot secondary-system with 2.0.36 kernel - tell secondary-system about RAIDs on disk1 partition3 and partition4 - Viola! - disk1 failure keeps humming but requires care and feeding at next boot - disk0 failure causes crash but then boots secondary-system automagically - replacement of dead disk requires redhat install ================================================================== Install and config RedHat on both disks ------------------------------------------------------------------ # fdisk primary disk into four partitions: # sda1 for slash # sda2 for swap # sda3 for /usr/local # sda4 for /home # install rh5.0 into primary disk (sda) # disconnect primary disk # install rh5.0 into secondary disk (sda) # config net # config printer # config all services # config xwindows ================================================================== Basic system tweaking ------------------------------------------------------------------ vi /etc/lilo.conf append="MEM=128" /sbin/lilo cd /etc/rc.d vi rc.local # ... gut /etc/issue /etc/issue.net stuff mkdir rc.save for i in inn named news routed nfsfs pcmcia postmap \ postgresql smb snmp rwhois sound ypbind; do mv -f */*$i* rc.save done cd /etc vi motd issue issue.net vi /etc/hosts.deny vi /etc/hosts.allow vi /etc/profile vi /etc/bashrc echo -e "version4.x\nset undolevels=0" > /usr/share/vim/vimrc reboot ================================================================== Build RAID enabled kernel ------------------------------------------------------------------ /usr/src tar -zxf /usr/local/src/tar-files/linux-2.0.36.tar.gz mkdir linux/include/linux/raid patch < /usr/local/src/tar-files/raid0145-19990128-2.0.36 # add... # extern char empty_zero_page[PAGE_SIZE]; # ...to line 91 of linux/arch/i386/kernel/setup.c cd linux make config # CONFIG_BLK_DEV_SD=y CONFIG_MD_MIRRORING=y make dep; make clean; make zImage cp arch/i386/boot/zImage /boot/vmlinuz-2.0.36+raid0145 vi /etc/lilo.conf /sbin/lilo reboot ================================================================== Build RAID devices on primary disk ------------------------------------------------------------------ # build any disk mirrors... vi /etc/raid.d/md0tab /etc/raid.d/md1tab # make a whole bunch of md?tab and md?sd?? files mkraid -f /etc/raid.d/md0tab mkraid -f /etc/raid.d/md1tab mdcreate raid1 /dev/md0 /dev/sda3 /dev/sdb3 mdcreate raid1 /dev/md1 /dev/sda4 /dev/sdb4 mdadd /dev/md0 /dev/sda3 /dev/sdb3 mdadd /dev/md1 /dev/sda4 /dev/sdb4 mdrun -p1 /dev/md0 mdrun -p1 /dev/md1 mke2fs /dev/md0 mke2fs /dev/md1 fsck /dev/md0 fsck /dev/md1 mdstop /dev/md0 mdstop /dev/md1 vi /etc/fstab # add mdrun -a and mdadd -a to /etc/rc.d/rc.sysinit just before fsck # add mdstop -a to /etc/rc.d/init.d/halt just after / remounts read-only reboot test raid a few times ================================================================== Move /var and /home to the RAID devices ------------------------------------------------------------------ mkdir /usr/local/var cd /var tar -cf - * | (cd /usr/local/var; tar -xf -) mv /var /var.OLD ln -s /usr/local/var /var mkdir /usr/local/home cd /home tar -cf - * | (cd /usr/local/var; tar -xf -) mv /home /home.OLD ln -s /usr/local/home /home mount /spare-root cd /spare-root ln -s /usr/local/var var ln -s /usr/local/home home ================================================================== Build RAID devices on secondary disk ------------------------------------------------------------------ mount /dev/sdb1 /spare-root # copy over lots of stuff... kernel, raidtools and /dev/md? fer sure shutdown # disconnect /dev/sda # boot secondary # tell lilo about secondary's new kernl # boot secondary with new kernel mkraid /etc/raid.d/md0sda3tab -f --only-superblock mkraid /etc/raid.d/md0sda4tab -f --only-superblock mdcreate raid1 /dev/md0 /dev/sda3 mdcreate raid1 /dev/md1 /dev/sda4 mdadd /dev/md0 /dev/sda3 mdadd /dev/md1 /dev/sda4 mdrun -p1 /dev/md0 mdrun -p1 /dev/md1 fsck /dev/md0 fsck /dev/md1 vi /etc/fstab ================================================================== Test disaster recovery ------------------------------------------------------------------ - boot with either disk dead - pull power to either disk ================================================================== Misc post configuration stuff ------------------------------------------------------------------ # populate /usr/local/bin # make accounts # build applications # configure applications