Changes

Jump to: navigation, search

NFS server inside container

1,483 bytes added, 17:47, 16 February 2009
User-space NFS server
Please note that the user-space NFS server does not provide locking, or at least I couldn't get locking to work - [[User:Elronxenu|Elronxenu]] 19:49, 15 November 2007 (EST)
 
=== On Debian Lenny ===
 
The current stable debian version 5.0 (lenny) provides two packages for user space nfs support: <code>nfs-user-server</code> and <code>unfs3</code>. Here i describe my experiences with them --[[User:Strimo|Strimo]] 17:47, 16 February 2009 (UTC)
 
==== nfs-user-server ====
 
<pre>
aptitude install nfs-user-server
</pre>
 
First i used nfs-user-server package since i didn't know unfs3. After installing i always got the '''permission denied''' error when i tried to mount any exported path until i found this article. So i patched the /etc/init.d/nfs-user-server file to include the <code>-r</code> parameter by adding <code>-- -r</code> to the <code>start-stop-daemon</code> line responsible for starting <code>rpc.mountd</code> and <code>rpc.nfsd</code>:
 
<pre>
start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/rpc.nfsd -- -r
start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/rpc.mountd -- -r
</pre>
 
After the modification and a nfs server restart (<code>/etc/init.d/nfs-user-server restart</code>) i was able to mount a nfs share. At first the nfs server seems to work fine but anytime i want to edit any text file (using nano or mcedit) i got strange errors on writing to the file and i never solved the problem nor detected why this happens. So i switched to unfs3 ...
 
==== unfs3 ====
 
<pre>
aptitude install unfs3
</pre>
 
Works fine until now. Note that both unfs3 and nfs-user-server do not support file locking!
== External links ==
2
edits

Navigation menu