mountd

title: mountd(8)

summary: NFS mount daemon

text:
# mountd(8)

## NAME
rpc.mountd - NFS mount daemon

## SYNOPSIS
/usr/sbin/rpc.mountd [options]

## DESCRIPTION
The rpc.mountd daemon implements the server side of the NFS MOUNT protocol, an NFS side protocol used by NFS version 2 [RFC1094] and NFS version 3 [RFC1813]. It also responds to requests from the Linux kernel to authenticate clients and provides details of access permissions.

The NFS server (nfsd) maintains a cache of authentication and authorization information which is used to identify the source of each request, and then what access permissions that source has to any local filesystem. When required information is not found in the cache, the server sends a request to mountd to fill in the missing information. Mountd uses a table of information stored in /var/lib/nfs/etab and maintained by exportfs(8), possibly based on the contents of exports(5), to respond to each request.

### Mounting exported NFS File Systems
The NFS MOUNT protocol has several procedures. The most important of these are MNT (mount an export) and UMNT (unmount an export).

A MNT request has two arguments: an explicit argument that contains the pathname of the root directory of the export to be mounted, and an implicit argument that is the sender's IP address.

When receiving a MNT request from an NFS client, rpc.mountd checks both the pathname and the sender's IP address against its export table. If the sender is permitted to access the requested export, rpc.mountd returns an NFS file handle for the export's root directory to the client. The client can then use the root file handle and NFS LOOKUP requests to navigate the directory structure of the export.

### The rmtab File
The rpc.mountd daemon registers every successful MNT request by adding an entry to the /var/lib/nfs/rmtab file. When receivng a UMNT request from an NFS client, rpc.mountd simply removes the matching entry from /var/lib/nfs/rmtab, as long as the access control list for that export allows that sender to access the export.

Clients can discover the list of file systems an NFS server is currently exporting, or the list of other clients that have mounted its exports, by using the showmount(8) command. showmount(8) uses other procedures in the NFS MOUNT protocol to report information about the server's exported file systems.

Note, however, that there is little to guarantee that the contents of /var/lib/nfs/rmtab are accurate. A client may continue accessing an export even after invoking UMNT. If the client reboots without sending a UMNT request, stale entries remain for that client in /var/lib/nfs/rmtab.

### Mounting File Systems with NFSv4
Version 4 (and later) of NFS does not use a separate NFS MOUNT protocol. Instead mounting is performed using regular NFS requests handled by the NFS server in the Linux kernel (nfsd). Consequently /var/lib/nfs/rmtab is not updated to reflect any NFSv4 activity.

## OPTIONS
-d kind or --debug kind

Turn on debugging. Valid kinds are: all, auth, call, general and parse.

-l or --log-auth

Enable logging of responses to authentication and access requests from nfsd. Each response is then cached by the kernel for 30 minutes (or as set by --ttl below), and will be refreshed after 15 minutes (half the ttl time) if the relevant client remains active. Note that -l is equivalent to -d auth and so can be enabled in /etc/nfs.conf with "debug = auth" in the [mountd] section.

rpc.mountd will always log authentication responses to MOUNT requests when NFSv3 is used, but to get similar logs for NFSv4, this option is required.

-i or --cache-use-ipaddr

Normally each client IP address is matched against each host identifier (name, wildcard, netgroup etc) found in /etc/exports and a combined identity is formed from all matching identifiers. Often many clients will map to the same combined identity so performing this mapping reduces the number of distinct access details that the kernel needs to store. Specifying the -i option suppresses this mapping so that access to each filesystem is requested and cached separately for each client IP address. Doing this can increase the burden of updating the cache slightly, but can make the log messages produced by the -l option easier to read.

-T or --ttl

Provide a time-to-live (TTL) for cached information given to the kernel. The kernel will normally request an update if the information is needed after half of this time has expired. Increasing the provided number, which is in seconds, reduces the rate of cache update requests, and this is particularly noticeable when these requests are logged with -l. However increasing also means that changes to hostname to address mappings can take longer to be noticed. The default TTL is 1800 (30 minutes).

-F or --foreground

Run in foreground (do not daemonize)

-h or --help

Display usage message.

-o num or --descriptors num

Set the limit of the number of open file descriptors to num. The default is to leave the limit unchanged.

-N mountd-version or --no-nfs-version mountd-version

This option can be used to request that rpc.mountd do not offer certain versions of NFS. The current version of rpc.mountd can support both NFS version 2, 3 and 4. If the either one of these version should not be offered, rpc.mountd must be invoked with the option --no-nfs-version <vers> .

-n or --no-tcp

Don't advertise TCP for mount.

-p num or -P num or --port num

