Re: Hardware RAID and FreeBSD.

From: Matthias Andree <matthias.andree_at_gmx.de>
Date: Fri, 29 Apr 2011 10:08:00 +0200
Am 29.04.2011 02:11, schrieb Colin Mitchell:
> Hello, BSDians.
> 
> I am kind of a n00b to FreeBSD but have had great success and fun with
> it so far.
> 
> I have two old Dell servers at home.  One has Ubuntu server and is my
> web and mail server.  The other is FreeBSD, and I run servers for a
> video game on it.  I really like the FreeBSD server, especially the
> ports system, and how well it runs even though it is a 1GHz CPU.
> 
> Anyways, I bought a new lower-end computer that I was hoping to replace
> both with.  It is a dirt-cheap dual-core AMD that I had built for
> $175US.  It came with a 500GB HDD, and I would like to get another one
> to put in it.  Now, I would like to set up as a mirrored RAID setup (I
> think). I don't really know much about RAID, but I want to have the same
> disk image on both hard drives (in case one fails), and possibly three
> if I buy another HDD in the future.  Is RAID 1 what I want?  I also want
> to do SVN on it for my PhD code, as well as back up my Wordpress,
> Coppermine, etc...

Colin,

RAID 1 (or mirroring) is indeed what you want, and additionally you
should set up a backup to a separate computer (or additional external
disk) in addition to the RAID. You need a backup against accidents such
as software faults, RAM or controller faults, operator errors (newfs-ing
the wrong partition) and such.  rm -rf $foo causes the same damage to a
RAID than to a single disk if $foo happens to contain "/".

Reconsider if you want SVN for PhD code.  I'd personally prefer Git or
Mercurial or perhaps Bazaar.  Easier to set up and use and backup, and
IMNSHO more robust, and you can still set up a central repository in a
"server" purpose.

> Now, here is where the FreeBSD gurus can chime in.  I would like to get
> a hardware RAID card to tie it all together.  I am also looking for a
> cheap one, maybe $30-$60US, if this is even feasible.  Anyone have any
> suggestions?  Any successes?  

Hardware RAID cards in this price range often implement software RAID
(some Linux guys call that Fakeraid) and hide that fact, or they don't
support RAID5, or both.

The major disadvantage of hardware RAID is that usually only the very
same card, possibly with the same firmware version, can read the disks
back in case the original RAID controller dies, because the software
RAID setups often cannot understand the meta data on the disks that the
hardware writes.

The disadvantage of software RAID is that it is a bit less convenient
and needs some attention for the boot loader and boot partition support
(although RAID 1 is easy) -- you still want to be able to boot if the
primary disk drive dies (that's the whole purpose of RAID).

If you plan to go with three disks later, RAID 5 would be the canonical
configuration, it covers up the failure of any one hard disk in the
array.  Consider possible partitioning now - possibly you want /usr in a
separate RAID1 so that you can later back it up and make a RAID5 out of
it (possibly in a restore operation to defragment everything) and
everything else stays in RAID1.

Before you buy used hardware controllers (especially RAID 5), be sure to
check the web for benchmarks.  Some old hardware RAID adaptors are *way*
slower than a halfway decent mobo with software RAID.  A friend reported
rsync speeds less than 1 MB/s with a hardware RAID 5 on some old aacraid
driven board under Linux.  He doesn't remember which.  A used 3ware
controller he got (and uses a different driver) is roughly an order of
magnitude faster.

> Also, I see a lot of talk on here bout ZFS.  Is this something I should
> try, instead of the standard UFS?

Only if you have several GB of RAM, and be sure to read the ZFS tuning
guides in the FreeBSD wiki before even trying it -- so that you know
what you're buying before your purchase. :-)

For experiments, use a play computer, but beware of ZFS performance, it
degrades a lot more than UFS when the volume gets closer to filling up,
so be sure to keep sufficient free space.  I haven't got sufficient ZFS
experience to recommend a maximum fill ratio.  I got burnt and am now
experimenting with journalling UFS, which seems to be unremarkable
(which is good).

HTH
Received on Fri Apr 29 2011 - 06:34:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC