Btrfs snapshot management

Summary
Improve snapshot retention options to reduce excessive snapshot accumulation.

Problem

  • Reboot snapshots accumulate quickly as one will be generated after each automatic update where reboot is required.
  • Software installation snapshots may only be disabled or enabled.

I have read that retaining many snapshots may create performance problems for the system. It seems to me that the optimum number would be more than zero and less than too-many. Software install and reboot snapshots add up fast and may be taking users into the ‘too-many’ category.

Solution
Create retention periods applicable to reboot and software installation snapshots.
Perhaps these types of snapshots could use existing snapshot retention rules for timeline. Some dialog options could look like this…

Reboot Snapshots

  • Retain using timeline rules
  • Retain as Hourly, Daily, Weekly, Monthly, Yearly (Pick one)
  • Custom retention interval (Select # of days to retain reboot snapshots)
  • Do not remove automatically

Software Installation Snapshots

  • Retain using timeline rules
  • Retain as Hourly, Daily, Weekly, Monthly, Yearly (Pick one)
  • Custom retention interval (Select # of days to retain reboot snapshots)
  • Do not remove automatically

Current State
A user may select individual snapshots to remove in the Storage Snapshots app. There is no automation for removal of reboot and software installation triggered snapshots.