How to Restart NFS Services
Become superuser or assume an equivalent role.
For information about roles, see "Using Privileged Applications" in System Administration Guide: Security Services.
To enable daemons without rebooting, type the following commands.
# /etc/init.d/nfs.server stop # /etc/init.d/nfs.server start |
This remedy stops the daemons and restarts them, if an entry is in /etc/dfs/dfstab.
How to Warm-Start rpcbind
If the NFS server cannot be rebooted because of work in progress, you can restart rpcbind without having to restart all of the services that use RPC. Just complete a warm start as described in this procedure.
Become superuser or assume an equivalent role.
For information about roles, see "Using Privileged Applications" in System Administration Guide: Security Services.
Determine the PID for rpcbind.
Run ps to get the PID, which is the value in the second column.
# ps -ef |grep rpcbind root 115 1 0 May 31 ? 0:14 /usr/sbin/rpcbind root 13000 6944 0 11:11:15 pts/3 0:00 grep rpcbind
Send a SIGTERM signal to the rpcbind process.
In this example, term is the signal that is to be sent and 115 is the PID for the program (see the kill(1) man page). This command causes rpcbind to create a list of the current registered services in /tmp/portmap.file and /tmp/rpcbind.file.
# kill -s term 115
Note - If you do not kill the rpcbind process with the -s term option, you cannot complete a warm start of rpcbind and must reboot the server to restore service.
Restart rpcbind.
Warm-restart the command so that the files that were created by the kill command are consulted, and the process resumes without requiring a restart of all of the RPC services. See the rpcbind(1M) man page.
# /usr/sbin/rpcbind -w
Identifying Which Host Is Providing NFS File Service
Run the nfsstat command with the -m option to gather current NFS information. The name of the current server is printed after "currserver=".
% nfsstat -m /usr/local from bee,wasp:/export/share/local Flags: vers=3,proto=tcp,sec=sys,hard,intr,llock,link,synlink, acl,rsize=32768,wsize=32678,retrans=5 Failover: noresponse=0, failover=0, remap=0, currserver=bee |
How to Verify Options Used With the mount Command
In the Solaris 2.6 release and in any versions of the mount command that were patched after the 2.6 release, no warning is issued for invalid options. The following procedure helps determine whether the options that were supplied either on the command line or through /etc/vfstab were valid.
For this example, assume that the following command has been run:
# mount -F nfs -o ro,vers=2 bee:/export/share/local /mnt |
Verify the options by running the following command.
% nfsstat -m /mnt from bee:/export/share/local Flags: vers=2,proto=tcp,sec=sys,hard,intr,dynamic,acl,rsize=8192,wsize=8192, retrans=5
The file system from bee has been mounted with the protocol version set to 2. Unfortunately, the nfsstat command does not display information about all of the options, but using the nfsstat command is the most accurate way to verify the options.
Check the entry in /etc/mnttab.
The mount command does not allow invalid options to be added to the mount table. Therefore, verify that the options that are listed in the file match those options that are listed on the command line. In this way, you can check those options that are not reported by the nfsstat command.
# grep bee /etc/mnttab bee:/export/share/local /mnt nfs ro,vers=2,dev=2b0005e 859934818
Troubleshooting Autofs
Occasionally, you might encounter problems with autofs. This section should improve the problem-solving process. The section is divided into two subsections.
This section presents a list of the error messages that autofs generates. The list is divided into two parts:
Error messages that are generated by the verbose (-v) option of automount
Error messages that might appear at any time
Each error message is followed by a description and probable cause of the message.
When troubleshooting, start the autofs programs with the verbose (-v) option. Otherwise, you might experience problems without knowing why.
The following paragraphs are labeled with the error message you are likely to see if autofs fails, and a description of the possible problem.
Error Messages Generated by automount -v
bad key key in direct map mapname
While scanning a direct map, autofs has found an entry key without a prefixed /. Keys in direct maps must be full path names.
bad key key in indirect map mapname
While scanning an indirect map, autofs has found an entry key containing a /. Indirect map keys must be simple names--not path names.
can't mount server:pathname: reason
The mount daemon on the server refuses to provide a file handle for server:pathname. Check the export table on the server.
couldn't create mount point mountpoint: reason
Autofs was unable to create a mount point that was required for a mount. This problem most frequently occurs when you attempt to hierarchically mount all of a server's exported file systems. A required mount point can exist only in a file system that cannot be mounted (it cannot be exported). The mount point cannot be created because the exported parent file system is exported read-only.
leading space in map entry entry text in mapname
Autofs has discovered an entry in an automount map that contains leading spaces. This problem is usually an indication of an improperly continued map entry. For example:
fake /blat frobz:/usr/frotzIn this example, the warning is generated when autofs encounters the second line because the first line should be terminated with a backslash (\).
The required map cannot be located. This message is produced only when the -v option is used. Check the spelling and path name of the map name.
remount server:pathname on mountpoint: server not responding
Autofs has failed to remount a file system it previously unmounted.
WARNING: mountpoint already mounted on
Autofs is attempting to mount over an existing mount point. This message means an internal error occurred in autofs (an anomaly).
Miscellaneous Error Messages
dir mountpoint must start with '/'
The automounter mount point must be given as a full path name. Check the spelling and path name of the mount point.
hierarchical mountpoints: pathname1 and pathname2
Autofs does not allow its mount points to have a hierarchical relationship. An autofs mount point must not be contained within another automounted file system.
Autofs attempted to contact server, but received no response.
hostname: exports: rpc_err
An error occurred while getting the export list from hostname. This message indicates a server or network problem.
The map entry is malformed, and autofs cannot interpret it. Recheck the entry. Perhaps the entry has characters that need escaping.
mapname: nis_err
An error occurred when looking up an entry in a NIS map. This message can indicate NIS problems.
mount of server:pathname on mountpoint:reason
Autofs failed to do a mount. This can indicate a server or network problem.
Autofs cannot mount itself on mountpoint because it is not a directory. Check the spelling and path name of the mount point.
nfscast: cannot send packet: reason
Autofs cannot send a query packet to a server in a list of replicated file system locations.
nfscast: cannot receive reply: reason
Autofs cannot receive replies from any of the servers in a list of replicated file system locations.
All these error messages indicate problems in attempting to ping servers for a replicated file system. This message can indicate a network problem.
pathconf: no info for server:pathname
Autofs failed to get pathconf information for the path name (see the fpathconf(2) man page).
pathconf: server: server not responding
Autofs is unable to contact the mount daemon on server that provides the information to pathconf().