I have a number of ZFS sub-filesystems (so that I can granularly manage snapshots and ZFS options) like so:tank/mediatank/media/picturestank/media/pictures/photostank/media/moviestank/media/musictank/media/documentstank/media/documents/publicI am running Debian GNU/Linux 8.6 (jessie) with ZFS-on-Linux, kernel 4.4.19-1-pve. My goal is to share the parent ZFS filesystem (tank/media) with a LXC container via a bind mount and have the sub-filesystems be accessible.If I bind mount tank/media inside the container, then the sub ZFS filesystems (E.G. tank/media/pictures) do not show up. I need to mount --make-rshared tank/media in order for the sub-mounts to also appear.How can I make ZFS sub filesystems be mounted make-rshared by default using ZFS on Linux?
How can I automatically make ZFS filesyatems mount shared / rshared?
lxc;zfs;bind mount
I have found that mounting with the rbind (rather than bind) option in the lxc mount line solves the issue (syntax for proxmox):lxc.mount.entry: /tank/media media none rbind,create=dir,optional 0 0Going off the RedHat documentation on sharing mounts, rbind achieves replication of mounts on the source in the bound directory (which is what we need), the difference being make-rshared allows a mount on the bind to be reflected in the source.Just came across the issue myself, and this is the only relevant result on google, so I thought it was appropriate to give an answer despite the age of the question.