6,534
edits
Changes
grammar, formatting fixes and improvements, added link to Kernel build
Binary RPMs that are provided by OpenVZ community contain kernels compiled
without NFS server support. Thus you have to
[[Kernel build|recompile the kernel ]] with <code>CONFIG_NFSD=m</code>. After booting in this kernel you'll be able
to use NFS server on [[HN]].
In-kernel NFS server runs kernel threads to service requests of clients.
But for security reasons kernel threads are prohibited in [[VE]]s! So you won't
be able to run NFS server inside [[VE]] without patching the kernel.
== User-space NFS server ==
Advantage of user-space NFS server is that it can be ran without any support in the kernel.
Also if it crashes - — there is no crash of a system: just one process crashes, not kernel!The disadvantage of user-space NFS server is its poductivityproductivity: no one can be faster then in-kernel implementation.
One well-known implementation of NFS server is "The LINUX User-Space NFS Server" by Olaf Kirch.
Some Linux distributions contain this package: Debian Sarge (<code>nfs-user-server</code>), OpenSuse OpenSUSE 10.0 (<code>nfs-server</code>).
For other distributions you can download sources (for example from Debian repository) and compile it.
There is a small trick you have to know about runing <code>mountd </code> and <code>nfsd </code> (these two daemons and <code>portmap </code> constitutea user-space server). You should run them with <code>-r </code> option:
<pre>
# portmap
If major equals 0 then daemons suppose that it is NFS and don't want to re-export it. Symptoms are
that clients will always get a "permission denied" error. Simfs (the file system on what VE is located)
is assosiated with so called unnamed device, which major equals 0. To So, to prevent daemons from checking forre-exporting - — just use this <code>-r </code> option.
[[Category: HOWTO]]
[[Category: Networking]]