Specifies the port number used for RPC listener sockets. If this option is not specified, rpc.mountd will try to consult /etc/services, if gets port succeed, set the same port for all listener socket, otherwise chooses a random ephemeral port for each listener socket.

This option can be used to fix the port value of rpc.mountd's listeners when NFS MOUNT requests must traverse a firewall between clients and servers.

-H prog or --ha-callout prog

Specify a high availability callout program. This program receives callouts for all MOUNT and UNMOUNT requests. This allows rpc.mountd to be used in a High Availability NFS (HA-NFS) environment.

The callout program is run with 4 arguments. The first is mount or unmount depending on the reason for the callout. The second will be the name of the client performing the mount. The third will be the path that the client is mounting. The last is the number of concurrent mounts that we believe the client has of that path.

This callout is not needed with 2.6 and later kernels. Instead, mount the nfsd filesystem on /proc/fs/nfsd.

-s, --state-directory-path directory

Specify a directory in which to place state information (etab and rmtab). If this option is not specified the default of /var/lib/nfs is used.

-r, --reverse-lookup

rpc.mountd tracks IP addresses in the rmtab file. When a DUMP request is made (by someone running showmount -a, for instance), it returns IP addresses instead of hostnames by default. This option causes rpc.mountd to perform a reverse lookup on each IP address and return that hostname instead. Enabling this can have a substantial negative effect on performance in some situations.

-t N or --num-threads=N or --num-threads N

This option specifies the number of worker threads that rpc.mountd spawns. The default is 1 thread, which is probably enough. More threads are usually only needed for NFS servers which need to handle mount storms of hundreds of NFS mounts in a few seconds, or when your DNS server is slow or unreliable.

-u or --no-udp

Don't advertise UDP for mounting

-V version or --nfs-version version

This option can be used to request that rpc.mountd offer certain versions of NFS. The current version of rpc.mountd can support both NFS version 2 and the newer version 3.

-v or --version

Print the version of rpc.mountd and exit.

-g or --manage-gids

Accept requests from the kernel to map user id numbers into lists of group id numbers for use in access control. An NFS request will normally (except when using Kerberos or other cryptographic authentication) contains a user-id and a list of group-ids. Due to a limitation in the NFS protocol, at most 16 groups ids can be listed. If you use the -g flag, then the list of group ids received from the client will be replaced by a list of group ids determined by an appropriate lookup on the server. Note that the 'primary' group id is not affected so a newgroup command on the client will still be effective. This function requires a Linux Kernel with version at least 2.6.21.

## CONFIGURATION FILE
Many of the options that can be set on the command line can also be controlled through values set in the [mountd] or, in some cases, the [nfsd] sections of the /etc/nfs.conf configuration file. Values recognized in the [mountd] section include manage-gids, cache-use-ipaddr, descriptors, port, threads, ttl, reverse-lookup, and state-directory-path, ha-callout which each have the same effect as the option with the same name.

The values recognized in the [nfsd] section include TCP, UDP, vers2, vers3, and vers4 which each have same same meaning as given by rpc.nfsd(8).

## TCP_WRAPPERS SUPPORT
You can protect your rpc.mountd listeners using the tcp_wrapper library or iptables(8).

Note that the tcp_wrapper library supports only IPv4 networking.

Add the hostnames of NFS peers that are allowed to access rpc.mountd to /etc/hosts.allow. Use the daemon name mountd even if the rpc.mountd binary has a different name.

Hostnames used in either access file will be ignored when they can not be resolved into IP addresses. For further information see the tcpd(8) and hosts_access(5) man pages.

### IPv6 and TI-RPC support
TI-RPC is a pre-requisite for supporting NFS on IPv6. If TI-RPC support is built into rpc.mountd, it attempts to start listeners on network transports marked 'visible' in /etc/netconfig. As long as at least one network transport listener starts successfully, rpc.mountd will operate.

## FILES
/etc/exports

input file for exportfs, listing exports, export options, and access control lists

/var/lib/nfs/rmtab

table of clients accessing server's exports

## SEE ALSO
exportfs(8), exports(5), showmount(8), rpc.nfsd(8), rpc.rquotad(8), nfs(5), nfs.conf(5), tcpd(8), hosts_access(5), iptables(8), netconfig(5)

RFC 1094 - "NFS: Network File System Protocol Specification"

RFC 1813 - "NFS Version 3 Protocol Specification"

RFC 7530 - "Network File System (NFS) Version 4 Protocol"

RFC 8881 - "Network File System (NFS) Version 4 Minor Version 1 Protocol"

## AUTHOR
Olaf Kirch, H. J. Lu, G. Allan Morris III, and a host of others.


nfsd

package: nfs-server

title: nfsd(8)

summary: NFS server process

text:
# nfsd(8)

## NAME
rpc.nfsd - NFS server process

