Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxd not working with zfs 2.3.0 #14673

Open
rusher97 opened this issue Dec 17, 2024 · 6 comments
Open

lxd not working with zfs 2.3.0 #14673

rusher97 opened this issue Dec 17, 2024 · 6 comments
Labels
Improvement Improve to current situation
Milestone

Comments

@rusher97
Copy link

  • Distribution: Ubuntu
  • Distribution version: 22.04
    • Kernel version: 6.8.0-50
    • LXC version: 6.2
    • LXD version: 6.2
    • Storage backend in use: zfs 2.3.0

Issue description

lxc error: required tool zpool is missing
(zfs 2.3 comes with libzfs6 and libzpool6, zfs 2.2 comes with libzfs5 and libzpool5)

Steps to reproduce

  1. upgrade from zfs 2.2.7 to 2.3.0-rc4
  2. lxc start --all
  3. lxc error: required tool zpool is missing
@tomponline tomponline added the Improvement Improve to current situation label Dec 17, 2024
@tomponline tomponline added this to the lxd-6.3 milestone Dec 17, 2024
@tomponline
Copy link
Member

Is this using the LXD snap package? What does snap list show?

@tomponline
Copy link
Member

We need to add support ZFS 2.3 in the snap, like this:

https://github.com/canonical/lxd-pkg-snap/blob/latest-candidate/snapcraft.yaml#L1227-L1260

@simondeziel
Copy link
Member

  • Distribution: Ubuntu

    • Distribution version: 22.04

      • Kernel version: 6.8.0-50
      • LXC version: 6.2
      • LXD version: 6.2
      • Storage backend in use: zfs 2.3.0

This ZFS version isn't shipped in any official kernel I could find. Are you by any chance running with a DKMS built one?
If you are indeed using DKMS to get a bleeding edge version of ZFS, you might be interested in using the zfs/zpool tools from the host rather than those bundled in the snap.

To do that:

sudo snap set lxd zfs.external=true
sudo systemctl restart snap.lxd.daemon.service

@rusher97
Copy link
Author

Yes i use the lxd snap latest/stable. (6.2-afb00d0)
Indeed i build zfs from source and install it with dkms, so i can use the zfs version i want.
I will try to use zfs.external=true for now, thanks.

@Qubitium
Copy link

@rusher97 Another hackish way to do this is modifying META file in zfs rc4 direction and change version from 2.3.0 to 2.2.99 to fool lxd. Recompile and install. =)

@simondeziel
Copy link
Member

simondeziel commented Dec 19, 2024

@Qubitium as we are in hackish territory, another simpler way to fool LXD into using the 2.2 tooling when meeting a 2.3 module is probably this:

echo 2.2.99 > fake-zfs-version
sudo mount -o ro,bind fake-zfs-version /sys/module/zfs/version
sudo systemctl restart snap.lxd.daemon.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation
Projects
None yet
Development

No branches or pull requests

4 participants