Difference between revisions of "NFS/Troubleshooting"

From ArchWiki
< NFS
Jump to: navigation, search
(broke out from main article)
 
(Doing some tidying up; mostly just moving around and new headings.)
Line 8: Line 8:
 
{{Article summary end}}
 
{{Article summary end}}
  
==Troubleshooting==
+
= Server Configuration Issues =
===exportfs: /etc/exports:2: syntax error: bad option list===
+
 
 +
==exportfs: /etc/exports:2: syntax error: bad option list==
 
Delete all space from the option list in {{ic|/etc/exports}}
 
Delete all space from the option list in {{ic|/etc/exports}}
  
===mount.nfs4: No such device===
+
== Group/gid permissions issues ==
 +
If NFS shares mount fine, and are fully accessible to the owner, but not to group members; check the number of groups that user belongs to. NFS has a limit of 16 on the number of groups a user can belong to. If you have users with more then this, you need to enable the {{ic|--manage-gids}} start-up flag for {{ic|rpc.mountd}} on the NFS server.
 +
 
 +
{{hc|/etc/conf.d/nfs-server.conf|2=
 +
# Options for rpc.mountd.
 +
# If you have a port-based firewall, you might want to set up
 +
# a fixed port here using the --port option.
 +
# See rpc.mountd(8) for more details.
 +
 
 +
MOUNTD_OPTS="--manage-gids"
 +
}}
 +
 
 +
= Client Configuration Issues =
 +
 
 +
==mount.nfs4: No such device==
 
Check that you have loaded the {{ic|nfs}} module
 
Check that you have loaded the {{ic|nfs}} module
 
  lsmod | grep nfs
 
  lsmod | grep nfs
Line 18: Line 33:
 
  modprobe nfs
 
  modprobe nfs
  
===mount.nfs4: access denied by server while mounting===
+
==mount.nfs4: access denied by server while mounting==
 
Check that the permissions on your client's folder are correct. Try using 755.
 
Check that the permissions on your client's folder are correct. Try using 755.
  
=== Permissions issues ===
+
== Lock problems ==
If you find that you cannot set the permissions on files properly, make sure the user/group you are chowning are on both the client and server.
+
If that does not help, try modifying these lines in {{ic|/etc/conf.d/nfs-common.conf}}
+
{{bc|<nowiki>
+
# /etc/conf.d/nfs-common.conf
+
 
+
# Do you want to start the statd daemon? It is not needed for NFSv4.
+
NEED_STATD="no"
+
 
+
# Do you want to start the idmapd daemon? It is only needed for NFSv4.
+
NEED_IDMAPD="yes"
+
</nowiki>}}
+
Restart the nfs-common daemon for the changes to take effect.
+
I restarted all the other daemons as well, just to be sure.
+
 
+
=== Group/gid permissions issues ===
+
If NFS shares mount fine, and are fully accessible to the owner, but not to group members; check the number of groups that user belongs to. NFS has a limit of 16 on the number of groups a user can belong to. If you have users with more then this, you need to enable the {{ic|--manage-gids}} start-up flag for {{ic|rpc.mountd}} on the NFS server.
+
 
+
/etc/conf.d/nfs-server.conf
+
+
# Options for rpc.mountd.
+
# If you have a port-based firewall, you might want to set up
+
# a fixed port here using the --port option.
+
# See rpc.mountd(8) for more details.
+
+
MOUNTD_OPTS="--manage-gids"
+
 
+
=== Lock problems ===
+
 
If you got error such as this:
 
If you got error such as this:
 
  mount.nfs: rpc.statd is not running but is required for remote locking.
 
  mount.nfs: rpc.statd is not running but is required for remote locking.
Line 54: Line 42:
 
  mount.nfs: an incorrect mount option was specified
 
  mount.nfs: an incorrect mount option was specified
  
To fix this, you need to change the "NEED_STATD" value in:
+
To fix this, you need to change the "NEED_STATD" value in
 +
{{ic|/etc/conf.d/nfs-common.conf}} to {{ic|YES}}.
  
/etc/conf.d/nfs-common.conf
+
Remember to start all the required services (see [[NFS]] or [[NFSv3]]), not just
 
+
the '''nfs''' service.
NEED_STATD="no"
+
 
 +
= Other Issues =
 +
== Permissions Issues ==
 +
If you find that you cannot set the permissions on files properly, make sure the user/group you are chowning are on both the client and server.
  
Remember to start all the services - ''nfsd.service rpc-idmapd.service rpc-mountd.service rpcbind.service'', not just the nfsd.
+
If all your files are owned by {{ic|nobody}}, and you are using NFSv4, on both the client and server, you should:
 +
* For initscripts, ensure that {{ic|NEED_IDMAPD}} is set to {{ic|YES}} in {{ic|/etc/conf.d/nfs-common.conf}}.
 +
* For systemd, ensure that the rpc-idmapd service has been started.

Revision as of 10:53, 10 December 2012

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki - Main NFS article. Template:Article summary end

Server Configuration Issues

exportfs: /etc/exports:2: syntax error: bad option list

Delete all space from the option list in /etc/exports

Group/gid permissions issues

If NFS shares mount fine, and are fully accessible to the owner, but not to group members; check the number of groups that user belongs to. NFS has a limit of 16 on the number of groups a user can belong to. If you have users with more then this, you need to enable the --manage-gids start-up flag for rpc.mountd on the NFS server.

/etc/conf.d/nfs-server.conf
# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option.
# See rpc.mountd(8) for more details.

MOUNTD_OPTS="--manage-gids"

Client Configuration Issues

mount.nfs4: No such device

Check that you have loaded the nfs module

lsmod | grep nfs

and if previous returns empty or only nfsd-stuff, do

modprobe nfs

mount.nfs4: access denied by server while mounting

Check that the permissions on your client's folder are correct. Try using 755.

Lock problems

If you got error such as this:

mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

To fix this, you need to change the "NEED_STATD" value in /etc/conf.d/nfs-common.conf to YES.

Remember to start all the required services (see NFS or NFSv3), not just the nfs service.

Other Issues

Permissions Issues

If you find that you cannot set the permissions on files properly, make sure the user/group you are chowning are on both the client and server.

If all your files are owned by nobody, and you are using NFSv4, on both the client and server, you should:

  • For initscripts, ensure that NEED_IDMAPD is set to YES in /etc/conf.d/nfs-common.conf.
  • For systemd, ensure that the rpc-idmapd service has been started.