## SYNOPSIS
/usr/sbin/rpc.nfsd [options] nproc

## DESCRIPTION
The rpc.nfsd program implements the user level part of the NFS service. The main functionality is handled by the nfsd kernel module. The user space program merely specifies what sort of sockets the kernel service should listen on, what NFS versions it should support, and how many kernel threads it should use.

The rpc.mountd server provides an ancillary service needed to satisfy mount requests by NFS clients.

## OPTIONS
-d or --debug

enable logging of debugging messages

-H or --host hostname

specify a particular hostname (or address) that NFS requests will be accepted on. By default, rpc.nfsd will accept NFS requests on all known network addresses. Note that lockd (which performs file locking services for NFS) may still accept request on all known network addresses. This may change in future releases of the Linux Kernel. This option can be used multiple time to listen to more than one interface.

-p or --port port

specify a different port to listen on for NFS requests. By default, rpc.nfsd will listen on port 2049.

-r or --rdma

specify that NFS requests on the standard RDMA port ("nfsrdma", port 20049) should be honored.

--rdma=port

Listen for RDMA requests on an alternate port - may be a number or a name listed in /etc/services.

-N or --no-nfs-version vers

This option can be used to request that rpc.nfsd does not offer certain versions of NFS. The current version of rpc.nfsd can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.

-s or --syslog

By default, rpc.nfsd logs error messages (and debug messages, if enabled) to stderr. This option makes rpc.nfsd log these messages to syslog instead. Note that errors encountered during option processing will still be logged to stderr regardless of this option.

-t or --tcp

Instruct the kernel nfs server to open and listen on a TCP socket. This is the default.

-T or --no-tcp

Instruct the kernel nfs server not to open and listen on a TCP socket.

-u or --udp

Instruct the kernel nfs server to open and listen on a UDP socket.

-U or --no-udp

Instruct the kernel nfs server not to open and listen on a UDP socket. This is the default.

-V or --nfs-version vers

This option can be used to request that rpc.nfsd offer certain versions of NFS. The current version of rpc.nfsd can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.

-L or --lease-time seconds

Set the lease-time used for NFSv4. This corresponds to how often clients need to confirm their state with the server. Valid range is from 10 to 3600 seconds.

-G or --grace-time seconds

Set the grace-time used for NFSv4 and NLM (for NFSv2 and NFSv3). New file open requests (NFSv4) and new file locks (NLM) will not be allowed until after this time has passed to allow clients to recover state.

nproc

specify the number of NFS server threads. By default, eight threads are started. However, for optimum performance several threads should be used. The actual figure depends on the number of and the work load created by the NFS clients, but a useful starting point is eight threads. Effects of modifying that number can be checked using the nfsstat(8) program.

Note that if the NFS server is already running, then the options for specifying host, port, and protocol will be ignored. The number of processes given will be the only option considered, and the number of active nfsd processes will be increased or decreased to match this number. In particular rpc.nfsd 0 will stop all threads and thus close any open connections.

## CONFIGURATION FILE
Many of the options that can be set on the command line can also be controlled through values set in the [nfsd] section of the /etc/nfs.conf configuration file. Values recognized include:

threads

The number of threads to start.

host

A host name, or comma separated list of host names, that rpc.nfsd will listen on. Use of the --host option replaces all host names listed here.

grace-time

The grace time, for both NFSv4 and NLM, in seconds.

lease-time

The lease time for NFSv4, in seconds.

port

Set the port for TCP/UDP to bind to.

rdma

Enable RDMA port (with "on" or "yes" etc) on the standard port ("nfsrdma", port 20049).

rdma-port

Set an alternate RDMA port.

UDP

Enable (with "on" or "yes" etc) or disable ("off", "no") UDP support.

TCP

Enable or disable TCP support.

vers2

vers3

vers4

Enable or disable a major NFS version. 3 and 4 are normally enabled by default.

vers4.1

vers4.2

Setting these to "off" or similar will disable the selected minor versions. Setting to "on" will enable them. The default values are determined by the kernel, and usually minor versions default to being enabled once the implementation is sufficiently complete.

## NOTES
If the program is built with TI-RPC support, it will enable any protocol and address family combinations that are marked visible in the netconfig database.

## SEE ALSO
nfsd(7), rpc.mountd(8), exports(5), exportfs(8), nfs.conf(5), rpc.rquotad(8), nfsstat(8), netconfig(5).

## AUTHOR
Olaf Kirch, Bill Hawes, H. J. Lu, G. Allan Morris III, and a host of others.


nfsdcltrack

title: nfsdcltrack(8)

summary: NFSv4 Client Tracking Callout Program

text:
# nfsdcltrack(8)

## NAME
nfsdcltrack - NFSv4 Client Tracking Callout Program

