SOLVED LOW PRIORITY - Is it possible to replace destination drives for snapshot replication and maintain replications?

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
Hello All,

I hope you're well.

Sorry to bother you all, but I have a small question.

I have 2 TrueNAS servers, No. 2 pulls replication snapshots from No. 1.

If I intend to replace the drive pool on No. 2, will I have to restart the replication from scratch? I have experimented but didn't have any success. I tried this method in part: https://www.truenas.com/community/threads/howto-migrate-data-from-one-pool-to-a-bigger-pool.40519/

So in summary, a pool that receives snapshots from another machine is having its drive arrangement changed, and I would like to avoid having to start the replication from scratch.

Many thanks,
Chris
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Does the destination pool have any redundandancy? If yes you can switch the drives one by one.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
If I intend to replace the drive pool on No. 2, will I have to restart the replication from scratch?

Depends on what you mean by "replace". If you are going to take a 4 drive RAIDZ2 and make it into a 6 drive RAIDZ2, then that implies you may be building a replacement POOL (changing the vdev), in which case, yes, that favors restarting the replication. There might be some opportunity to use the old pool as a replication start point, I've not done that though. If, instead, you were going to take a 4 drive RAIDZ2 of 8TB drives and replace them with 20TB drives, you merely need to replace drives one at a time on the target pool, resilver, and repeat until all drives are replaced. Since you are not actually changing the pool, this is pretty straightforward.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
And if you are replacing the pool, then if you can arrange it so, you can always do a local replication from one pool to the other.

The remote replication would be able to replicate to the new replica of the original replication!
 

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
Does the destination pool have any redundandancy? If yes you can switch the drives one by one.
Not on this occasion, usually though, yes.

I've not done that though.

Thank you @jgreco , very much appreciated. If you haven't chosen to look into it, I probably won't investigate further and just restart the replication. I thought it would have been nice, especially when there's a days worth of re-replication, but like you say, in a normal situation I would just upgrade each drive capacity one at a time.

Thanks to @Stux as well :smile:
 

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
Just a follow up and I appreciate I've marked this solved, but soon I will likely be changing a pool from mirrored to a RAIDZ1. It would be really nice if I didn't have to re-create snapshot schedules, network shares, etc. Any pointers on methods would be very gratefully received, it's a difficult situation to search for.
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
A change of geometry requires creating a new pool, and then migrating data from the old pool to the new pool. No change in place, and not much to research.
 

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
A change of geometry requires creating a new pool, and then migrating data from the old pool to the new pool. No change in place, and not much to research.
Would the snapshots continue to exist for the datasets contained within that pool? I thought that by duplicating all datasets to a new pool using a one off replication, I might lose those original snapshots, that would then put a stop on other machines that pull snapshots from that machine.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can easily replicate the current pool with all prior snapshots to the new one. And that being a local replication it would be faster than starting with the remote backup from scratch.
 

Bikerchris

Patron
Joined
Mar 22, 2020
Messages
210
You can easily replicate the current pool with all prior snapshots to the new one. And that being a local replication it would be faster than starting with the remote backup from scratch.
Thank you Patrick, I'll investigate further.
 
Top