Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2009 11:55:01 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Rolf Nielsen <listreader@lazlarlyricon.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ZFS pools of consisting of several mirrors
Message-ID:  <20091201175500.GN89004@dan.emsphone.com>
In-Reply-To: <4B155562.30109@lazlarlyricon.com>
References:  <4B155562.30109@lazlarlyricon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Dec 01), Rolf Nielsen said:
> In experimenting a bit with ZFS, I, among other things, tried something
> like this
> 
> zpool create -R /test test mirror file[01]0 mirror file[01]1 mirror 
> file[01]2 mirror file[01]3 mirror file[01]4 mirror file[01]5
> 
> This, according to zpool status, gives me a (file backed) pool consisting
> of six mirrors, each mirror consisting of two files.  Now for my question. 
> Exactly how is the pool built?  Is it...
> 
> 1. A RAID0 of the six mirrors?
> 
> 2. A mirror of two RAID0 arrays, each array consisting of the six files 
> file0[0-5] and file1[0-5] respectively?
> 
> 3 and 4. Like 1 and 2 above, but with JBOD instead of RAID0?
> 
> 5. Some other way I haven't thought about?
>
> I guess it's 1 or 3, as the zpool status output shows me six mirrors, 
> but which is it? And, provided my guess is correct, is there a way to 
> implement 2 or 4 without involving geom_stripe or geom_concat?

It's 1/3/5.  Each mirror is independant, and writes are balanced across the
mirrors based on space usage.  If you add another mirror to grow the pool,
it will get most of the writes until the usages balance out.

You usually don't want to build an array with options 2 or 4, since a single
drive failure will degrade the entire mirror half.  Consider if you have 

concat00 -> file01 file02 file03 file04 file05
concat01 -> file11 file12 file13 file14 file15
mirror0 -> concat0 concat1

If file01 fails, concat00 fails, causing mirror0 to become degraded.  When
you replace file01, mirror0 will have to resynch all of concat00 from
concat01 since it doesn't know about the subdevices.  If you don't replace
file01, and then file15 fails, you have lost your entire volume (unless you
do some hackery to swap file05 and file15 to create a functioning concat01).

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091201175500.GN89004>