## SYNOPSIS
nfsdcltrack [-d] [-f] [-s stable storage dir] <command> <args...>

## DESCRIPTION
nfsdcltrack is the NFSv4 client tracking callout program. It is not necessary to install this program on machines that are not acting as NFSv4 servers.

When a network partition is combined with a server reboot, there are edge conditions that can cause the server to grant lock reclaims when other clients have taken conflicting locks in the interim. A more detailed explanation of this issue is described in RFC 3530, section 8.6.3 and in RFC 5661, section 8.4.3.

In order to prevent these problems, the server must track a small amount of per-client information on stable storage. This program provides the userspace piece of that functionality. When the kernel needs to manipulate the database that stores this info, it will execute this program to handle it.

## OPTIONS
-d, --debug

Enable debug level logging.

-f, --foreground

Log to stderr instead of syslog.

-s storagedir, --storagedir=storage_dir

Directory where stable storage information should be kept. The default value is /var/lib/nfs/nfsdcltrack.

## COMMANDS
nfsdcltrack requires a command for each invocation. Supported commands are:

init

Initialize the database. This command requires no argument.

create

Create a new client record (or update the timestamp on an existing one). This command requires a hex-encoded nfs_client_id4 as an argument.

remove

Remove a client record from the database. This command requires a hex-encoded nfs_client_id4 as an argument.

check

Check to see if a nfs_client_id4 is allowed to reclaim. This command requires a hex-encoded nfs_client_id4 as an argument.

gracedone

Remove any unreclaimed client records from the database. This command requires a epoch boot time as an argument.

## EXTERNAL CONFIGURATION
The directory for stable storage information can be set via the file /etc/nfs.conf by setting the storagedir value in the nfsdcltrack section. For example:

[nfsdcltrack]

storagedir = /shared/nfs/nfsdcltrack

Debuging to syslog can also be enabled by setting "debug = 1" in this file.

## LEGACY TRANSITION MECHANISM
The Linux kernel NFSv4 server has historically tracked this information on stable storage by manipulating information on the filesystem directly, in the directory to which /proc/fs/nfsd/nfsv4recoverydir points. If the kernel passes the correct information, then nfsdcltrack can use it to allow a seamless transition from the old client tracking scheme to the new one.

On a check operation, if there is no record of the client in the database, nfsdcltrack will look to see if the NFSDCLTRACK_LEGACY_RECDIR environment variable is set. If it is, then it will fetch that value and see if a directory exists by that name. If it does, then the check operation will succeed and the directory will be removed.

On a gracedone operation, nfsdcltrack will look to see if the NFSDCLTRACK_LEGACY_TOPDIR environment variable is set. If it is, then it will attempt to clean out that directory prior to exiting.

Note that this transition is one-way. If the machine subsequently reboots back into an older kernel that does not support the nfsdcltrack upcall then the clients will not be able to recover their state.

## NOTES
This program requires a kernel that supports the nfsdcltrack usermodehelper upcall. This support was first added to mainline kernels in 3.8.

## AUTHORS
nfsdcltrack was developed by Jeff Layton <jlayton@redhat.com>.


nfsstat

title: nfsstat(8)

summary: list NFS statistics

text:
# nfsstat(8)

## NAME
nfsstat - list NFS statistics

## SYNOPSIS
nfsstat [OPTION]...

## DESCRIPTION
The nfsstat displays statistics kept about NFS client and server activity.

## OPTIONS
-s, --server

Print only server-side statistics. The default is to print both server and client statistics.

-c, --client

Print only client-side statistics.

-n, --nfs

Print only NFS statistics. The default is to print both NFS and RPC information.

-2

Print only NFS v2 statistics. The default is to only print information about the versions of NFS that have non-zero counts.

-3

Print only NFS v3 statistics. The default is to only print information about the versions of NFS that have non-zero counts.

-4

Print only NFS v4 statistics. The default is to only print information about the versions of NFS that have non-zero counts.

-m, --mounts

Print information about each of the mounted NFS file systems. If this option is used, all other options are ignored.

-r, --rpc

Print only RPC statistics.

-o facility

Display statistics for the specified facility, which must be one of:

nfs

NFS protocol information, split up by RPC call.

rpc

General RPC information.

net

Network layer statistics, such as the number of received packets, number of TCP connections, etc.

fh

Usage information on the server's file handle cache, including the total number of lookups, and the number of hits and misses.

rc

Usage information on the server's request reply cache, including the total number of lookups, and the number of hits and misses.

io

Usage information on the server's io statistics; bytes read and written.

ra

Usage information on the server's read ahead cache, including the ra cache size, the depth of ra cache hits, and ra cache misses.

all

Display all of the above facilities.

-v, --verbose

This is equivalent to -o all.

-l, --list

