Some years back I created a Time Machine dataset using the “Multi-user Time Machine” SMB preset. It’s been working really well. But recently I’ve noticed the dataset has significantly grown, and I realised I failed to set a dataset quota when I created it.
Knowing that Time Machine will free up space by pruning old backups when it approaches full capacity, I figured I’d just set a quota limit and let it fix itself.
Sure enough, after setting the quota (not much bigger than the space it already has) Time Machine went through its “freeing space” process. But then when the subsequent backup occurred, it failed with “Insufficient Space”.
On inspection, the “data written” was smaller, but the “Space Available” had not changed. And the reason is snapshots.
Time Machine smbd service creates 7 days of snapshots. On my Truenas that’s about 60+ snapshots. The snapshots are there so you can roll back if Time Machine process fails and corrupts the sparse bundle. You can just fix it by rolling back to a working snapshot. Given the erratic problems I’ve had with Time Machine, this is a good thing!
The problem is that although Time Machine frees up space, its not released because its held by the snapshots, and the dataset quota includes the snapshot data.
So now I’m in this Catch-22 situation where Time Machine keeps trying to free up space, but snapshots a retaining the space…. Subsequent backup fails with no space. And its going to be 7 days before those snapshots are deleted… That’s 7 days of no backups.
I’ve overcome the problem for now by playing around with the quota and deleting a bunch of snapshots.
So my question is if this is a problem because I didn’t set quotas from the beginning, or is there an inherent conflict here between the way Time Machine works (i.e freeing space), and Truenas setup (i.e snapshots).