Difference between revisions of "NFS doesn't work"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(initial edition)
 
(mention rpcbind)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Often NFS in VE doesn't work because off misconfiguration.  
+
Often [[NFS]] in container does not work because of misconfiguration.  
This article contents known reasons of NFS related problems, that are not bugs,
+
This article contains known reasons of such problems as well as solutions for those.
but misconfigurations.
+
 
 +
== Mount hangs ==
 +
 
 +
===  Symptoms ===
 +
<tt>mount</tt>  command hangs or takes a very long time to complete:
  
== Reason #1 ==
 
===  Symptomps ===
 
<tt>mount</tt>  command hangs:
 
 
<pre>
 
<pre>
 
# mount <ip address>:/pub /data
 
# mount <ip address>:/pub /data
Line 11: Line 12:
 
</pre>
 
</pre>
  
=== Reason ===
+
=== Reasons ===
Lockd is not running on the NFS server
+
* Lockd is not running on the NFS server
 +
* Portmap (older) or rpcbind (newer) is not running on the NFS client
 +
* Networking is broken (e.g. scripts brought up default route but not IP address yet)
  
=== Workaround ===
+
=== Solution ===
 +
Two options are possible:
 
* run <tt>lockd</tt> on the server
 
* run <tt>lockd</tt> on the server
 
* mount with <tt>nolock</tt> option
 
* mount with <tt>nolock</tt> option
  
 
=== Links ===
 
=== Links ===
* http://bugzilla.openvz.org/show_bug.cgi?id=620
+
* {{Bug|620}}
 +
 
 +
== Permission denied after mount ==
 +
 
 +
===  Symptoms ===
 +
 
 +
After a successful mount it is not possible to enter the mounted directory.
 +
 
 +
=== Reasons and Solution ===
 +
 
 +
* Possible the wrong authentification method for NFS is used. Try to add the mount option <code>sec=sys</code> to use the system mount option [http://workaround.org/node/265]
 +
 
  
 
[[Category:Troubleshooting]]
 
[[Category:Troubleshooting]]

Latest revision as of 21:28, 6 June 2012

Often NFS in container does not work because of misconfiguration. This article contains known reasons of such problems as well as solutions for those.

Mount hangs[edit]

Symptoms[edit]

mount command hangs or takes a very long time to complete:

# mount <ip address>:/pub /data
(...hangs here...)

Reasons[edit]

  • Lockd is not running on the NFS server
  • Portmap (older) or rpcbind (newer) is not running on the NFS client
  • Networking is broken (e.g. scripts brought up default route but not IP address yet)

Solution[edit]

Two options are possible:

  • run lockd on the server
  • mount with nolock option

Links[edit]

Permission denied after mount[edit]

Symptoms[edit]

After a successful mount it is not possible to enter the mounted directory.

Reasons and Solution[edit]

  • Possible the wrong authentification method for NFS is used. Try to add the mount option sec=sys to use the system mount option [1]