[lxc-users] Best practice for sharing folder between lxc-guests?

Serge Hallyn serge.hallyn at ubuntu.com
Thu Feb 27 18:01:09 UTC 2014


Quoting Guido Jäkel (G.Jaekel at DNB.DE):
> Dear Andreas, Dear Friedemann,
> 
> you should not need the whole path and in my opinion you should not use it because then you don't need to change it if the container root will change later.
> 
> But the mount point inside the container rootfs must exist. This is obviously, but i stepped into this more than one time, also.

Or add 'create=dir' to the mount options.

> I'm not shure if this holds on the curren LXC version, but with older ones, the mount point path elements MUST not be identical to the value of the lxc pivot dir. Therefore, i use the "uncommon" value  lxc.pivotdir=.pivot
> 
> greetings
> 
> Guido
> 
> On 2014-02-27 11:14, Andreas Laut wrote:
> > Is the mount bind really working on first guest? In ubuntu lxc version your config entry wont work. lxc-start needs the whole path to the directory from host sight of view.
> > 
> > lxc.mount.entry = /shared/files /var/lib/lxc/mycontainer/rootfs/shared/ none bind,rw 0 0
> > 
> > Regards,
> > Andreas
> 
> >> Hi everyone,
> >> I’m trying to setup a folder where each lxc-guest can have read/write access to. Is there already a practice for using it? Trying to add
> >> 
> >> lxc.mount.entry = /shared/files shared/ none bind,rw 0 0 
> 
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list