Retention time for replicated snapshots - Why are replicated snapshots apparently deleted?

deepblue1968

Cadet
Joined
May 16, 2017
Messages
5
Dear Gurus,

is there any "secret" to control the retention time of replicated snapshots?

I have a setup of two FreeNAS filers: the primary filer is serving file shares, the secondary filer used to store replicated snapshots.

I'm replicating 30 daily snapshots on a primary filer (20TB in 9x4TB WD Red in Raid-Z3) to a secondary filer (40 TB on 9x8TB WD Red in Raid-Z3), software version so far FreeNAS-11.3-U1 on both machines. To be precise, there is 1 single Disk Pool with 3 major Datasets (APPLE, UNIX and CIFS - to match the type of shares they are holding) and a number of minor Datasets within those three major. Daily (0 0 * * *) there are three Periodic (recursive) Snapshot Tasks, one for each of the major Datasets, resulting in the mentioned 30 individual Snapshots in total. There are 3 Replication Tasks to match those Snaphots and replicate to the secondary filer. Snapshot Lifetime is set to 1 month for APPLE and CIFS Datasets and 2 weeks for UNIX Datasets on the primary filer.

Everything seemed to work absolutely stable and flawlessly - I accumulated more than one year of daily snapshots on the secondary filer by now - which I could purge manually i.e. by month or year, should I run out of space (the second filer was configured twice the size of the primary by intention).

Today I noticed that only for CIFS and UNIX related Datasets more than 365 replicated snapshots are available. For the APPLE related Dataset snapshots there is only one month worth of snapshots on the secondary filer - so the same as on the primary.

I double checked that all snapshot and replication tasks are identical (with the one exception of 2 weeks retention for UNIX related Datasets mentioned above).
Everything else is configured exactly the same. I do not expect it has anything to do with the nature of data stored on those Datasets, since all this replication is happening "behind the scenes" on FreeNAS/ZFS Level.

Why are older generations of snapshots apparently deleted from the secondary filer after 1 month and others not?
What determines the "snapshot holding time" on the secodary filer and why is there deletion happening in the first place?
I must be missing a point here... could somebody kindly point me in the right direction?

Best regards,
Guido

P.S: I'm just upgrading to version FreeNAS-11.3-U5 ... to be on the latest version again.
 

deepblue1968

Cadet
Joined
May 16, 2017
Messages
5
I can answer my own question now: --- there is an option and it is *not* very secret!
In fact it is quite obvious, I just had not looked carefully enough.

The option who governs this behaviour is "Snapshot Retention Policy" in the Edit Replication Task Page.
This can be "Same as Source", "Custom" or "None".

For my Apple replication task this was set to "Same as Source" and for the rest to "None" - which explains the behaviour mentioned in my original post.

I now remember that I have on purpose changed that option to "None" for those Datasets / Replication Tasks, I must have overlooked to do the same for this specific task as well. One year ago I spend quite some time to build and configure the setup described above and it really took some effort get it all up and running, including a change from Raid-Z2 to Raid-Z3 on both filers (which seemed much more logical for 9 disks and obviously safer as well :smile: ) by replicating data back and forth between the two systems. After all those manipulations, I must have missed this one configuration item at the end.

I feel quite happy there is a simple explanation ("user error") for my case.
FreeNAS is working flawlessly, as mentioned above. The primary filer has been upgraded to FreeNAS-11.3-U5 already and I will do so with the secondary in a few days as well.

Currently I'm looking into TrueNAS 12.0 -U3. I have upgraded my test system already (a third filer with 5x 4TB) succesfully and without data loss.
What strikes me is the changes in the Encryption between FreeNAS 11 and TrueNAS 12. I have to better understand the implications and I'm busy reading the forums and watching youtube to see if what is the "recommended" way to upgrade --- especially when it comes to upgrading the Pool or not. I understand the difference between GEOM/disk encryption and Dataset encryption. I could totally live with the "legacy" encryption at this moment - so I wonder if there is anything else to consider during upgrade than *not* to upgrade the Pools, if you get my drift...
 
Top