New to FreeBSD - Some questions

Matthew Seaman matthew at
Thu Jun 21 12:19:15 UTC 2012

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:
> +-------------------------------+
> |    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.

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 there.

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.



Dr Matthew J Seaman MA, D.Phil.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list