ZFS - Combine two mirrored pools

SLS

n00b
Joined
Dec 20, 2010
Messages
46
Hi All,
I have two existing mirrored pools with data on it. Lets call it pool A and pool B.
Pool A has disk1 and disk 2 while pool B has disk3 and disk4.
I would like to combine A and B into one pool (but keeping the 2 mirrors intact). Sadly you cannot just zpool add A B.

Would this do what I need, without data loss?

zpool add -n A mirror disk3 disk4
 
Last edited:
I'm pretty sure you can't do this. Your best bet: move all the data off pool B to pool A (or vice-versa). Destroy pool B, then do 'zpool add mirror poolA disk3 disk4'.
 
You can union them with mhddfs which will look like a single volume that can be mounted. They will remain separate zpools in zfs.
 
Suprised the ovious answer wasn't said, though it does remove some redundency.

Either do a zfs split, or detach one disk from pool B, add it to pool A. Copy data over. Add other pool B disk as mirror to the lonely pool A disk.

To get full redundency during this operation requires another disk, a backup (that we all know you have), or to leave it alone.
 
You can just create the ZFS equivalent of RAID1+0, which is a stripe of mirrors. This is destructive and will not keep intact your data, but it is a better choice to copy the data off and stick with straight zfs than to add another level of complexity on top of it

zpool create tank mirror disk1 disk2 mirror disk3 disk4
 
ugh, and introduce another layer of SW on top of ZFS? what could go wrong? :)

Nothing in 4 years? It just works and works well. 16TB of nonraid zfs pools on top of dmcrypt.

Full sw stack is dmcrypt ->zfs -> mhddfs -> samba.

Mhddfs is good for at least a GB/sec on my quad core ivybridge when tested on RAM backed loop back devices so no performance issues either.
 
Well good luck to you then... As far as some of the other comments, I thought the OP was trying to avoid copying. I like ZFS, but I've gotten sliced by some sharp edges when I wandered off the straight and narrow before...
 
Well good luck to you then... As far as some of the other comments, I thought the OP was trying to avoid copying. I like ZFS, but I've gotten sliced by some sharp edges when I wandered off the straight and narrow before...

I've had a few zfs bugs also, part of why I sent single disk per zpool and union with mhddfs. I don't have a need for the extra few hours of availability from raid and like simplicity. Backups are rsynced to a second set of disks.
 
Back
Top