Man page of sm-notify
Section: Maintenance Commands (8)
Updated: 19 Mar 2007
Return to Main Contents
sm-notify - Send out NSM reboot notifications
/sbin/sm-notify [-dfq] [-m time] [-p port] [-P path] [-v my_name ]
File locking over NFS (v2 and v3) requires a facility to notify peers in
case of a reboot, so that clients can reclaim locks after
a server crash, and/or
servers can release locks held by the rebooted client.
This is a two-step process: during normal
operations, a mechanism is required to keep track of which
hosts need to be informed of a reboot. And of course,
notifications need to be sent out during reboot.
The protocol used for this is called NSM, for
Network Status Monitor.
This implementation separates these into separate program.
tracks hosts which need to be notified and this
performs the notification. When
is started it will typically started
but this is configurable.
For each NFS client or server machine to be monitored,
creates a file in
and removes the file if monitoring is no longer required.
When the machine is rebooted,
iterates through these files and notifies the peer
server on those machines.
Each machine has an
NSM state ,
which is basically an integer counter that is incremented
each time the machine reboots. This counter is stored
and updated by
has little need for root privileges and so drops them as soon as
It continues to need to make changes to the
directories so to be able to drop privileges, these must be writable
by a non-privileged user. If these directories are owned by a
will drop privilege to match that user once it has created sockets for
sending out request (for which it needs privileged) but before it
processes any reply (which is the most likely source of possible
- -m failtime
When notifying hosts,
will try to contact each host for up to 15 minutes,
and will give up if unable to reach it within this time
option, you can override this. A value of 0 tells
sm-notify to retry indefinitely; any other value is
interpreted as the maximum retry time in minutes.
- -v ipaddr-or-hostname
This option tells
to bind to the specified
(or the ipaddr of the given
so that all notification packets originate from this address.
This is useful for NFS failover. The given name is also used as the
of this host in the NSM request.
- -p port
to bind to the indicated IP
number. If this option is not given, it will try to bind to
a randomly chosen privileged port below 1024.
Be quiet. This suppresses all messages except error
messages while collecting the list of hosts.
- -P /path/to/state/directory
should look in a no-standard place of state file, the path can be
given here. The directories
and the file
must exist in that directory with the standard names.
If the state path has not been reset with
will normally create a file in
to indicate that it has been
run. If this file is found when
starts, it will not run again (as it is normally only needed once per
will run even if the file in
Do not update the NSM state. This is for testing only. Setting this
forks and puts itself in the background after obtaining the
list of hosts from
Olaf Kirch <[email protected]>
- SEE ALSO
This document was created by
using the manual pages.
Time: 04:17:50 GMT, September 24, 2010