[lxc-users] Mounting the same file system on host and container

Wojciech Arabczyk arabek at gmail.com
Sun Sep 21 09:07:48 UTC 2014

Use bind mounts:

/var/lib/lxc/mycontainer/rootfs/mount_moint none bind 0 0

On 20 September 2014 23:19, MegaBrutal <megabrutal at gmail.com> wrote:
> Hi all,
> If I mount the same device/file system on both the host and an LXC container
> (both with "rw" option), will the kernel be aware that the FS is mounted
> twice, or will it damage the file system, like if 2 kernels mounted them at
> once?
> It's especially interesting with btrfs file systems, as it's designed to be
> mounted on multiple mount points at once (which is useful when you have
> subvolumes).
> My file systems are located on LVs, if that matters, but I think my question
> may be valid for block devices and image files as well.
> MegaBrutal
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

Wojciech Arabczyk

More information about the lxc-users mailing list