I think the problem is in this code that is in the apt_btrfs_snapshot
Python module:
def _get_supported_btrfs_root_fstab_entry(self):
""" return the supported btrfs root FstabEntry or None """
for entry in self.fstab:
if (
entry.mountpoint == "/" and
entry.fstype == "btrfs" and
"subvol=@" in entry.options):
return entry
It will only allow APT BTRFS snapshots if the root file system is
mounted from a subvol whose name starts with `@`. On my system the root
subvolume is mounted with an absolute path as `/@root`, so it fails.
I'm not even sure what is the purpose of that code - I think it is meant
to support the `create_btrfs_root_snapshot` that hardcodes the source
subvolume name as `@` - but it can't work because `_get_supported...` is
doing an substring search so it will just match anything that starts
with `@` (such as `@root`) and then it will fail in the snapshot
creation with the error from `btrfs subvolume snapshot`:
ERROR: Could not statfs: No such file or directory
The correct way to handle this is to stop matching on the subvol name
and just approve any fstab entry for / that is a BTRFS with a subvol,
and then `create_btrfs_root_snapshot` should then call `_get_supported`
again to find the real subvol name.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2064274
Title:
24.04 The system does not support apt-btrfs-snapshot
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt-btrfs-snapshot/+bug/2064274/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs