Does the Replication overwrite newer snapshots?

Suthern

Cadet
Joined
Dec 14, 2019
Messages
2
Simple question. I have two machines, (A) and (B).

(A) is the primary share, so I have a Replication task setup to copy it to host (B), snapshots on the hour.

My question is thus: If (A) goes down for some reason, so I switch to using host (B), then (A) boots back up after (B) has created some snapshots, will host (A, original host) still send snapshots to (B) even with no changes, overwriting or messing up newer changes on (B)?

Thanks!
 

mroptman

Dabbler
Joined
Dec 2, 2019
Messages
23
Replication tasks are one-direction.

If you replicate datasets from machine (A) -> machine (B), then machine (B) will have the replicated datasets in read-only mode for data protection.

If you intend to failover to machine (B) because machine (A) is down, then you will need to clone the replicated snapshots on machine (B) to new datasets, setup security, shares, tunables, etc. Once the new datasets are machine (B) are cloned, the snapshot you used to make the cloned dataset(s) become locked, because these would be your 'starting points' on machine (B). You could then continue to use machine (B) as you would.

Data loss expected is anything from machine (A) that changed after the last fully replicated snapshot arrived on machine (B).

If/when machine (A) is brought back online and deemed fit for service, follow the above steps but machine (A) is now the replication target and machine (B) your replication source.

References:
https://www.ixsystems.com/documentation/freenas/11.2-U7/storage.html#snapshots
https://www.ixsystems.com/documentation/freenas/11.2-U7/tasks.html#replication-tasks

Assumptions:

machine (A) and machine (B) are running on commodity hardware, because you didn't specify otherwise.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I would not use failover in this manner for the simple reason you can't guaranty all the data from host A will be made available on host B, simply because you might have written data on host A but snapshot leading to replication would not have been initiated yet.
Then the problem comes from synchronizing host B to host A and the answer you will get from host A is that the snapshot it is trying to receive doesn't belong to the same filesystem because new data might have been written to host A after the last snapshot was replicated to host B.


What you really need is a true failover and this should be handled by rsync and other failover server management tool.
This is the area for iXsystem at this point, unless soemone has implemented this process already.
 

Suthern

Cadet
Joined
Dec 14, 2019
Messages
2
@mroptman thank you for that detailed explanation! We actually run a couple small service companies with ~20 or so office users, so losing an hour's worth of work on only the shared drive because of some kind of failure, is a fairly acceptable tradeoff, as long as the new share is up and workable quite quickly.

@Apollo Yes, data created on host after the final snapshot would be lost, which then would then possibly cause restoration issues if I shared directly from the target dataset instead of sharing from a clone of it as @mroptman suggested.

I'll look into using rsync for this usecase instead.

Thanks again to both of you!
 
Top