[lxc-users] howto bind mount into lxc with additional mountpoints?
Oliver Rath
2018-08-30 17:56:12 UTC
Hi list,

Im using lxd 3.4 (ubuntu snap), which runs properly. Now I have a
strange Problem:

I want to bind mount a structure from /opt/myprog to the same mountpoint
in the lxd-Box. In this structure is an adittional mountpoint for a CD,
which I want to use in the lxc-box, too. I have testet several options
via lxc config edit mybox:

The ISO will be mounted at /opt/myprog/iso

This worked:

    path: /opt/myprog/iso
    propagation: shared
    source: /opt/myprog/iso
    type: disk

This didnt work:

    path: /opt/myprog/
    propagation: runbindable (also tested shared)
    source: /opt/myprog/
    type: disk

Here i can see my mountdir "iso", but not the mounted ISO-Image. Is
there a possiblity to git the iso visible also the dir is not the
mountdir in the bindmount-path? Setting the parameter "recursive = true"
gets the error message "Config parsing error: The recursive option is
only supported for additional bind-mounted paths"

What can I do?