[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [atomic-devel] NFS in atomic host
- From: "Stephen C. Tweedie" <sct redhat com>
- To: Sami Wagiaalla <swagiaal redhat com>
- Cc: atomic-devel projectatomic io
- Subject: Re: [atomic-devel] NFS in atomic host
- Date: Wed, 29 Oct 2014 10:50:05 +0000
Hi,
On Tue, 2014-10-28 at 16:12 -0400, Sami Wagiaalla wrote:
> I have been playing around with creating a container which provides
> support for nfs but I quickly ran into the issue that the mount
> namespace of the container is different from that of the host so no
> mounts done inside the container are visible to the host. I have not
> found a way to work around this.
It's not completely straightforward, but it is possible if you set up
the container correctly.
You can map the root /proc into a container, and then use that to
re-enter the root mount namespace with nsenter:
-bash-4.2# mount|grep test
-bash-4.2# docker run --privileged --rm -ti -v /proc:/sysproc fedora bash
[root f8fe3faaf4e1 /]# nsenter --mount=/sysproc/1/ns/mnt -- mount -t tmpfs tmpfs /var/mnt/test
[root f8fe3faaf4e1 /]# exit
-bash-4.2# mount|grep test
tmpfs on /var/mnt/test type tmpfs (rw,relatime,seclabel)
-bash-4.2#
--Stephen
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]