Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nfsdcltrack(8) [centos man page]

NFSDCLTRACK(8)															    NFSDCLTRACK(8)

NAME
nfsdcltrack - NFSv4 Client Tracking Callout Program SYNOPSIS
nfsdcltrack [-d] [-f] [-s stable storage dir] <command> <args...> DESCRIPTION
nfsdcltack is the NFSv4 client tracking callout program. It is not necessary to install this daemon 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. 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. 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>. 2012-10-24 NFSDCLTRACK(8)

Check Out this Related Man Page

STABLERESTART(5)					      BSD File Formats Manual						  STABLERESTART(5)

NAME
nfs-stablerestart -- restart information for the NFSv4 server SYNOPSIS
nfs-stablerestart DESCRIPTION
The nfs-stablerestart file holds information that allows the NFSv4 server to restart without always returning the NFSERR_NOGRACE error, as described in the NFSv4 server specification; see Network File System (NFS) Version 4 Protocol RFC 3530, Section 8.6.3. The first record in the file, as defined by struct nfsf_rec in /usr/include/fs/nfs/nfsrvstate.h, holds the lease duration of the last incar- nation of the server and the number of boot times that follows. Following this are the number of previous boot times listed in the first record. The lease duration is used to set the grace period. The boot times are used to avoid the unlikely occurrence of a boot time being reused, due to a TOD clock going backwards. This record and the previous boot times with this boot time added is re-written at the end of the grace period. The rest of the file are appended records, as defined by struct nfst_rec in /usr/include/fs/nfs/nfsrvstate.h and are used represent one of two things. There are records which indicate that a client successfully acquired state and records that indicate a client's state was revoked. State revoke records indicate that state information for a client was discarded, due to lease expiry and an otherwise conflicting open or lock request being made by a different client. These records can be used to determine if clients might have done either of the edge conditions. If a client might have done either edge condition or this file is empty or corrupted, the server returns NFSERR_NOGRACE for any reclaim request from the client. For correct operation of the server, it must be ensured that the file is written to stable storage by the time a write op with IO_SYNC speci- fied has returned. This might require hardware level caching to be disabled for a local disk drive that holds the file, or similar. FILES
/var/db/nfs-stablerestart NFSv4 stable restart file /var/db/nfs-stablerestart.bak backup copy of the file SEE ALSO
nfsv4(4), nfsd(8) BUGS
If the file is empty, the NFSv4 server has no choice but to return NFSERR_NOGRACE for all reclaim requests. Although correct, this is a highly undesirable occurrence, so the file should not be lost if at all possible. The backup copy of the file is maintained and used by the nfsd(8) to minimize the risk of this occurring. To move the file, you must edit the nfsd sources and recompile it. This was done to discour- age accidental relocation of the file. BSD
April 10, 2011 BSD
Man Page