zsys automatic snapshots just eat up all drive space and never get cleaned up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zsys (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
the zsys automatic zfs snapshots use up an incredible amount of disk space by snapshotting things they shouldn't on every package install (like user's home directories). as well, there seems to be no cleanup done whatsoever. a month or so after installing my new desktop, my 1TB SSD was down to ~9% disk space free. I ran `zsysctl service gc -a`, and nothing changed. I manually deleted all automatic snapshots, and I was back to 453 GB free.
I'm not sure what the intention of this behaviour is, but it doesn't seem configurable, and it seems absolutely broken on the face of it. Certainly unusable for any normal system usage.
Please correct zsys to have configurable snapshot settings, and have gc do... something. anything.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: zsys 0.4.7
ProcVersionSign
Uname: Linux 5.4.0-47-lowlatency x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27.8
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Thu Sep 17 00:49:54 2020
InstallationDate: Installed on 2020-07-15 (64 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
zfs-initramfs 0.8.3-1ubuntu12.4
zfsutils-linux 0.8.3-1ubuntu12.4
SourcePackage: zsys
UpgradeStatus: No upgrade log present (probably fresh install)
ZFSImportedPools:
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
bpool 1.88G 217M 1.66G - - 1% 11% 1.00x ONLINE -
rpool 920G 439G 481G - - 11% 47% 1.00x ONLINE -
ZFSListcache-bpool:
bpool /boot off on on off on off on off - none
bpool/BOOT none off on on off on off on off - none
bpool/
Thanks for reporting this bug and help making ubuntu better.
ZSys is supposed to take user snapshots at the same time than system snapshot. This is done on purpose, to ensure that a system revert will always revert you to a coherent state. You can have application data that changed format and upgraded your database. If we didn’t snapshot USERDATA, then, reverting the system will end up in, for instance, older thunderbird not being able to open the new database schema (it can’t know about it), and so, your system snapshot will be useless.
There is no point in snapshotting only the system thus. I suggest that you read this blog post which details that a little bit more: https:/ /didrocks. fr/2020/ 05/28/zfs- focus-on- ubuntu- 20.04-lts- zsys-general- principle- on-state- management/.
It seems though that you have a bunch of data generated/copied and then removed on your machine (0.5T?). The GC is by default kicking out everything that is more than one month old since 0.4.7, but if your threshold is higher I understand that cn be a bottleneck.
The good news is that this is configurable and explained at https:/ /didrocks. fr/2020/ 06/04/zfs- focus-on- ubuntu- 20.04-lts- zsys-state- collection/. Note that the default policy changed as stated above so that until free-space GC pressure is impemented, we mitigate extreme use cases like yours. /didrocks. fr/2020/ 06/16/zfs- focus-on- ubuntu- 20.04-lts- zsys-dataset- layout/
Another way is to consider using persistent datasets which will be excluded from snapshots as explained in https:/