The other thing I did yesterday was set up RAID on the server. For those who haven't had it beaten into their skulls yet, RAID is a way of combining multiple disks into a whole that's faster and more reliable than the sum of its parts. I'm using RAID-5, which uses "striping" (data is alternated between disks) and "parity" (backup data is stored in such a way that a disk can go bad without losing any data).
To review, Navi has these drives:
hda (60GB) | hde (10GB) | hdg (10GB) |
---|---|---|
/boot (32MB), root (1GB), swap (1GB?) | ||
/usr (13GB) | ||
/var (13GB) | ||
/home (13GB) | ||
/tmp (2.5GB) | ||
Empty (5GB) | ||
md0 part one (5GB) | md0 part two (5GB) | md0 part three (5GB) |
md1 part one (5GB) | md1 part two (5GB) | md1 part three (5GB) |
Each of md0 and md1 contains one big folder that needs to be kept safe, and one smaller one that does as well. md0 contains /var/www (all web files, including Filespace) and /var/svn (Subversion version-control files). md1 contains /var/lib/mysql (MySQL databases) and /var/qmail/queue (the Qmail incoming mail queue, which can't really be backed up because it changes constantly). Because there are two folders in each md (multi-disk) volume, I can't just mount them directly into the folders; instead, I do this:
/dev/md0 /mnt/md0 ext3 defaults 1 2 /dev/md1 /mnt/md1 ext3 noatime 1 2 /mnt/md0/www /var/www none bind 0 0 /mnt/md0/svn /var/svn none bind 0 0 /mnt/md1/mysql /var/lib/mysql none bind 0 0 /mnt/md1/queue /var/qmail/queue none bind 0 0This bit of chicanery in my /etc/fstab says "mount md0 and md1 onto /mnt/md0 and /mnt/md1, then bind-mount their subdirectories into place". Which is interesting, to say the least, but it works quite well.