1NFSDCLTRACK(8) NFSDCLTRACK(8)
2
3
4
6 nfsdcltrack - NFSv4 Client Tracking Callout Program
7
9 nfsdcltrack [-d] [-f] [-s stable storage dir] <command> <args...>
10
12 nfsdcltrack is the NFSv4 client tracking callout program. It is not
13 necessary to install this program on machines that are not acting as
14 NFSv4 servers.
15
16 When a network partition is combined with a server reboot, there are
17 edge conditions that can cause the server to grant lock reclaims when
18 other clients have taken conflicting locks in the interim. A more
19 detailed explanation of this issue is described in RFC 3530, section
20 8.6.3 and in RFC 5661, section 8.4.3.
21
22 In order to prevent these problems, the server must track a small
23 amount of per-client information on stable storage. This program
24 provides the userspace piece of that functionality. When the kernel
25 needs to manipulate the database that stores this info, it will execute
26 this program to handle it.
27
29 -d, --debug
30 Enable debug level logging.
31
32 -f, --foreground
33 Log to stderr instead of syslog.
34
35 -s storagedir, --storagedir=storage_dir
36 Directory where stable storage information should be kept. The
37 default value is /var/lib/nfs/nfsdcltrack.
38
40 nfsdcltrack requires a command for each invocation. Supported commands
41 are:
42
43 init
44 Initialize the database. This command requires no argument.
45
46 create
47 Create a new client record (or update the timestamp on an existing
48 one). This command requires a hex-encoded nfs_client_id4 as an
49 argument.
50
51 remove
52 Remove a client record from the database. This command requires a
53 hex-encoded nfs_client_id4 as an argument.
54
55 check
56 Check to see if a nfs_client_id4 is allowed to reclaim. This
57 command requires a hex-encoded nfs_client_id4 as an argument.
58
59 gracedone
60 Remove any unreclaimed client records from the database. This
61 command requires a epoch boot time as an argument.
62
64 The directory for stable storage information can be set via the file
65 /etc/nfs.conf by setting the storagedir value in the nfsdcltrack
66 section. For example:
67 [nfsdcltrack]
68 storagedir = /shared/nfs/nfsdcltrack
69 Debuging to syslog can also be enabled by setting "debug = 1" in this
70 file.
71
73 The Linux kernel NFSv4 server has historically tracked this information
74 on stable storage by manipulating information on the filesystem
75 directly, in the directory to which /proc/fs/nfsd/nfsv4recoverydir
76 points. If the kernel passes the correct information, then nfsdcltrack
77 can use it to allow a seamless transition from the old client tracking
78 scheme to the new one.
79
80 On a check operation, if there is no record of the client in the
81 database, nfsdcltrack will look to see if the NFSDCLTRACK_LEGACY_RECDIR
82 environment variable is set. If it is, then it will fetch that value
83 and see if a directory exists by that name. If it does, then the check
84 operation will succeed and the directory will be removed.
85
86 On a gracedone operation, nfsdcltrack will look to see if the
87 NFSDCLTRACK_LEGACY_TOPDIR environment variable is set. If it is, then
88 it will attempt to clean out that directory prior to exiting.
89
90 Note that this transition is one-way. If the machine subsequently
91 reboots back into an older kernel that does not support the nfsdcltrack
92 upcall then the clients will not be able to recover their state.
93
95 This program requires a kernel that supports the nfsdcltrack
96 usermodehelper upcall. This support was first added to mainline kernels
97 in 3.8.
98
100 nfsdcltrack was developed by Jeff Layton <jlayton@redhat.com>.
101
102
103
104 2012-10-24 NFSDCLTRACK(8)