Please share your 'clever' use of zfs snapshots / filesystems for stuff most people don't use.
I'll start with FreshPorts.
The HTML cache is stored on disk, in plain text files. If a port needs to be refreshed, those files are removed. All the files for one port are in a directory, matching the ports tree layout. Want to refresh sysutils/anvil? run:
rm ~freshports/cache/ports/sysutils/anvil
If a major change has occurred, and all ports need to be refreshed:
zfs rollback freshports/cache/ports@empty
I also have zfs filesystems containing a single 4K file.
What's your story?
@dvl I use them in jail provisioning:
$ zfs list -t snapshot zroot/jails/templates/15.1-RELEASE-amd64-amd64
NAME USED AVAIL REFER MOUNTPOINT
zroot/jails/templates/15.1-RELEASE-amd64-amd64@unpacked 120K - 350M -
zroot/jails/templates/15.1-RELEASE-amd64-amd64@verified 132K - 350M -
zroot/jails/templates/15.1-RELEASE-amd64-amd64@tweaked 0B - 611M -
zroot/jails/templates/15.1-RELEASE-amd64-amd64@ready 0B - 611M -
but the trick is that the ansible scripts check for the *directory* /jails/templates/15.1-RELEASE-amd64-amd64/.zfs/snapshot/ready/ to decide if they can skip a phase.
It makes the provisioning a lot faster, as mostly there's no work to be done, and avoids needing to shell out to a zfs command each time.
To patch the jails, I just rollback or destroy the templates, re-run ansible and everything is populated.