Page 1 of 1 [ 4 posts ] 

Aaron_Mason
Veteran
Veteran

User avatar

Joined: 3 Jul 2005
Age: 38
Gender: Male
Posts: 511
Location: Bathurst, Australia

09 Jul 2009, 7:40 pm

Hi all,

Not too long ago a bunch of servers I had some VPSes on were hacked, in some cases the data being trashed. One was lost, the other wasn't.

It was then that I realised I'd put absolutely no thought towards a backup strategy, so I set forth to prepare one. I rented a server running OpenBSD 4.5 that I would use as my backup platform. I had 5 80gb hard drives installed with a view on setting up a RAID 5 array across them.

The only solution I had was RAIDframe, supplied with the OpenBSD kernel source but required a kernel rebuild to get (too big for stock kernel). I recompiled, built the array, set it up... and many times my system crashed. -.-

After trying to wipe the hard drives, accidentally wiping my main drive and requiring a $25 reinstall, I decided it would be best if I tried the readily available and OpenBSD-specific softraid driver. This, however, doesn't have RAID 5, so instead of making a flat mirror, I decided to sacrifice a bunch of space (about 40GB on a RAID-5) to make a RAID 01 - allowing me some level of redundancy to go with my protective mirror.

For top reliability, I spread out the mirror by making two 37.3GB RAID partitions on each of the 5 drives. I daisy-chained each of the partitions in the order of wd0d-wd1d, wd2d-wd3d, wd4d-wd0e, wd1e-wd2e, wd3e-wd4e - each one in RAID 1. I then created a RAID 0 across each of these mirrors to create a 181GB volume formatted in FFS2.

Anybody else have any stories of having to mess with RAID levels?


_________________
We are one, we are strong... the more you hold us down, the more we press on - Creed, "What If"

AS is definitive. Reality is frequently inaccurate.

I'm the same as I was when I was six years old - Modest Mouse


Keith
Veteran
Veteran

User avatar

Joined: 12 Aug 2008
Age: 40
Gender: Male
Posts: 2,321
Location: East Sussex, UK

09 Jul 2009, 8:32 pm

The only fun I have when messing with RAID is with JBOD and adding another disk. I reconfigure and I have to do a recovery. Which is why I add a new disk which is bigger than the array combined to recover too and use a partition editor to open it out to span the free space.



pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 66
Gender: Male
Posts: 7,015

10 Jul 2009, 12:59 am

If I remember correctly, RAID 5 is a sort of 'exclusive or' bit checksum (well, I'm being overly opaque...;), instead of a mirroring. You can lose any single drive in the pack, and replace it, and the other 4 will rebuild it.

I think Mirroring is Raid 1.



Tiberius
Butterfly
Butterfly

User avatar

Joined: 15 Jul 2009
Age: 39
Gender: Male
Posts: 9

16 Jul 2009, 4:46 am

I haven't messed with BSD's RAIDframe recently, but at least several years ago when I played with both I found that Linux's softraid implementation is much more complete. It supports several additional RAID levels and unusual variations thereof. I suspect it is also more widely utilized and probably more robust as a result of that exposure, but that's just an opinion.

Most of my systems follow a configuration along the lines of:

/ : RAID-0 or RAID-5
/boot : RAID-1 /boot
swap : individual partitions with swap striping or RAID-1

Systems with low availability or data integrity requirements will lean towards RAID-0 root partition and individual swap partitions, while systems of greater importance will have a RAID-5 root partition and RAID-1 swap.

I think the most interesting RAID adventure I've had was when my ex-fiance decided to shove a disk enclosure out of the rack and it dropped two disks from a RAID-5 volume. Both disks had unreadable sectors, but I was able to image one to the other with dd_rescue. This forced the second disk to remap the unreadable sectors while (eventually) reading a full image of first. After zeroing the first drive to force reallocation of its unreadable sectors as well, the array was able to fully reconstruct and is still operational today nearly two years later :D