Describe the bug
After upgrading to Lunar, I noticed the garbage collector being unable to clean up old states due to the dataset is busy error.
Somehow new states snapshots get automatically mounted under /root/.zfs/snapshot, so the garbage collector cannot do its job until I manually umount them. I don't believe this was the case in Kinetic.
Quick workaround:
$ awk '/autozsys/ {print "sudo umount "$1}' /proc/mounts
$ # if happy, pipe the above to sh
$ zsysctl service gc -v
To Reproduce
root@laptop:~# zsysctl state save -s
ZSys is adding automatic system snapshot to GRUB menu
Successfully saved as "autozsys_felpum"
root@laptop:~# zsysctl state remove -s felpum
ERROR couldn't remove system state felpum: Couldn't remove state rpool/ROOT/ubuntu_y3atsu@autozsys_felpum: Couldn't destroy rpool/ROOT/ubuntu_y3atsu@autozsys_felpum: couldn't destroy "rpool/ROOT/ubuntu_y3atsu@autozsys_felpum" and its children: cannot destroy dataset "rpool/ROOT/ubuntu_y3atsu@autozsys_felpum": dataset is busy
root@laptop:~# mount | grep felpum
rpool/ROOT/ubuntu_y3atsu@autozsys_felpum on /root/.zfs/snapshot/autozsys_felpum type zfs (ro,relatime,xattr,posixacl)
root@laptop:~# umount rpool/ROOT/ubuntu_y3atsu@autozsys_felpum
root@laptop:~# zsysctl state remove -s felpum
ZSys is adding automatic system snapshot to GRUB menu
Installed versions:
- OS: 23.04 (Lunar Lobster)
- Zsysd running version:
zsysctl 0.5.9
zsysd 0.5.9
Describe the bug
After upgrading to Lunar, I noticed the garbage collector being unable to clean up old states due to the
dataset is busyerror.Somehow new states snapshots get automatically mounted under
/root/.zfs/snapshot, so the garbage collector cannot do its job until I manually umount them. I don't believe this was the case in Kinetic.Quick workaround:
To Reproduce
Installed versions: