[Devel] Re: NFS Kernel server inside a container

Daniel Lezcano daniel.lezcano at free.fr
Wed May 19 02:59:19 PDT 2010


On 05/18/2010 08:51 PM, Martin Fick wrote:
> Hello,
>
> I was wondering if it is possible to run an NFS kernel server inside a linux container?
>
> I tried setting one up on a debian (vserver enabled) kernel, and it seems to start the portmap, rpc.statd, rpc.idmapd rpc.mountd daemons inside the container, but I cannot seem to mount the filesystem from a client.  I do get the following error message on server startup:
>
>    FATAL: Could not load /lib/modules/2.6.32-trunk-vserver-686/modules.dep: No such file or directory
>
>
> When trying to mount on the client, after blocking on the mount for a while, I get:
>
>    mount.nfs: mount system call failed
>    

It may be possible your network configuration is not correct regarding 
the nfs server access. Can you ping the nfs server from the container ?

> Any thoughts?  Has anyone else done this?  Should this be possible in the first place?  Thanks,
>    

I thought NFS was isolated through the mount namespace.

I have a nfs server on 172.20.0.1 exporting "/home".

On my host (IP 172.20.0.166), I mounted /home via nfs

I created a debian system container with its own rootfs and network. 
Started it. As expected, the nfs mount point is unmounted as it does not 
belong to the rootfs, and then I remounted /home from my container (IP 
172.20.0.42). This mount point is private to the container and not 
accessible from the other containers.

This is what you want to do ? Or did I miss something ?

Thanks
   -- Daniel


_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list