Can I enable snapshot_count retrospectively, to help me work around the shapshot count limit bug in ZFS?

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Apparently there's a bug in OpenZFS I've stumbled across, not fixed yet, that affects replication (zfs send -R pool_or_dataset) when theres over 64K snapshots in the stream. With more than that many snaps, zfs send -R errors out with an error message about "holds", and won't send, you have to send the snaps in batches of <64K a time, incrementally, to work around it.

Its not a big problem because it's got an easy workaround, but it makes me think, I want to monitor the number of snaps in my datasets anyway. ZFS can do that (zfs property: snapshot_count) but it won't do that unless snapshot_limit is set on that dataset or some parent/ancestor dataset, in the pool.

I don't want a limit, but I could happily set a very large limit if it gets me that information. So I've experimented, and found that zfs will let me set snapshot_limit = some arbitrary extremely large number (10 million+), and then it does indeed report under "zfs get all", that the limit is 10M and tells me the current dataset count for each dataset. Apparent big win!

Is there any issue, drawback or risk of inaccuracy/problem, doing this, or is it a good workaround to get snapshot counts of datasets?
 
Top