Print information in list form.

-S, --since file

Instead of printing current statistics, nfsstat imports statistics from file and displays the difference between those and the current statistics. Valid input files may be in the form of /proc/net/rpc/nfs (raw client stats), /proc/net/rpc/nfsd (raw server stats), or saved output from nfsstat itself (client and/or server stats). Any statistics missing from a saved nfsstat output file are treated as zeroes.

-Z[interval], --sleep=[interval]

Instead of printing current statistics and immediately exiting, nfsstat takes a snapshot of the current statistics and pauses until it receives SIGINT (typically from Ctrl-C), at which point it takes another snapshot and displays the difference between the two. If interval is specified, nfsstat will print the number of NFS calls made since the previous report. Stats will be printed repeatedly every interval seconds.

## EXAMPLES
nfsstat -o all -234

Show all information about all versions of NFS.

nfsstat --verbose -234

Same as above.

nfsstat -o all

Show all information about active versions of NFS.

nfsstat --nfs --server -3

Show statistics for NFS version 3 server.

nfsstat -m

Show information about mounted NFS filesystems.

## DISPLAY
The Flags output from the -m option is the same as the flags give to the mount command.

## FILES
/proc/net/rpc/nfsd

procfs-based interface to kernel NFS server statistics.

/proc/net/rpc/nfs

procfs-based interface to kernel NFS client statistics.

/proc/mounts

procfs-based interface to the mounted filesystems.

## SEE ALSO
rpc.nfsd(8). nfs(5).

## BUGS
The default output has been changed. To get the old default output you must run nfsstat --auto -2.

The function of the -v and -a options have changed. The -a option is now reserved for future use. The -v does what the -a option used to do, and the new -[234] options replace the -v option.

The Display section should be more complete.

Further bugs can be found or reported at http://nfs.sf.net/.

## AUTHOR
Olaf Kirch, <okir@suse.de>


svcgssd

title: svcgssd(8)

summary: server-side rpcsec_gss daemon

text:
# svcgssd(8)

## NAME
rpc.svcgssd - server-side rpcsec_gss daemon

## SYNOPSIS
rpc.svcgssd [-n] [-v] [-r] [-i] [-f] [-p principal]

## DESCRIPTION
The rpcsec_gss protocol gives a means of using the gss-api generic security api to provide security for protocols using rpc (in particular, nfs). Before exchanging any rpc requests using rpcsec_gss, the rpc client must first establish a security context with the rpc server. The linux kernel's implementation of rpcsec_gss depends on the userspace daemon rpc.svcgssd to handle context establishment on the rpc server. The daemon uses files in the proc filesystem to communicate with the kernel.

## OPTIONS
-f

Runs rpc.svcgssd in the foreground and sends output to stderr (as opposed to syslogd)

-v

Increases the verbosity of the output (can be specified multiple times).

-r

If the rpcsec_gss library supports setting debug level, increases the verbosity of the output (can be specified multiple times).

-i

If the nfsidmap library supports setting debug level, increases the verbosity of the output (can be specified multiple times).

-p

Use principal instead of the default nfs/FQDN@REALM.

-n

Use the system default credentials (host/FQDN@REALM) rather than the default nfs/FQDN@REALM.

## CONFIGURATION FILE
Some of the options that can be set on the command line can also be controlled through values set in the [svcgssd] section of the /etc/nfs.conf configuration file. Values recognized include:

principal

If set to system this is equivalent to the -n option. If set to any other value, that is used like the -p option.

## SEE ALSO
rpc.gssd(8),

## AUTHORS
Dug Song <dugsong@umich.edu>

Andy Adamson <andros@umich.edu>

Marius Aamodt Eriksen <marius@umich.edu>

J. Bruce Fields <bfields@umich.edu>


mountstats

package: nfs-stats

title: mountstats(8)

text:
# mountstats(8)

## NAME
mountstats - Displays various NFS client per-mount statistics

## SYNOPSIS
mountstats [-h|--help] [-v|--version] [-f|--file infile] [-S|--since sincefile] [ [-n|--nfs] | [-r|--rpc] | [-R|--raw] | [-x|--xprt] ] [mountpoint]...

mountstats iostat [-h|--help] [-v|--version] [-f|--file infile] [-S|--since sincefile] [interval] [count] [mountpoint]...

mountstats nfsstat [-h|--help] [-v|--version] [-f|--file infile] [-S|--since sincefile] [-3] [-4] [mountpoint]...

## DESCRIPTION
The mountstats command displays various NFS client statisitics for each given mountpoint.

If no mountpoint is given, statistics will be displayed for all NFS mountpoints on the client.

### Sub-commands
Valid mountstats(8) subcommands are:

mountstats

