# # 12-Feb-99 amo Installing Raid # 02-Jul-99 amo Installing Raid patches on linux-2.2.6 # 08-Jul-00 amo Installing raid5 for linux-2.2.16 # # # Latest Kernel Patches # --------------------- # http://people.redhat.com/mingo/raid-patches/raid-2.2.16-A0 # # # ftp.kernel.org/pub/linux/daemons/raid/alpha: ( OBSOLETE ) # raid0145-19981110-2.0.35.gz for linux-2.0.35 # raid0145-19990128-2.0.36.gz for linux-2.0.36 # raid0145-19990128-2.2.0.gz for linux-2.2.* # raid0145-19990421-2.2.6.gz for linux-2.2.6 # # # # raid tools needed # # # alpha/raidtools-19990421-0.90.tar.gz ( get these tools too ) # - configure and make raidtools. (must have patched kernel and done a make first) # # # For additional Raid Info # ------------------------ # raid_docs.txt # # To Find out what raid packages is loaded # ---------------------------------------- # rpm -qa | grep -i raid ( ?? ) # # To Uninstall a raid package # --------------------------- # rpm -e 'packagename' # www:/usr/src# gzip -d raid0145-19990421-2.2.6.gz # # # Patch the linux kernel at /usr/src NOT /usr/src/linux # www:/usr/src# patch -p0 < ../raid0145-19990421-2.2.6 .... patching file `linux/fs/proc/root.c' patching file `linux/fs/Makefile' patching file `linux/fs/block_dev.c' patching file `linux/fs/buffer.c' patching file `linux/init/main.c' patching file `linux/kernel/printk.c' patching file `linux/mm/mmap.c' ... # # Verify your kernel supports md and raid # www:/usr/src/linux# make xmenuconfig ( turn ON the following ) multiple device driver support autodetect RAID partitions Linear (append) mode RAID 0, RAID 1 RAID4/5 Translucent and Logical Volume Maneger Support ( ?? ) # # recompile and install your new kernel w/ raid support # ----------------------- reboot with new kernel w/ md & raid support -------------------------------------------------------- # # -------------------------- # now install the raid tools -- AFTER the kernel is patched and installed # -------------------------- # #ww:/usr/src# tar zxvf raidtools-19990128-0.90.tar.gz www:/usr/src# tar zxvf raidtools-19990421-0.90.tar.gz www:/usr/src/raidtools-0.90# ./configure www:/usr/src/raidtools-0.90# make www:/usr/src/raidtools-0.90# make install www:/usr/src/raidtools-0.90# ls -la /dev/md* # # Congratulations...your kernel now has raid support # # # # ========================================================================== # # For mor info on raid commands # ----------------------------- # raid_cmd.uhow2 # # # # Create the raid config file # wwww# vi /etc/raidtab --------------- # www:~# mkraid /dev/md0 handling MD device /dev/md0 analyzing super-block disk 0: /dev/hdc1, 11255296kB, raid superblock at 11255232kB /dev/hdc1 appears to contain an ext2 filesystem -- use -f to override mkraid: aborted # # true since I did mke2fs /dev/hdc1 /dev/hdd1 first # # www:~# mkraid --really-force /dev/md0 DESTROYING the contents of /dev/md0 in 5 seconds, Ctrl-C if unsure! handling MD device /dev/md0 analyzing super-block disk 0: /dev/hdc1, 11255296kB, raid superblock at 11255232kB disk 1: /dev/hdd1, 11255296kB, raid superblock at 11255232kB # # mkraid --really-force -c /etc/raid1.conf /dev/md0 # www:~# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] read_ahead 1024 sectors md0 : active raid1 hdd1[1] hdc1[0] 11255040 blocks [2/2] [UU] resync=3% finish=45.8min unused devices: www:~# mke2fs -c /dev/md0 raidstart /dev/md0 raidstart --configfile /etc/raid1.conf /dev/md0 www:~# e2fsck /dev/md0 e2fsck 1.12, 9-Jul-98 for EXT2 FS 0.5b, 95/08/09 /dev/md0: clean, 11/2813952 files, 414962/11255040 blocks www:~# mount /dev/md0 /Backup www:~# dd if=/dev/zero of=/Backup/test count=1000000 www:~# ls -la /Backup ... -rw-r--r-- 1 root root 512000000 Feb 13 13:11 test www:~# umount /Backup www:~# raidstop /dev/md0 www:~# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] read_ahead 1024 sectors unused devices: www:~# raidstart /dev/md0 www:~# cat /proc/mdstat Personalities : [linear] [raid0] [raid1] read_ahead 1024 sectors md0 : active raid1 hdd1[1] hdc1[0] 11255040 blocks [2/2] [UU] resync=0% finish=53.3min unused devices: # # If a drive fails while online: # raidhotremove /dev/md0 /dev/sdb2 raidhotadd /dev/md0 /dev/sdb2 # # # end of file