2

After running updates on Ubuntu I receive a warning about my ZFS filesystem. Is there a utility or script I can use to remove old snapshots? Below is the message:

ERROR couldn't save system state: Minimum free space to take a snapshot and preserve ZFS performance is 20%.
Free space on pool "rpool" is 10%.
Please remove some states manually to free up space.
Daniel
  • 23

1 Answers1

2

Use zfs-prune-snapshots, described as:

Remove snapshots from one or more zpools that match given criteria

An example from the docs:

Remove snapshots older than a week across all zpools

zfs-prune-snapshots 1w

Same as above, but with increased verbosity and without actually deleting any snapshots (dry-run)

zfs-prune-snapshots -vn 1w

You may find more methods in the post How to delete all but last [n] ZFS snapshots?

harrymc
  • 480,290