bdrewery / zfstools

Various ZFS scripts. Most notably, zfs-auto-snapshot, a ruby clone of OpenSolaris auto snapshotting
Other
141 stars 28 forks source link

Support written property for avoiding needless snapshots #30

Open bdrewery opened 9 years ago

bdrewery commented 9 years ago

https://www.illumos.org/issues/1645

bdrewery commented 9 years ago

This is tricky. Checking dataset:written would work as long as there's no manual snapshots. Any manual snapshots would make the assumption of trusting written > 0 wrong. It would need to check the written property on the last snapshot created by itself. This could result in a used == 0 case that ends up getting deleted though.