# expanding RAIDZ2



## Migelo (Jan 19, 2013)

Hi!

I'm totally confused by the information on the internet so I'm writing here to clear some things up.

Is it possible to add another 2TB drive to an existing RAIDZ2 pool (made of 6x2TB) and have the zpool's size increase by those 2TB while keeping the redundancy and ensuring the new drive also has redundancy?

Thanks for the info!


----------



## Crest (Jan 19, 2013)

In short: NO.

Longer version: You probably read about the "magical block pointer rewrite" in some former SUN dev blogs. It's the feature that would be required to implement this. ZFS is a COW (Copy-On-Write) filesystem so live data is never overwritten (except the Ã¼berblock living in a ring-buffer). To extend the stripe size live data would have to be rewritten (copied) along a barrier. So far their is no code implementing this idea. You can only extend a ZFS pool by adding more VDEVs e.g. an other six 2TB disks or by destroying and recreating the pool.


----------



## Migelo (Jan 19, 2013)

What I was afraid off. 

Seems I made a huge mistake not asking this BEFORE going the ZFS route. I got confused...

But now, after thinking it over and over again, it's not that big of a hassle. All other SW raid implementations don't offer the reliability and data integrity of ZFS. The only thing is the financial aspect of buying 6x2TB disks at once, to expand and the fact that I'll always use 1/3 of the drives for parity. 

HW raid was never in question because of the green disks I'm using, so all in all ZFS is still the way to go. (just comforting myself xD)

Here's to the unlikely event in which the "magical block pointer rewrite" gets implemented and one can have a more flexible ZFS.


----------



## KdeBruin (Jan 21, 2013)

You could also replace with 6x3TB disks and sell the 6x2TB disks. You can one by one replace a 2TB disk with a 3TB disk and after all disks are replaced you end up with about 4TB of additional space.


----------



## Sfynx (Jan 21, 2013)

AFAIK 6 disks is better with raidz2 instead of 7 anyway because of the inability to have evenly divided stripes using a 7-disk (5-data, 2-parity) configuration.


----------



## wblock@ (Jan 21, 2013)

Make sure the pool autoexpand property is enabled before changing disks.  See
`% man zpool | less -pautoexpand`


----------



## KdeBruin (Jan 23, 2013)

Thanks wblock@, I forgot to mention this in my reply.


----------



## Migelo (Jan 24, 2013)

I'll leave as it is for now. Thanks again for all the useful info!


----------

