Zfs snapshots not deleted

Hi, I’ve setup snapshots for my dataset every 5 minutes, between specific hours (9AM to 10PM). I have setup truenas to keep them for 4 hours. The snapshot task is running ok, snapshots are created every 5 mins and deleted after 4 hours.

Problem is with the snapshots that should be deleted after 10AM, i.e all snapshots created after 6PM. These are not deleted.

This is the first day I run this snapshot task, so my guess is that since it got past 10PM, the task is stopped, thus these snapshots will be deleted tomorrow, when the task runs again.

Am I right?

Because zettarepl (for this task) is not being executed after 10PM, so there’s no program that runs to check for (and destroy) expired snapshots.

You’ll have to wait until the next run (9AM the following day) for the expired snapshots to start being pruned again.

This user understands. :point_down:

1 Like

Ok, thanks for the confirmation. I suppose this is by design and there’s no point in reporting this.

Well, now I came across a snapshot from the same snapshot task and dataset that I cannot explain why it’s not been deleted yet…

Some screenshots…


As you see the hourly snapshot task (which actually takes snapshots every 5 mins, between 9:00 to 22:00) everyday, is active and runs right now. Yet, one snapshot from this task is still there.

Doesn’t make sense to me. (My local time is 13:20 2024-06-23 now)

EDIT: I just found a bug in the display of the “Last Run” in the 1st screenshot for my “every 5 mins” snapshot task. When the task is about to run in 1 min, the Last Run says “in 1 min.” instead of “4 mins ago”. This is a bug in that screen only, as the task actually runs fine every 5 mins.