[olug] olug mtg - linux raid summary

Brian Wiese bwiese at cotse.com
Thu Apr 3 23:17:22 UTC 2003


Just for documentation, I wanted to post a summary of the Linux RAID
howto-demonstration that Adam Header provided for the OLUG meeting on
Tuesday (april fools).  If theres some errors, or major vagueness, please
feel free to correct...

note: Infotec OLUG booth on April 8 from 10-6pm and April 9 10-3pm

Making a RAID-1 (mirror) with a 2gig drive and 2gig partition on 20gig
drive

after booting to a boot floppy, with the additional hd installed
current bootable hard drive, hda1, mounted as /mnt/sysimage

1. create partitions on a new disk
(to match, or be slightly larger than partition to copy)
2. configure raid in /etc/fstab
3. cp /mnt/sysimage/etc/raidtab /etc/raidtab  
4. umount /dev/hda1
5. create the arrray with 'mkraid /dev/md0'
more|less on /proc/mdstat to see the status 
6. mount the raid to check 'mount /dev/md0 /mnt/sysimage'
7. chroot /mnt/sysimage
8. edit /etc/fstab  on /dev/md0
configure the bootloader (grub or lilo, /etc/lilo.conf)
boot partition = /dev/hda1
root = /dev/md0
run '/sbin/lilo' for changes to take effect
9. fdisk /dev/hda 
change partition types to 'fd' (raid auto detect)
with fdisk, or cfdisk program (underlying fs still ok - ext3,..)
10. resize file systems, now have a 2nd superblock
resize2fs /dev/md0 ... could also run an fsck on the disk
(adam had to copy the program to ramdisk from the hard drive)
11. check drives are syncd, /etc/fstab correct, lilo, kernel has scsi+raid
builtin (at least a backup disk), partition types changed to fd, resized
partition types- create a bootdisk 'mkbootdisk' (gets lilo, kernel,
/etc/fstab, ramdisk + modules info)

'raidstart' should sync array
'raidhotadd /dev/md0 /dev/hdc1' adds drive to raid
'more /proc/mdstat' should give raid status info
iostat
make ext3 fs 'mke2fs -J /dev/md0'
hdparm -d 1 /dev/hda  --- sets DMA mode
hdparm -c 1 /dev/hda  --- sets 32bit I/O mode

3ware escalade cards are good, and so are promise (and adaptec)

more info at www.tldp.org, LINUX RAID HOWTO
http://en.tldp.org/HOWTO/Software-RAID-HOWTO.html
http://www.murty.net/ataraid/ataraid.html
http://forums.gentoo.org/viewtopic.php?t=8813&highlight=raid
http://www-106.ibm.com/developerworks/linux/library/l-raid1/
http://www.linuxjournal.com/article.php?sid=5653
http://books.slashdot.org/article.pl?sid=03/02/11/1531243&mode=nested&tid=106
http://www.oreilly.com/catalog/mraidlinux/chapter/index.html

ot - history of unix www.levenez.com/unix

  Brian Wiese | bwiese at cotse.com | aim: unolinuxguru
------------------------------------------------------
  GnuPG/PGP key 0xF3220030 | "FREEDOM!" - Braveheart 
------------------------------------------------------  
This is not about Napster or DVDs. It's about your Freedom.
  I'll see your DMCA and raise you a First Amendment.
              http://www.anti-dmca.org


More information about the OLUG mailing list