I already tried creating a storage volume and giving that to both containers, but it stays empty. The crux is, that the container is mounting a fuse filesystem only it can do and I want to share the resulting dir with another container. Is there a way to share this mount with another container using lxd’s capabilities or am I forced to use nfs or similar?
~# lsb_release -ds
Ubuntu 22.04.5 LTS
~# snap list lxd
Name Version Rev Tracking Publisher Notes
lxd 6.3-a85d6a5 33246 latest/stable canonical✓ -
Ah, in docker you seem to be able to define mount propagation, which seems to be possible in LXD device disk “propagation”. Trying it out
1 Like
Ok, this doesn’t seem to work or I do something wrong…
I tried in the device: propagation: shared
and propagation: rshared
as well as with or without recursive: "true"
on the mountpoint folder or a subfolder - no dice.
This has also been asked back then in the linuxcontainers forum with no further resolution.
Easy to replicate steps:
In a container config set the disk device with propagation:
devices:
bind-fuse:
path: /mnt/fuse
propagation: rshared
required: "true"
source: /mnt/fuse
type: disk
In the container test it with a tmpfs mount (I assume tmpfs is a viable option to replicate the issue as easy as possible):
~# mount -t tmpfs tmpfs /mnt/fuse
~# touch /mnt/fuse/foo
~# ls -l /mnt/fuse/
total 0
-rw-r--r-- 1 root root 0 Jun 6 13:08 foo
But not visible on the host:
~# ls -l /mnt/fuse/
total 0
I’ve also tried a subfolder in this mountpoint with help of recursive: "true"
- still no dice.
The container is an unprivileged container with ubuntu 22.04 as well