Podman with ZFS support
Rootfull installation
Prepare filesystem
sudo zfs create -o mountpoint=/var/lib/containers/storage mypool/podman-root
sudo zfs create -o mountpoint=/var/lib/containers/storage/volumes mypool/podman-volumes
Configure snapshots
sudo zfs set com.sun:auto-snapshot=false mypool/podman-root
sudo zfs set com.sun:auto-snapshot=true mypool/podman-volumes
Configure Podman to use ZFS driver
sudo vim /etc/containers/storage.conf
[storage]
driver = "zfs"
[storage.options.zfs]
fsname = "mypool/podman-root"
mountopt = "nodev"
Rootless instalation
Prepare filesystem
sudo zfs create -o mountpoint=/var/lib/containers/storage mypool/podman-rootfull
sudo zfs create -o mountpoint=/home mypool/podman-rootless
Configure snapshots
sudo zfs set com.sun:auto-snapshot=false mypool/podman-rootfull
sudo zfs set com.sun:auto-snapshot=true mypool/podman-rootless
Configure Podman to use ZFS driver
sudo vim /etc/containers/storage.conf
[storage]
driver = "zfs"
[storage.options.zfs]
fsname = "mypool/podman-rootfull"
mountopt = "nodev"
vim ~/.config/containers/storage.conf
[storage]
driver = "overlay"
[storage.options.overlay]
force_mask = "private"
mount_program = "/usr/bin/fuse-overlayfs"
mountopt = "nodev"
Install Podman
I let you search how to do it under your favorite Linux distribution 😜
Here are packages I needed to add on Debian 11 :
- rootfull mode:
podman
- rootless mode:
podman
,fuse-overlayfs
,uidmap
,slirp4netns