Quoting Arie Skliarouk ([email protected]): > I want to bind-mount an directory inside of a running container. > If I mount the directory using bind mount, the container does not see > files in it. > > It is important to me to be able to do the mounts and umounts from the > host machine, as we are dealing with LVM snapshots.
If it's ok to do it ahead of time, then you can use mount entries in your config file. If you want to be able to just manually run the mount command from the host at any time, then you'll need to create a directory for the sharing and mount that into your container ahead of time. For instance, mkdir /share/containerX mkdir /var/lib/lxc/containerX/rootfs/share mount -t tmpfs share /share/containerX mount --make-rshared /share/containerX mount --make-rslave /share/containerX cat >> /var/lib/lxc/containerX/fstab << EOF /share/containerX /var/lib/lxc/containerX/rootfs/share none bind 0 0 EOF lxc-start -n containerX -d Now when you mount something under /share/containerX, it will show up under /share in the container. I.e. -serge ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Lxc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxc-users
