Securing my data

My machine is now running with /home on my RAID-1 mirror. When I booted my machine with one of the drives turned off (by removing the power cable) it didn’t make a fuss. Putting the “faulty” disk back online was a simple matter of adding it back to the array. The RAID then resynched and was back to normal status after 40 minutes. Pretty cool!

I ran bonnie++ to test the read performance on my regular /dev/sda drive and on the /dev/md0 RAID mirror. The results from my normal disk:

------Sequential Output------
-Per Chr- --Block-- -Rewrite-
K/sec %CP K/sec %CP K/sec %CP
33601  94 49338  15 17551   4

--Sequential Input- --Random-
-Per Chr- --Block-- --Seeks--
K/sec %CP K/sec %CP  /sec %CP
16533  46 42633   6 184.3   0

------Sequential Create------
-Create-- --Read--- -Delete--
 /sec %CP  /sec %CP  /sec %CP
22150  87 +++++ +++ 22595  99

--------Random Create--------
-Create-- --Read--- -Delete--
 /sec %CP  /sec %CP  /sec %CP
21485  87 +++++ +++ 21210  99

compared to the results from my RAID mirror:

------Sequential Output------
-Per Chr- --Block-- -Rewrite-
K/sec %CP K/sec %CP K/sec %CP
32071  91 54533  16 24885   6

--Sequential Input- --Random-
-Per Chr- --Block-- --Seeks--
K/sec %CP K/sec %CP  /sec %CP
22946  62 52236   6 382.1   0

------Sequential Create------
-Create-- --Read--- -Delete--
 /sec %CP  /sec %CP  /sec %CP
26386  92 +++++ +++ 24380  99

--------Random Create--------
-Create-- --Read--- -Delete--
 /sec %CP  /sec %CP  /sec %CP
27755  99 +++++ +++ 22607  99

The performance is better in all areas, except that the CPU utilization is a tad higher. The read performance went up from 42 MiB/s to 52 MiB/s, an increase of 25%. I expected an increase, but it could have been bigger considering that the read requests are balanced over the two drives. But then again, the main goal of the RAID was to make sure that my data will be kept safe, so the increase in performance is just an added bonus!

Even the write performance went up, from 49 MiB/s to 54 MiB/s. This is a bit strange, since every RAID Howto I’ve read explains how the write performance should drop using RAID-1. This is because each block is put on the bus twice, once for each disk. But who am I to complain? :-)

With my data backed by two disks I’m feeling fairly safe on that front. Of course my computer could still be stolen, hit by lightning, or the data could simply be deleted. To protect against the latter I’ve installed dirvish to take backups of /home to my normal disk.

These backups are made daily, and rotated so that I have images for the last two weeks. The nice feature of dirvish is that the backups are live — they exist on my disk as a normal filesystem tree.

Normally it would require a hidious amount of space to keep two weeks worth of full backups, but since dirvish only uses space for new and changed files it should do just fine with my 80 GB disk. The trick is using hard links for files which haven’t changed between backups — hardlinks take up almost no space,or rather, they take up inodes, but ReiserFS (which is the filesystem I use) allocates inodes dynamically as needed so I wont suddenly run out of them.

So with my data spread over no less than three disks I can sleep with ease at night :-)

6 Comments

  1. Lars Geisler:

    The write performance speed-up might be due to the simple fact that the new disks are faster than the old on :-)

  2. Martin:

    The write performance speed-up might be due to the simple fact that the new disks are faster than the old on :-)

    Oh yes, of course. The old is a 80 GB Seagate Barracuda 7200.7 SATA disk and the new are 120 GB Seagate Barracuda 7200.7 SATA NCQ disks, both of which have similar specifications. So perhaps it is the NCQ that makes the difference? I don’t know.

  3. Thomas Mølhave:

    Well, I know your IP-address, so let’s see how long your puny disks will have any meaningfull data. I you suddenly find your disk filled with random primes, you willl know I was there!

    My kungfu is better than yours shimo!

  4. Martin Reise:

    I think your new disks are just faster then your old.
    The newer disks have more cache, I think.

    The higher CPU utilization is caused by slow bus-system.

  5. Martin:

    The newer disks have more cache, I think.

    No, all three have 8 MiB of cache so it’s not that. It would have been an obvious explaination though.

  6. Martin:

    Well, I know your IP-address, so let’s see how long your puny disks will have any meaningfull data. I you suddenly find your disk filled with random primes, you willl know I was there!

    Ehh? :-) I’m in Aalborg at the moment, behind my fathers firewall… so just come ‘n’ get me!

Leave a comment