Somehow they fail more often around me.
I used to swear by software RAID-1. I loved it because if either disk fails, the other disk still contains all the data and you can get to it and copy it off and so on.
Except that in reality other things get in the way when something fails. Drives may fail at the same time (because of a bad power supply, a power surge, a computer failure, …). A particular low point was the time when my home server’s RAID had a failing disk (which had all my backups on it), and I took out the drive, and added in a new drive to start copying, with both drives hanging out a little outside of the computer case, and at precisely that point a motherboard box dropped out of the shelves two meters higher, and landed with one of its points right on top of the good RAID drive, breaking it. I lost all my backups.
So I learned the hard way that most problems with RAID happen precisely at the time you need to phsyically manipulate the system when one of the drives fail.
Ever since I was wondering how I can do my storage and backup strategy better. I have some other ideas on how I want to back up my stuff from four computers in two different locations (three if you count ‘laptop’ as one of them) depending on what types of files they are (my pictures I need to make sure I don’t lose, while most music I can re-rip if I really have to), which should go in a different post (and if you know of any good descriptions of home backup approaches for all these files we seem to collect, please share!).
But it’s clear that part of the solution should involve storing files across more than one computer, preferably in a transparant way. I thought about setting up one drive in one machine, then doing a nightly rsync or dirvish snapshot of that drive, but with lots of big media files moving around it might not be the best solution.
So I was excited when I came across drbd, which implements a distributed file system that mirrors to a secondary disk over the network.
I got two new 2TB drives last week, installed them in my media server and home server (which took quite some fiddling, including blowing out a power supply which exploded in a green flash, sigh), and read through the pretty clear and decent docs, and after 50 hours of syncing empty disks, I now have this:
[root@davedina thomas]# cat /proc/drbd
version: 8.3.6 (api:88/proto:86-91)
GIT-hash: f3606c47cc6fcf6b3f086e425cb34af8b7a81bbf build by bachbuilder@, 2010-02-12 18:23:20
1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r----
ns:1905605948 nr:0 dw:4 dr:1905606717 al:0 bm:116305 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
[root@davedina thomas]# df --si /mnt/split/
Filesystem Size Used Avail Use% Mounted on
/dev/drbd1 2.0T 206M 1.9T 1% /mnt/split
Sweet! Now to actually copy some files and run some failover tests before trusting my important files to it…