Best way to add a new drive to a pool (backup to a remote)

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
Hi!

I have a 4x14TB RAIDz2 pool and want to add an additional 14TB drive. I know you can't add a drive to an existing pool, that why I'm backing up up all my data to a remote server (at 70MB/s so it's going to take around 4 days).
The remote server doens't run ZFS, so I'm using rsync to copy the data.

The problem I'm facing is when I recreate the pool, what's the best way to recreate the datasets, permissions, shares etc? Do I have to do it manually?

The workflow is the following:
1) Rsync all the /mnt/pool/datasets to /remote/datasets
2) Delete the current pool
3) Create a new pool with the new disk, 5x14TB RAIDz2
4) Create all the datasets in the pool again
5) Copy back the data into the datasets
6) Configure the permissions
7) Configure the shares

My question is if there is a way to backup/import steps 4, 6 and 7 to be sure I don't miss anything.

Would clients like mac and windows machines detect the new shares plug and play if the name/credentials/IP etc is the same?

PD: The pool also has a SSD as a L2arc if that matters, I would guess it doens't, just add the disk as "cache" type.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Interesting question.

If you have confidence in your backup, then you can wipe all the files in the pool. Then perform a ZFS Send to a file, saved outside of the pool. Destroy and re-create the pool with the additional disk. Then restore the datasets.

The devil is in the details. You might have to use the GUI to export the pool first. Then perform an import & ZFS Send from the command line, (just so the GUI does not get confused). Export from the command line. Then import from the GUI to destroy the pool and make a new one. Then export blank / empty pool from GUI so you can import from the command line and ZFS Receive.

Complicated. Not sure if it will restore all your permissions... but it would restore the datasets and any zVols.
 
Top