Display a combination of per-op RPC statistics, NFS event counts, and NFS byte counts. This is the default sub-command that will be executed if no sub-command is given.

iostat

Display iostat-like statistics.

nfsstat

Display nfsstat-like statistics.

## OPTIONS

### Options valid for all sub-commands
-h, --help

show the help message and exit

-v, --version

show program's version number and exit

-f infile, --file infile

Read stats from infile instead of /proc/self/mountstats. infile must be in the same format as /proc/self/mountstats. This may be used with the -S|--since options to display the delta between two different points in time. This may not be used with the interval or count options of the iostat sub-command.

-S sincefile, --since sincefile

Show difference between current stats and those in sincefile. sincefile must be in the same format as /proc/self/mountstats. This may be used with the -f|--file options to display the delta between two different points in time. This may not be used with the interval or count options of the iostat sub-command.

### Options specific to the mountstats sub-command
-n, --nfs Display only the NFS statistics

-r, --rpc

Display only the RPC statistics

-R, --raw

Display only the raw statistics. This is intended for use with the -f|--file and -S|--since options.

-x, --xprt

Display only the transport statistics

### Options specific to the iostat sub-command
interval

Specifies the amount of time in seconds between each report. The first report contains statistics for the time since each file system was mounted. Each subsequent report contains statistics collected during the interval since the previous report. This may not be used with the -f|--file or -S|--since options.

count

Determines the number of reports generated at interval seconds apart. If the interval parameter is specified without the count parameter, the command generates reports continuously. This may not be used with the -f|--file or -S|--since options.

### Options specific to the nfsstat sub-command
-3

Show only NFS version 3 statistics. The default is to show both version 3 and version 4 statistics.

-4

Show only NFS version 4 statistics. The default is to show both version 3 and version 4 statistics.

## FILES
/proc/self/mountstats

## SEE ALSO
iostat(8), nfsiostat(8), nfsstat(8)

## AUTHOR
Chuck Lever <chuck.lever@oracle.com>


nfsdclnts

title: nfsdclnts(8)

text:
# nfsdclnts(8)

## NAME
nfsdclnts - print various nfs client information for knfsd server.

## SYNOPSIS
nfsdclnts [-h] [-t type] [--clientinfo] [--hostname] [-q]

## DESCRIPTION
The nfsdclnts(8) command parses the content present in /proc/fs/nfsd/clients/ directories. nfsdclnts(8) displays files which are open, locked, delegated by the nfs-client. It also prints useful client information such as hostname, clientID, NFS version mounted by the nfs-client.

## OPTIONS
-t, --type=TYPE

Specify the type of file to be displayed. Takes only one TYPE at a time. open, lock, deleg, layout, or all

open: displays the open files by nfs-client(s).

lock: displays the files locked by nfs-client(s).

layout: displays the files for which layout is given.

deleg: displays delegated files information and delegation type.

all: prints all the above type.

--clientinfo

displays various nfs-client info fields such as version of nfs mounted at nfs-client and clientID.

--hostname

Print hostname of nfs-client instead of ip-address.

-q, --quiet

Hide the header information.

-v, --verbose

Verbose operation, show debug messages.

-f, --file

Instead of processing all client directories under /proc/fs/nfsd/clients, one can provide a specific states file to process. One should make sure that info file resides in the same directory as states file. If the info file is not valid or present the fields would be marked as "N/A".

-h, --help

Print help explaining the command line options.

## EXAMPLES
nfsdclnts --type open

List all files with open type only.

```
Inode number | Type   | Access | Deny | ip address            | Filename
33823232     | open   | r-     | --   | [::1]:757             | testfile
```

nfsdclnts --type deleg

List all files with deleg type only.

```
Inode number | Type   | Access | ip address            | Filename
33823232     | deleg  | r      | [::1]:757             | testfile
```

nfsdclnts --hostname

Print hostname instead of ip-address.

```
Inode number | Type   | Access | Deny | Hostname              | Filename
33823232     | open   | r-     | --   | nfs-server            | testfile
33823232     | deleg  | r      |      | nfs-server            | testfile
```

nfsdclnts --clientinfo

Print client information.

```
Inode number | Type   | Access | Deny | ip address            | Client ID           | vers | Filename
33823232     | open   | r-     | --   | [::1]:757             | 0xc79a009f5eb65e84  | 4.2  | testfile
33823232     | deleg  | r      |      | [::1]:757             | 0xc79a009f5eb65e84  | 4.2  | testfile
```

nfsdclnts --file /proc/fs/nfsd/clients/3/states -t open

Process specific states file.

```
Inode number | Type   | Access | Deny | ip address            | Client ID           | vers | Filename
33823232     | open   | r-     | --   | [::1]:757             | 0xc79a009f5eb65e84  | 4.2  | testfile
```

