.\"
.\"  Copyright 2001-2003 Sistina Software, Inc.
.\"  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.

.\" groff -t -e -mandoc -Tlatin1 gulm.8 | less

.tl 'lock_gulmd(8)' 'lock_gulmd(8)'

\fBNAME\fP
.in +7
lock_gulmd - Grand Unified Lock Manager
.sp
.in -7
\fBSYNOPSIS\fP
.in +7
\fBlock_gulmd\fP --cluster_name <string> [options]
.sp
.in -7

\fBDESCRIPTION\fP
.in +7
\fBlock_gulmd\fP is a lock manager for \fBGFS\fP that was
designed to take advantage of the way \fBGFS\fP uses locks, and the way data
is transferred over TCP/IP.

\fBlock_gulmd\fP supports failover so that your gfs cluster can keep
running if the lockserver machine dies (or if one machine of a lockserver 
cluster dies).  
You can also run \fBlock_gulmd\fP
on the same nodes that mount your gfs filesystem(s).

\fBlock_gulmd\fP is really three servers in one: It contains the core,
locktable interface, 
and locktable servers.  Each of these gets its own process, and the 
locktable server may get more than one process depending on your config.  
Core is responsible for client membership and heartbeats.
Locktable and locktable interface handle the locking.  
Multiple locktable processes can be run to improve performance on SMP systems 
via the \fIlt_partitions\fR option in the configuration. 

.sp
.in -7

\fBOPTIONS\fP
.in +7
You can completely configure gulm from the command line.  If you do this, you
need to use the same options on every node in the cluster.  You should
always specify the \fB--cluster_name\fP option, and then either the
\fB--use_ccs\fP or the \fB--servers\fP options.  Then other options should
follow.

\fB-h --help\fP
.in +7
Print usage information, then exit.

.sp
.in -7
\fB-V --version\fP
.in +7
Print version information, then exit.

.sp
.in -7
\fB-c --use_ccs\fP
.in +7
Make the calls out to ccsd load config from cluster.conf.  Will override any
previous options.  Likewise, options that follow this will override settings
from ccs.

.sp
.in -7
\fB-v --verbosity\fP \fIverbose flags\fR
.in +7
Sets which types of messages can be logged.

\fIverbose flags\fR is a comma separated list of the possible flags.  If a
flag is prefixed with a '-', it is unset, other wise it is set.  The
special flag 'clear' unsets all verbosity flags.  Any flag that is not
recognized is ignored.

The verbosity flags for gulm:

.TS
l l.
Network	Basic network related messages
Network2	T{
More specific network messages
T}
Network3	Nothing currently
Fencing	T{
When calling out to the fencing sub-system
T}
Heartbeat	T{
Every heartbeat sent and received
T}
Locking	T{
Various internal informational messages about the locks
T}
Forking	T{
Anytime a child processes is spawned
T}
ServerState	T{
Print out a message when ever the server changes state, saying what state
it is now in.
T}
JIDMap	T{
Details of each JID Mapping request
T}
JIDUpdates	T{
JID Mapping updates sent to slaves
T}
LockUpdates	T{
Lock requests sent to slaves
T}
LoginLoops	T{
Messages related to searching for and becoming the Master
T}

ReallyAll	All messages above
Default	same as -v "Network,Fencing,Forking"
All	T{
same as -v "ReallyAll,-Network3,-JIDUpdates,-LockUpdates"
T}
.TE

The verbose flags can be changed while \fBlock_gulmd\fP is running with
\fBgulm_tool\fP.

Default is Default.  (witty no?)

.sp
.in -7
\fB-s --servers\fP \fIserver list\fR
.in +7
Comma seperated list of nodes that can be master servers.
No default.

You can use either IPs or names.  Either IPv4 or IPv6 addresses can be
used.  Node names are looked up via libresolv into IPs.  IPv6 addresses
will be used over IPv4 addresses.

.sp
.in -7
\fB-n --cluster_name\fP \fIstring\fR
.in +7
The name of this cluster.
No default.

.sp
.in -7
\fB--heartbeat_rate\fP \fInumber\fR
.in +7
Number of seconds to wait before checking for missed heartbeats.  2/3 of this
value is the rate at which nodes send heartbeats to the master server.  You can
specify this as a floating point number to get less than a second times.

Use subsecond values at your own risk, as varying network
loads can cause false node expirations.

Default is 15.

.sp
.in -7
\fB--allowed_misses\fP \fInumber\fR
.in +7
How many heartbeats can be missed before the node is considered to have expired.
Default is 2.

.sp
.in -7
\fB--new_connection_timeout\fP \fInumber\fR
.in +7
How many seconds to wait before deciding a new socket is bogus and dropping it.
Can use floating point for sub second values.
Default is 15.

.sp
.in -7
\fB--master_scan_delay\fP \fInumber\fR
.in +7
How many seconds between each probe for a new master server.
Can use floating point for sub second values.
Default is 1.

