4 .\" Copyright (C) 2004 Olaf Kirch <okir@suse.de>
5 .TH sm-notify 8 "19 Mar 2007
7 sm-notify \- Send out NSM reboot notifications
9 .BI "/sbin/sm-notify [-dfq] [-m " time "] [-p " port "] [-P " path "] [-v " my_name " ]
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.
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" .
23 This implementation separates these into separate program.
25 tracks hosts which need to be notified and this
27 performs the notification. When
29 is started it will typically started
31 but this is configurable.
33 For each NFS client or server machine to be monitored,
36 .BR /var/lib/nfs/sm ", "
37 and removes the file if monitoring is no longer required.
39 When the machine is rebooted,
41 iterates through these files and notifies the peer
43 server on those machines.
47 which is basically an integer counter that is incremented
48 each time the machine reboots. This counter is stored
50 .BR /var/lib/nfs/state ,
55 has little need for root privileges and so drops them as soon as
57 It continues to need to make changes to the
61 directories so to be able to drop privileges, these must be writable
62 by a non-privileged user. If these directories are owned by a
65 will drop privilege to match that user once it has created sockets for
66 sending out request (for which it needs privileged) but before it
67 processes any reply (which is the most likely source of possible
74 will try to contact each host for up to 15 minutes,
75 and will give up if unable to reach it within this time
80 option, you can override this. A value of 0 tells
81 sm-notify to retry indefinitely; any other value is
82 interpreted as the maximum retry time in minutes.
84 .BI -v " ipaddr-or-hostname
87 to bind to the specified
89 (or the ipaddr of the given
91 so that all notification packets originate from this address.
92 This is useful for NFS failover. The given name is also used as the
94 of this host in the NSM request.
99 to bind to the indicated IP
101 number. If this option is not given, it will try to bind to
102 a randomly chosen privileged port below 1024.
105 Be quiet. This suppresses all messages except error
106 messages while collecting the list of hosts.
108 .BI -P " /path/to/state/directory
111 should look in a no-standard place of state file, the path can be
112 given here. The directories
118 must exist in that directory with the standard names.
121 If the state path has not been reset with
124 will normally create a file in
126 to indicate that it has been
127 run. If this file is found when
129 starts, it will not run again (as it is normally only needed once per
137 will run even if the file in
142 Do not update the NSM state. This is for testing only. Setting this
150 forks and puts itself in the background after obtaining the
152 .BR /var/lib/nfs/sm .
154 .BR /var/lib/nfs/state
156 .BR /var/lib/nfs/sm/*
158 .BR /var/lib/nfs/sm.bak/*
160 .BR /var/run/sm-notify.pid
166 Olaf Kirch <okir@suse.de>