Unable to get zfs working in container

erict206

Active Member
Dec 1, 2017
7
1
43
60
Proxmox 6 is installed using the default lvm/ext4 filesystem. Then I set up zpools on other disks.

I created an Ubuntu 20.04 container, and want the container to be able to access the zpools. When I try to install zfsutils-linux into Ubuntu, I get these errors:
Failed to initialize the libzfs library. zfs-mount.service: Failed with result 'exit-code'. Failed to start Mount ZFS filesystems.

Any suggestions on why this is happening or how to fix?
 
AFAIU this will hardly work, no matter if it's a privileged or unprivileged (then for sure not) container.

You can pass a path on the pool through to the container as bind mount ( https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_bind_mount_points ).

Passing through the disks to the container without mounting importing the pool on the host might (big maybe) work but even then I assume there will be some conflict between the kernel module that PVE ships and the one that the Ubuntu container wants to install. Keep in mind, a container is using the kernel of the host system.
 
@aaron, thank you for pointing this out to me. I starting setting up what I need as a KVM.

AFAIU this will hardly work, no matter if it's a privileged or unprivileged (then for sure not) container.

You can pass a path on the pool through to the container as bind mount ( https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_bind_mount_points ).

Passing through the disks to the container without mounting importing the pool on the host might (big maybe) work but even then I assume there will be some conflict between the kernel module that PVE ships and the one that the Ubuntu container wants to install. Keep in mind, a container is using the kernel of the host system.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!