On Thu, Mar 16, 2006 at 05:23:49PM +0100, Anthony Howe wrote:
> Since I'm in the process of setting up a file server for an office and 
> I'm wondering which is the better RAID 1 layout, particularly in the 
> event of component failure. Current I've setup choice 2 below, but after 
> having read "man raidctl" again, they mention choice 1.
> 
> Which would be the better choice for performance? for recovery?
> 
> 1) Many partitions that are RAIDs:
> 
>       wd0a | wd1a     OpenBSD installations with RAID kernel.
>       wd0d | wd1d     raid0 /
>       wd0e | wd1e     raid1 swap
>       wd0f | wd1f     raid2 /tmp
>       wd0g | wd1g     raid3 /var
>       wd0h | wd1h     raid4 /usr
>       
> 2) One single large RAID partition, sub partitioned:
> 
>       wd0a | wd1a     OpenBSD installations with RAID kernel.
>       wd0e | wd1e     raid0
> 
>               raid0a          /
>               raid0b          swap
>               raid0e          /tmp
>               raid0f          /var
>               raid0g          /usr

That depends on what you want to do, and what requirements you have.

RAID takes a very long time to get back online when it gets out of sync
(i.e. kernel panic, power failure, and similar nice things). Also, RAID
doesn't really protect you from rm -rf /.

I've been using altroot (and altusr, and so on - only altroot is in the
base system, but it is trivially copied-and-pasted to support other
filesystems) for the more-or-less static data on my system. It is as
reliable as RAID (real-time mirroring is *really* unnecessary for
/usr!), much faster to come up after the power gets cut, and disaster is
easily recovered from by changing two lines in /etc/fstab (switching the
copy and the working version).

Of course, this becomes a much less valid point if backups of the system
are easily available, and in fact, the above system is only in place on
systems that are either the central backup host or that I anticipate not
being able to connect to the central backup host at some critical times.

RAID does have something to offer in performance, but it was really nice
to be able to get the system up in no more than 10 minutes after an rm
-rf / (^C! ^C!) [1], most of which was spent trying to figure out just
what had been shot and how to bring up the backup system.

Anyway, just a pointer to a different tack on the same goal.

And, as yet another pointer, you will want to keep at least some of the
data you inevitably move on the system on separate partitions. Since the
default kernel does not accept more than four RAID arrays, you'll have
to go hybrid anyway, so you might as well go with #2 (believe me, one of
my systems is running such a hybrid setup right now, and it works fine
but doesn't look too pretty. Which seems to be pretty much the only real
difference.)

                Joachim

[1] Actually, rdist gone on a rampage. It did teach me the virtues of
-overify, and slow network links to at least a significant portion of
your systems - most were unharmed.

Reply via email to