Replicate all zvols

RSDriver

Cadet
Joined
Jan 16, 2024
Messages
3
Doing some testing with freenas replication.

Trying to understand how to setup a replication task to replicate a full pool with all zvols without having to select each zvol individually.

As I add new zvols I don't want to have to select each zvol for replication. I just want the entire pool.

The "Recursive" option seems specific to snapshots and not the zvols themselves.

I have to be missing something?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The "Recursive" option seems specific to snapshots
That's because you can only replicate snapshots (how would you replicate live data without stopping everything?), but that doesn't mean at all that you can't do what you're trying to do. You'd be replicating snapshots of the zvols.

Do note that it's better to place your zvols in a parent dataset, so that you don't have to do thing like replicate the whole pool.
 

RSDriver

Cadet
Joined
Jan 16, 2024
Messages
3
That's because you can only replicate snapshots (how would you replicate live data without stopping everything?), but that doesn't mean at all that you can't do what you're trying to do. You'd be replicating snapshots of the zvols.

Do note that it's better to place your zvols in a parent dataset, so that you don't have to do thing like replicate the whole pool.

Yes of course, just seems like a odd way of doing things. I am coming from more enterprise type hardware Nimble/Alletra/Netapp etc. Just a different approach in general.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Adding to @Ericloewe's advice: you can move the zvols into a dataset after the fact by "rename":

Code:
zfs create <pool>/volumes
zfs rename <pool>/<zvol> <pool>/volumes/<zvol>


Then recursively snapshot and replicate the "volumes" dataset. That will pick up any new zvols you create in the future.
 

RSDriver

Cadet
Joined
Jan 16, 2024
Messages
3
Adding to @Ericloewe's advice: you can move the zvols into a dataset after the fact by "rename":

Code:
zfs create <pool>/volumes
zfs rename <pool>/<zvol> <pool>/volumes/<zvol>


Then recursively snapshot and replicate the "volumes" dataset. That will pick up any new zvols you create in the future.

Appreciate the clarification, I think I get it now. Appreciate the input all.
 
Top