]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/statd/sm-notify.8
Add sm-notify from SuSE
[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 "8 Mar 2004
6 .SH NAME
7 sm-notify \- Send out NSM reboot notifications
8 .SH SYNOPSIS
9 .BI "/sbin/sm-notify [-d] [-q] [-m " time "]
10 .SH DESCRIPTION
11 File locking over NFS 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 Commonly, these two features are provided by the
24 .B rpc.statd
25 daemon.
26 The SuSE Linux Kernel includes a kernel level implementation
27 of
28 .BR statd ", "
29 which keeps track of the hosts that need notifications, and
30 accepts reboot notifications.
31 .PP
32 This is complemented by the
33 .B sm-notify
34 application, which is responsible for sending out the reboot
35 notifications.
36 .SS Operation
37 For each NFS client or server machine to be monitored,
38 the kernel level
39 .B statd
40 creates a file in
41 .BR /var/lib/nfs/sm ", "
42 and removes the file if monitoring is no longer required.
43 .PP
44 When the machine is rebooted,
45 .B sm-notify
46 iterates through these files and notifies the peer
47 .B statd
48 server on those machines.
49 .PP
50 Each machine has an
51 .I "NSM state" ,
52 which is basically an integer counter that is incremented
53 each time the machine reboots. This counter is stored
54 in
55 .BR /var/lib/nfs/state ,
56 and updated by
57 .BR sm-notify .
58 .SH OPTIONS
59 .TP
60 .BI -m " failtime
61 When notifying hosts,
62 .B sm-notify
63 will try to contact each host for up to 15 minutes,
64 and will give up if unable to reach it within this time
65 frame.
66 .IP
67 Using the
68 .B -m
69 option, you can override this. A value of 0 tells
70 sm-notify to retry indefinitely; any other value is
71 interpreted as the maximum retry time in minutes.
72 .TP
73 .BI -v " ipaddr
74 This option tells
75 .B sm-notify
76 to bind to the specified
77 .IR ipaddr ,
78 so that all notification packets originate from this address.
79 This is useful for NFS failover.
80 .TP
81 .BI -p " port
82 instructs
83 .B sm-notify
84 to bind to the indicated IP
85 .IR port
86 number. If this option is not given, it will try to bind to
87 a randomly chosen privileged port below 1024.
88 .TP
89 .B -q
90 Be quiet. This suppresses all messages except error
91 messages while collecting the list of hosts.
92 .TP
93 .B -n
94 Do not update the NSM state. This is for testing only.
95 .TP
96 .B -d
97 Enables debugging.
98 By default,
99 .B sm-notify
100 forks and puts itself in the background after obtaining the
101 list of hosts from
102 .BR /var/lib/nfs/sm .
103 .SH FILES
104 .BR /var/lib/nfs/state
105 .br
106 .BR /var/lib/nfs/sm/*
107 .br
108 .BR /var/lib/nfs/sm.bak/*
109 .SH SEE ALSO
110 .BR rpc.nfsd(8),
111 .BR portmap(8)
112 .SH AUTHORS
113 .br
114 Olaf Kirch <okir@suse.de>