Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jun 2012 13:19:10 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        Fred Morcos <fred.morcos@gmail.com>
Cc:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, freebsd-questions@FreeBSD.org, Walter Hurry <walterhurry@gmail.com>
Subject:   Re: New to FreeBSD - Some questions
Message-ID:  <4FE3113E.6080104@FreeBSD.org>
In-Reply-To: <CAH3a3KUWc_a_8Ts8m2VHEYx5TNoGKGv_zCgMxhRkPbC9wvziaQ@mail.gmail.com>
References:  <CAH3a3KWEik7nViy2VDBka-a7X9Ew-NrFrW5hPQMT1d2UgGLpzA@mail.gmail.com> <jrt7n5$3js$2@dough.gmane.org> <alpine.BSF.2.00.1206202155100.2866@wojtek.tensor.gdynia.pl> <CAH3a3KUWc_a_8Ts8m2VHEYx5TNoGKGv_zCgMxhRkPbC9wvziaQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigFF65FD3C0D423367ABD5D1AA
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 21/06/2012 12:24, Fred Morcos wrote:
> q) I am currently considering 3 disks for a home micro-server, with
> ZFS striping with the third disk being a parity disk. In case I decide
> to buy a fourth disk in the future and add it to the pool, is ZFS
> capable of re-structuring the data on-the-fly to have 2 sets of
> striping (without parity, so 2 disks each) and on top of that a
> mirror? Analogous to the following:
>=20
> +-------------------------------+
> |    Stripe2 mirrors Stripe1    |
> +---------------+---------------+
> |    Stripe1    |    Stripe2    |
> +-------+-------+-------+-------+
> | Disk1 | Disk2 | Disk3 | Disk4 |
> +-------+-------+-------+-------+

Just picking one of your questions arbitrarily -- not that there's
anything wrong with the others, but this I had to comment on.

And the comment is:

    Don't do it like that.

viz.  Don't mirror the stripes: stripe the mirrors instead.

+-------------------------------+
|            Stripe             |
+---------------+---------------+
|    Mirror1    |    Mirror2    |
+-------+-------+-------+-------+
| Disk1 | Disk2 | Disk3 | Disk4 |
+-------+-------+-------+-------+

Why this way?  Well, consider what happens if one of your disks fails.

With your original plan (RAID0+1):

A failed disk in a stripe immediately takes the whole stripe out of
action, so you're left operating on only two drives and you have no
resilience to further failures.

With my plan (RAID10):

A failed drive means you lose resilience in one of the mirrors -- the
other mirror can carry on as usual, and you will still be making full
use of all the remaining drives.

It's also faster to recover when you replace the failed drive -- you
only have to resilver one disk's worth.

Now, your actual question: can you convert a RAIDz (which is what I
assume you mean by "with the third disk being a parity disk") to a
RAID10 transparently?  No.  You can add another vdev (ie. a disk,
mirrored pair or RAIDz group) to expand the size, but you can't
radically rearrange the devices in your zpool without manual intervention=
=2E

What you can do is: add your new disk to the system, and remove one
drive from your RAIDz (so the RAIDz is running in degraded mode).  You
can create a new zpool from those two disks -- temporarily as a RAID0
stripe across the pair.  You can then do 'zfs send' | 'zfs receive'
to copy your filesystem contents over to the new zpool.  Reboot so the
system is running live on the new zpool, destroy the old zpool and then
insert those drives into the new zpool so they mirror drives already ther=
e.

That's a lot of copying stuff around, and all the while you won't have
any resilience against disk failure.  Plenty of scope for disastrous
errors.  Make sure you have very good backups.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




--------------enigFF65FD3C0D423367ABD5D1AA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/jET4ACgkQ8Mjk52CukIxjNQCgkkBg8DL7IIfePT21TvtQ91cr
ZGkAn2H/AOiOlRJ72aS40UcOYXcnKMCh
=T6Y7
-----END PGP SIGNATURE-----

--------------enigFF65FD3C0D423367ABD5D1AA--



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