Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

NFS

140 bytes added, 19:50, 8 April 2008
formatting; punctuation; VE->container
This page describes how to mount NFS partition inside a container.
== NFS server ==
==== Prepare the HN ====
For NFS mounts to work in the containers with the RHEL5-based kernels you must enable kernel threads in the container by setting "<code>kernel.ve_allow_kthreads=1" </code> in <code>/etc/sysctl.conf</code>.
<pre> # modprobe nfs</pre>
==== Prepare the container ====
To allow a container to use NFS filesystem, you will need to start it with "nfs" feature enabled. If the container is running while you set the <code>--features "nfs:on"</code>, you will need to reboot it.<pre> # vzctl set 101 --features "nfs:on" --save # vzctl start 101</pre>
After this you may see nfs in <code>/proc/filesystems</code>
=== Mounting NFS ===
Make sure that packages <code>nfs-utils </code> and <code>nfs-utils-lib </code> or similar are installed in VEa container.
Assuming that you already have NFS server set up at <code>192.168.0.1:/nfs_pub</code> , mounting will be simple
<pre>
# vzctl enter 100
</pre>
For more details on how to setup NFS mount , see [http://nfs.sourceforge.net/nfs-howto/ar01s04.html NFS-client HOWTO]
=== Known issues ===
There are quite a few parameters in NFS, so sometimes it doesn't work due to misconfiguration. We've created a separate
page describing those such situations: [[ NFS doesn't work ]].
== See also ==
* [http://nfs.sourceforge.net/nfs-howto/ar01s04.html NFS-client HOWTO]
[[Category: HOWTO]]