I am running 2 FreeNAS boxes (let's call them A and B).

A is the production server which contains multiple datasets on mirrored/striped ZFS volumes for sharing via cifs, nfs, etc. A is configured to create snapshots for its datasets, most of them are created hourly and live somewhere between 3 days and 2 months. A replication task is created for each dataset to store it on server B.

B is the backup server which has a bit more storage due to a striped/RAID-Z2 configuration. B is setup to create additional snapshots on the replicated datasets with a larger interval and a longer lifetime (e.g. 3 months for all datasets).

Unfortunately the new snapshots created by B disappear after a while - I guess it is a replication task which cleans up the replicated snapshots and (by accident?) deletes also B's snapshots.

My first idea was to handle snapshot cleanup on B by myself (e.g. via cron job) but I was not able to stop deletion of snapshots at all. Even though I disabled "Delete stale snapshots on remote system" in A's replication task, old snapshots are still removed.

The FreeNAS version is 9.10-STABLE-201604111739

I saw this bug https://bugs.freenas.org/issues/12692 which describes a similar problem - but according to the corresponding revisions the fix should already be available in my FreeNAS version.

So, which task/script/process deletes my snapshots?

Thanks, Florian


I built a test setup using 2 virtualboxes to recreate the scenario above.

I found out that the "Delete stale snapshots on remote system" feature actually works - but as soon as I add an additional snapshot task on B, this task removes the stale snapshots itself. Not sure if this is intended behavior...

Now I have to find out why B's snapshots are deleted.

  • Still happens. At least now I know that replication/snapshotting should run in different time-slots - a B snapshot created at the wrong time led to a permanently failing A replication. Nevertheless B snapshots are still deleted without any trace.... Nothing verbose in /var/log/messages. – trapperjohn Mar 13 '17 at 8:09
  • I guess snapshotting on the "pull" side is a no-go because it is seen as a dataset modification for ZFS's send which needs to be rollbacked first. Need to find a different solution - maybe disable snapshots on B and and run cron-controlled ZFS send into local files ... – trapperjohn Mar 13 '17 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.