So that’s actually expected behavior. The snap package runs in its own mount namespace, shielding the host from any mount that occurs inside the snap.
This avoids a number of issues with the way the Linux kernel handles mounts and especially issues with ZFS’ own ideas of how mounts work on Linux.
In general we recommend that you interact with the container’s filesystem through the LXD API using the lxc file
command. If that’s not enough, then you can get rsync to work over lxc exec
as i described here:
If you absolutely must access the container’s filesystem directly, you’ll have to jump through a few hoops:
- First, note that modern LXD unmounts the container when it’s not running, so you’ll need your container to be running first.
- Second, locate the PID of the “[lxc monitor] …” process for the container that you want.
- Third, Access the filesystem through /proc/PID/root/var/snap/lxd/common/lxd/storage-pools/default/containers/www