]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/statd/sm-notify.8
sm-notify - make the manpage a little more up-to-date
[nfs-utils.git] / utils / statd / sm-notify.8
1 .\"
2 .\" sm-notify(8)
3 .\"
4 .\" Copyright (C) 2004 Olaf Kirch <okir@suse.de>
5 .TH sm-notify 8 "19 Mar 2007
6 .SH NAME
7 sm-notify \- Send out NSM reboot notifications
8 .SH SYNOPSIS
9 .BI "/sbin/sm-notify [-d] [-q] [-m " time "] [-p " port "] [-P " path "] [-v " my_name " ]
10 .SH DESCRIPTION
11 File locking over NFS (v2 and v3) requires a facility to notify peers in
12 case of a reboot, so that clients can reclaim locks after
13 a server crash, and/or
14 servers can release locks held by the rebooted client.
15 .PP
16 This is a two-step process: during normal
17 operations, a mechanism is required to keep track of which
18 hosts need to be informed of a reboot. And of course,
19 notifications need to be sent out during reboot.
20 The protocol used for this is called NSM, for
21 .IR "Network Status Monitor" .
22 .PP
23 This implementation separates these into separate program.
24 .B rpc.statd
25 tracks hosts which need to be notified and this
26 .B sm-notify
27 performs the notification.  When
28 .B rpc.statd
29 is started it will typically started
30 .B sm-notify
31 but this is configurable.
32 .SS Operation
33 For each NFS client or server machine to be monitored,
34 .B rpc.statd
35 creates a file in
36 .BR /var/lib/nfs/sm ", "
37 and removes the file if monitoring is no longer required.
38 .PP
39 When the machine is rebooted,
40 .B sm-notify
41 iterates through these files and notifies the peer
42 .B statd
43 server on those machines.
44 .PP
45 Each machine has an
46 .I "NSM state" ,
47 which is basically an integer counter that is incremented
48 each time the machine reboots. This counter is stored
49 in
50 .BR /var/lib/nfs/state ,
51 and updated by
52 .BR sm-notify .
53 .SH OPTIONS
54 .TP
55 .BI -m " failtime
56 When notifying hosts,
57 .B sm-notify
58 will try to contact each host for up to 15 minutes,
59 and will give up if unable to reach it within this time
60 frame.
61 .IP
62 Using the
63 .B -m
64 option, you can override this. A value of 0 tells
65 sm-notify to retry indefinitely; any other value is
66 interpreted as the maximum retry time in minutes.
67 .TP
68 .BI -v " ipaddr-or-hostname
69 This option tells
70 .B sm-notify
71 to bind to the specified
72 .IR ipaddr ,
73 (or the ipaddr of the given
74 .IR hostname )
75 so that all notification packets originate from this address.
76 This is useful for NFS failover.  The given name is also used as the
77 .I name
78 of this host in the NSM request.
79 .TP
80 .BI -p " port
81 instructs
82 .B sm-notify
83 to bind to the indicated IP
84 .IR port
85 number. If this option is not given, it will try to bind to
86 a randomly chosen privileged port below 1024.
87 .TP
88 .B -q
89 Be quiet. This suppresses all messages except error
90 messages while collecting the list of hosts.
91 .TP
92 .BI -P " /path/to/state/directory
93 If
94 .B sm-notify
95 should look in a no-standard place of state file, the path can be
96 given here.  The directories
97 .B sm
98 and
99 .B sm.bak
100 and the file
101 .B state
102 must exist in that directory with the standard names.
103 .TP
104 .B -n
105 Do not update the NSM state. This is for testing only.
106 .TP
107 .B -d
108 Enables debugging.
109 By default,
110 .B sm-notify
111 forks and puts itself in the background after obtaining the
112 list of hosts from
113 .BR /var/lib/nfs/sm .
114 .SH FILES
115 .BR /var/lib/nfs/state
116 .br
117 .BR /var/lib/nfs/sm/*
118 .br
119 .BR /var/lib/nfs/sm.bak/*
120 .SH SEE ALSO
121 .BR rpc.nfsd(8),
122 .BR portmap(8)
123 .SH AUTHORS
124 .br
125 Olaf Kirch <okir@suse.de>