nfsdclnts --quiet --hostname

Hide the header information.

```
33823232     | open   | r-     | --   | nfs-server            | testfile
33823232     | deleg  | r      |      | nfs-server            | testfile
```

## FILES
/proc/fs/nfsd/clients/

Displays basic information about each NFSv4 client.

/proc/fs/nfsd/clients/#/info

Displays information about all the opens held by the given client, including open modes, device numbers, inode numbers, and open owners.

/proc/fs/nfsd/clients/#/states

## NOTES
/proc/fs/nfsd/clients/ support was initially introduced in 5.3 kernel and is only implemented for mount points using NFSv4.

## BUGS
Please report any BUGs to <linux-nfs@vger.kernel.org>

## SEE ALSO
nfsd(8), exportfs(8), idmapd(8), statd(8)

## AUTHORS
Achilles Gaikwad <agaikwad@redhat.com> and Kenneth D'souza <kdsouza@redhat.com>


nfsiostat

title: nfsiostat(8)

text:
# nfsiostat(8)

## NAME
nfsiostat - Emulate iostat for NFS mount points using /proc/self/mountstats

## SYNOPSIS
nfsiostat [[<interval>] [<count>]] [<options>][<mount_point>]

## DESCRIPTION
The nfsiostat command displays NFS client per-mount statisitics.

<interval>

specifies the amount of time in seconds between each report. The first report contains statistics for the time since each file system was mounted. Each subsequent report contains statistics collected during the interval since the previous report.

<count>

If the <count> parameter is specified, the value of <count> determines the number of reports generated at <interval> seconds apart. if the interval parameter is specified without the <count> parameter, the command generates reports continuously.

<options>

Define below

<mount_point>

If one or more <mount point> names are specified, statistics for only these mount points will be displayed. Otherwise, all NFS mount points on the client are listed.

The meaning of each column of nfsiostat's output is the following:

- op/s This is the number of operations per second.

- rpc bklog This is the length of the backlog queue.

- kB/s This is the number of kB written/read per second.

- kB/op This is the number of kB written/read per each operation.

- retrans This is the number of retransmissions.

- avg RTT (ms) This is the duration from the time that client's kernel sends the RPC request until the time it receives the reply.

- avg exe (ms) This is the duration from the time that NFS client does the RPC request to its kernel until the RPC request is completed, this includes the RTT time above.

- avg queue (ms) This is the duration from the time the NFS client created the RPC request task to the time the request is transmitted.

- errors This is the number of operations that completed with an error status (status < 0). This count is only available on kernels with RPC iostats version 1.1 or above.

Note that if an interval is used as argument to nfsiostat, then the diffrence from previous interval will be displayed, otherwise the results will be from the time that the share was mounted.

## OPTIONS
-a or --attr

displays statistics related to the attribute cache

-d or --dir

displays statistics related to directory operations

-h or --help

shows help message and exit

-l LIST or --list=LIST

only print stats for first LIST mount points

-p or --page

displays statistics related to the page cache

-s or --sort

Sort NFS mount points by ops/second

--version

show program's version number and exit

## FILES
/proc/self/mountstats

## SEE ALSO
iostat(8), mountstats(8), nfsstat(8)

## AUTHOR
Chuck Lever <chuck.lever@oracle.com>


mount.nfs

package: nfs-utils

title: mount.nfs(8)

summary: mount a Network File System

text:
# mount.nfs(8)

## NAME
mount.nfs, mount.nfs4 - mount a Network File System

## SYNOPSIS
mount.nfs remotetarget dir [-rvVwfnsh ] [-o options]

## DESCRIPTION
mount.nfs is a part of nfs(5) utilities package, which provides NFS client functionality.

mount.nfs is meant to be used by the mount(8) command for mounting NFS shares. This subcommand, however, can also be used as a standalone command with limited functionality.

remotetarget is a server share usually in the form of servername:/path/to/share. dir is the directory on which the file system is to be mounted.

Under Linux 2.6.32 and later kernel versions, mount.nfs can mount all NFS file system versions. Under earlier Linux kernel versions, mount.nfs4 must be used for mounting NFSv4 file systems while mount.nfs must be used for NFSv3 and v2.

## OPTIONS
-r

Mount file system readonly.

-v

Be verbose.

-V

Print version.

-w

Mount file system read-write.

-f

Fake mount. Don't actually call the mount system call.

-n

Do not update /etc/mtab. By default, an entry is created in /etc/mtab for every mounted file system. Use this option to skip making an entry.

-s

Tolerate sloppy mount options rather than fail.

-h

Print help message.

nfsoptions

Refer to nfs(5) or mount(8) manual pages.

## NOTE
For further information please refer nfs(5) and mount(8) manual pages.

## FILES
/etc/fstab

