ZFS Reorganize zpool

Hello together,

I use FreeBSD and ZFS with JBOD-Enclosure as a Backup Storage.

Currently my Setup has multiple raidz2 vdev's in my backup pool. Each RaidZ2 has 5 Disks.

My question is, how can detach/remove a vdev from pool without data loss? I want to reasign the free disks to the other vdev to get more space.
Currently I have 3+2 and I want to change it to 5+2.

Best ragards,
ARO
 
My question is, how can detach/remove a vdev from pool without data loss?
You can't. Once it's been added it cannot be removed.

I want to reasign the free disks to the other vdev to get more space.
There are no "free" disks because the data is spread out across all disks in the pool.
 
Hmm.. Now that you mention it, a RAID-Z2 vdev can't consist of only two disks. It needs a minimum of 4 (actually 3 but that just doesn't make sense). Unless he means it's 5 disks, of which 2 are for redundancy.
 
He mentioned that each RaidZ2 has 5 Disks. So, 3+2 makes sense. 5+2 using the same number of disks does not make sense though.
 
Hi,

Im mean that I have 5 Disks in one RaidZ2 vdev. With RaidZ2 I have a parity of two disks -> In total, the storage of two disks are loss for parity.

And I want to change it to 5+2. Seven Disks per RaidZ2 vdev.
 
Hi,

Im mean that I have 5 Disks in one RaidZ2 vdev. With RaidZ2 I have a parity of two disks -> In total, the storage of two disks are loss for parity.

And I want to change it to 5+2. Seven Disks per RaidZ2 vdev.
The only way to do that is by adding 2 more disks in each vdev.
I don't understand your initial question about "free" disks.
 
If you want to change your pool from a 5 disk RAID-Z2 to a 7 disk RAID-Z2 you're going to have to backup the data, destroy the pool, create a new pool with 7 disks and restore your backups. There's no way you can "add" 2 disks to an existing RAID-Z2 vdev.
 
If you want to change your pool from a 5 disk RAID-Z2 to a 7 disk RAID-Z2 you're going to have to backup the data, destroy the pool, create a new pool with 7 disks and restore your backups. There's no way you can "add" 2 disks to an existing RAID-Z2 vdev.
Sorry I confused it. I meant to say add another vdev
 
Hello,

On mirror and stripe arrays you can add more disks and extend either the space or the fault tolerance.

However on raid-z and raid-z2 which are similar to raid5 and raid6 there is specific amount of space dedicated for parity on each disk. Usable space, parity space and the parity data itself is calculated by the number of the disks in the array.

Which means you can't change the disk number online because it would affect the configuration of the array and the data structures.
You have to destroy the array (pool) and create a new one configured with the new number of disks.

What I think you can do is mirror the 2 new disks and zfs add them to the pool. By doing this you will have raid-z2 striped with a mirror.
 
What I think you can do is mirror the 2 new disks and zfs add them to the pool. By doing this you will have raid-z2 striped with a mirror.

You shouldn't mix different types of vdevs into a pool. Different configurations have different fault tolerances, and putting a lot of resources into a high-tolerance vdev, only to stripe it with a vdev with significantly lower fault tolerance, isn't worth it.
 
You shouldn't mix different types of vdevs into a pool. Different configurations have different fault tolerances, and putting a lot of resources into a high-tolerance vdev, only to stripe it with a vdev with significantly lower fault tolerance, isn't worth it.

True, I completely agree that this way you are drastically lowing the fault tolerance of the array, but this is the only way I can figure to use the additional disks without destroying the pool.
Of course if you can get more disks to either migrate your data to a new array, or stripe your current configuration with another array with the same fault tolerance level it will be best.

And just a friendly advice if I may - you should think of using RAID10(zfs striped mirror). Such expand issues you are facing are very easy handled by RAID 10. It can provide better performance and I think it has almost the same fault tolerance. You will lose very little disk space but it's definitely worth it.
 
Since you can't do raid10 with 7 disks I'll calculate it with 6.

Let's call 'n' the size of each disk and 'd' the number of disks then:

RAW size is 6n

raidz2 gives you usable space
nx6-2xn-(nx2x1/d) = 3.7n

And

raid10 gives you usable space
6xn/2 = 3n

So if you use raid10 instead of raidz2 with 6 disks you will lose 0.7 of the capacity of one disk.

Which is not exactly 50%
 
Back
Top