Hi! I’m using incus with zfs and I create multiple ZFS datasets for different data on the host filesystem.
I would like to bind mount these mountpoints of ZFS datasets to incus containers, but I can’t get it to work.
Here are the full steps:
-
On the host, I’ve created
tank
dataset and its nested datasets:zfs create -o canmount=off rpool/tank zfs create -o mountpoint=/mnt/tank/app-data rpool/tank/app-data zfs create -o canmount=off rpool/tank/dbs zfs create -o mountpoint=/mnt/tank/dbs/mariadb rpool/tank/dbs/mariadb
-
copy data to /mnt/tank
-
bind mount
tank
to the container on the/mnt/tank
path:incus config device add docker tank disk source=/mnt/tank path=/mnt/tank shift=true
-
Then, from inside the container:
incus exec docker -- su --login ubuntu
-
Listing /mnt/tank, I can only see directories, no files, and the directories are all owned by root.
tree /mnt/tank /mnt/tank ├── app-data └── dbs └── mariadb 4 directories, 0 files
-
But I create
1.txt
in/mnt/tank
, it is visible on the host.
I would like to know if it is possible to bind mount nested ZFS datasets to incus containers.
Thanks!