file system table

/etc/mtab

table of mounted file systems

/etc/nfsmount.conf

Configuration file for NFS mounts

## SEE ALSO
nfs(5), nfsmount.conf(5), mount(8),

## AUTHOR
Amit Gud <agud@redhat.com>


rpcdebug

title: rpcdebug(8)

text:
# rpcdebug(8)

## NAME
rpcdebug - set and clear NFS and RPC kernel debug flags

## SYNOPSIS
rpcdebug -vh

rpcdebug -m module

rpcdebug -m module -s flags...

rpcdebug -m module -c flags...

## DESCRIPTION
The rpcdebug command allows an administrator to set and clear the Linux kernel's NFS client and server debug flags. Setting these flags causes the kernel to emit messages to the system log in response to NFS activity; this is typically useful when debugging NFS problems.

The first form in the synopsis can be used to list all available debug flags. The second form shows the currently set debug flags for the given module. The third form sets one or more flags, and the fourth form clears one or more flags.

The value all may be used to set or clear all the flags for the given module.

## OPTIONS
-c

Clear the given debug flags.

-h

Print a help message and exit. When combined with the -v option, also prints the available debug flags.

-m module

Specify which module's flags to set or clear. Available modules are:

nfsd

The NFS server.

nfs

The NFS client.

nlm

The Network Lock Manager, in either an NFS client or server.

rpc

The Remote Procedure Call module, in either an NFS client or server.

-s

Set the given debug flags.

-v

Increase the verbosity of rpcdebug's output.

## FILES
/proc/sys/sunrpc/{rpc,nfs,nfsd,nlm}_debug

procfs-based interface to kernel debug flags.

## SEE ALSO
rpc.nfsd(8), nfs(5), syslogd(8).

## BUGS
Bugs can be found or reported at http://nfs.sf.net/.

## AUTHOR
Program by Olaf Kirch <okir@suse.de> and <frederic.jolly@bull.ext.net>. Manpage by Greg Banks <gnb@melbourne.sgi.com>.


showmount

title: showmount(8)

text:
# showmount(8)

## NAME
showmount - show mount information for an NFS server

## SYNOPSIS
showmount [ -adehv ] [ --all ] [ --directories ] [ --exports ] [ --help ] [ --version ] [ host ]

## DESCRIPTION
showmount queries the mount daemon on a remote host for information about the state of the NFS server on that machine. With no options showmount lists the set of clients who are mounting from that host. The output from showmount is designed to appear as though it were processed through ``sort -u''.

## OPTIONS
-a or --all

List both the client hostname or IP address and mounted directory in host:dir format. This info should not be considered reliable. See the notes on rmtab in rpc.mountd(8).

-d or --directories

List only the directories mounted by some client.

-e or --exports

Show the NFS server's export list.

-h or --help

Provide a short help summary.

-v or --version

Report the current version number of the program.

--no-headers

Suppress the descriptive headings from the output.

## SEE ALSO
rpc.mountd(8), rpc.nfsd(8)

## BUGS
The completeness and accuracy of the information that showmount displays varies according to the NFS server's implementation.

Because showmount sorts and uniqs the output, it is impossible to determine from the output whether a client is mounting the same directory more than once.

showmount works by contacting the server's MNT service directly. NFSv4-only servers have no need to advertise their exported root filehandles via this method, and may not expose their MNT service to clients.

## AUTHOR
Rick Sladkey <jrs@world.std.com>


umount.nfs

title: umount.nfs(8)

summary: unmount a Network File System

text:
# umount.nfs(8)

## NAME
umount.nfs, umount.nfs4 - unmount a Network File System

## SYNOPSIS
umount.nfs dir [-fvnrlh ]

## DESCRIPTION
umount.nfs and umount.nfs4 are a part of nfs(5) utilities package, which provides NFS client functionality.

umount.nfs4 and umount.nfs are meant to be used by the umount(8) command for unmounting NFS shares. This subcommand, however, can also be used as a standalone command with limited functionality.

dir is the directory on which the file system is mounted.

## OPTIONS
-f

Force unmount the file system in case of unreachable NFS system.

-v

Be verbose.

-n

Do not update /etc/mtab. By default, an entry is created in /etc/mtab for every mounted file system. Use this option to skip deleting an entry.

-r

In case unmounting fails, try to mount read-only.

-l

Lazy unmount. Detach the file system from the file system hierarchy now, and cleanup all references to the file system as soon as it is not busy anymore.

-h

Print help message.

## NOTE
For further information please refer nfs(5) and umount(8) manual pages.

## FILES
/etc/fstab

file system table

/etc/mtab

table of mounted file systems

## SEE ALSO
nfs(5), umount(8),

## AUTHOR
Amit Gud <agud@redhat.com>