.sp
.in -7
\fB--coreport\fP \fInumber\fR
.in +7
Which port does the core server listen on and connect to.
Default is 40040.

.sp
.in -7
\fB--ltpxport\fP \fInumber\fR
.in +7
Which port does the ltpx server listen on and lock clients connect to.
Default is 40042.

.sp
.in -7
\fB--ltport\fP \fInumber\fR
.in +7
Which port does the LT server listen on, and LT and LTPX clients connect to.
If you have multiple \fBlt_partitions\fP, the LT's id is added to this to get
its port. (Using the default, LT000 is at 41040, LT001 is at 41041, ect)
Default is 41040.

.sp
.in -7
\fB--fence_bin\fP \fIstring\fR
.in +7
The name of the program that handles fencing nodes for gulm.  This needs to be a
full path.

The program takes a single argument, the name of the node to be fenced.  If the
program returns an exit status of 0, then the fencing was succesful.  Otherwise
gulm waits 5 seconds, and calls it again.

Default is /sbin/fence_node

.sp
.in -7
\fB--run_as\fP \fIstring\fR
.in +7
User to switch into and run as.  Default is root. (which is not good.)

.sp
.in -7
\fB--lock_dir\fP \fIstring\fR
.in +7
The directory to place and store the pid lock files.
Default is /var/run/sistina/

.sp
.in -7
\fB--lt_partitions\fP \fInumber\fR
.in +7
Number of Lock Tables to run.  If more than one there will be
multiple LTs, and the LTPXes will stripe the locks across the LTs.  This is for
preformance on servers with multiple CPUs.
Default is 1. 

.sp
.in -7
\fB--name\fP \fIstring\fR
.in +7
Set the name of this gulm server to \fIstring\fR instead of the default.
Default is output of `uname -n`.

.sp
.in -7
\fB--ip\fP \fIip addr\fR
.in +7
Set the IP of this gulm server to \fIip addr\fR instead of trying to
resolve it from the name.
Default is to resolve this gulm servers name into an IP.

.sp
.in -7
\fB--ifdev\fP \fInetwork device name\fR
.in +7
Use the IP that is configured for this \fInetwork device name\fR. If there
is an IPv6 address, that is used.  Otherwise the IPv4 will be used.
No default.

.sp
.in -7
\fB-e\fP
.in +7
When switching into daemon mode, leave stderr and stdout open.

.sp
.in -7
\fB-d\fP
.in +7
Do not damonize. (will still fork each server.)

.sp
.in -7
\fB-C\fP
.in +7
Load all config items (command line arguments and ccs data), and print
configuration as we see it and exit.

.sp
.in -7
.in -7

\fBSIGNALS\fP
.in +7

\fBSIGTERM\fP
.in +7
This signal is ignored.  To stop gulm you should use the shutdown command
to gulm_tool.

.in -7

\fBSIGUSR1\fP
.in +7
Dump out internal tables for debugging.  This creates a bunch of files in
\fI/tmp\fR (or whatever you have TMPDIR set to).  All of these start with
the prefix \fIGulm_\fR and will be appended to if the file already exists.

Much of the information in these dump files is available via
\fBgulm_tool\fP, and \fBgulm_tool\fP is the preferred method of getting this 
information; the action of dumping these tables out stops all other activity 
and thus can have negative affects on the performance of \fBlock_gulmd\fP.  You
should not send this signal unless you really want those dump files and
know what to do with them.
.in -7

.in -7


\fBPRIVATE NETWORKS\fP
.in +7

Getting gulm to use a private network is a matter of not relying on IP
lookups.  Sepcify all of the <lockserver/> entries with IP addresses.  Then
when starting lock_gulmd, make use of either the --ip option or the --ifdev
option.

.sp
.in -7


\fBEXAMPLES\fP
.in +7

When using ccs to configure gulm, start the daemon with:
  lock_gulmd --cluster_name foo --use_ccs

or:
  lock_gulmd -n foo -c

\fBlock_gulmd\fP can be run without CCS:
  lock_gulmd -n foo -s 192.168.1.1,192.168.1.2,192.168.1.3

This adds the following two verbose flags to the default set:
  lock_gulmd -n foo -c -v "Heartbeat,Locking"

Show only the Network messages:
  lock_gulmd -n foo -c -v "clear,Network"

Use the ip on the second ethernet device, and call me bar:
  lock_gulmd -n foo -c --name bar --ifdev eth1

Stopping the server:
  gulm_tool shutdown localhost

.in -7

\fBFILES\fP
.in +7
\fB/var/run/sistina/lock_gulmd_core.pid\fP

\fB/var/run/sistina/lock_gulmd_LTPX.pid\fP

\fB/var/run/sistina/lock_gulmd_LT000.pid\fP
.in +7
These are the pid lock files to keep more than one instance of the servers
running per node.  They can be put elsewhere via a configuration option.

.in -7
.in -7

\fBSEE ALSO\fP
.in +7
gulm_tool(8), lock_gulmd(5), ccs(7)

.in -7

