Am I totally misunderstanding the mechanics of how Snapshots work?

For a long while I’ve been getting this email alert…


…saying that a snapshot of General/Entertainment/PicsAndVids could not be created because it already exists. I’ve been so busy for the past two months that I haven’t had time to do anything about it, though from what I have had the time to read, and based on the logs I’ve checked, this may not be a worrisome error. But now I have the time to fix it, so that’s what I’m trying to do.

Now, based on this forum post from the old forums, you can’t have two snapshots created of the same dataset at the same time. That makes sense to me, but this is where I get confused.

Based on this…


…I don’t think that I do have duplicated snapshots running at the same time (and I also have a similar setup for other datasets that do not throw errors), nor do I have a replication task running at the same time:

Furthermore, the replication task provided in the first two screenshots is set to run at 3am on Sundays and Wednesdays, but if I look at the stored snapshots for that dataset, they seem to be taken every hour.

What am I misunderstanding here about how snapshots work, how do I fix the error, and how can I make the snapshots/replication tasks run more smoothly in the future?

This error can also happen during daylight savings, when time appears to rewind and TrueNAS is not smart enough to deal with it.

It can also be mitigated by using different naming schemes for different tiers of your snapshot hierarchy… as I documented in this video

5 Likes

It is simple. You have the parent Dataset “General/Entertainment” create recursive snapshots, which impact the child Dataset “General/Entertainment/PicsAndVids”. But your child Dataset snapshots use the same naming convention as the recursive parent snapshots.

Not sure why you don’t see a similar error with the other duplicates, like “General/Audio”.

Easily solved as @Stux said, use a different naming schema. For example, the one failing runs twice a week, so “auto-2weekly” or some such prefix name.

The desktop I am using right now, has 2 sets of ZFS snapshots for my home Dataset:

rpool/home@dow_X
rpool/home@hod_XX

Where “dow” is Day Of Week, 0-6. And “hod” is Hour Of Day, 00-23. In my case, they automatically remove old before creating new. Simpler management for me.

3 Likes