NAME
drm_admin — Data Replication Manager administrative tool
SYNOPSIS
/usr/sbin/ncs/drm_admin
[-version]
DESCRIPTION
drm_admin
administers servers based on the Data Replication Manager
(DRM)
such as
glbd,
the replicated version of the Global Location Broker
(GLB).
drm_admin
is used to inspect or modify replica lists,
merge databases to force convergence among replicas,
stop servers, and delete replicas.
The role of
drm_admin
is to administer the replication of databases,
not to change the data they contain.
For example, use
drm_admin
to merge two replicas of the
GLB
database;
use
lb_admin
to add a new entry to the database.
Also, although
drm_admin
can stop or delete a GLB replica,
you must invoke
glbd
directly if you want
to start or create a replica.
Once invoked,
drm_admin
enters an interactive mode,
in which it accepts the commands described below.
OPTIONS
- -version
Display the version of NCK that this
drm_admin
belongs to,
but do not start the tool.
COMMANDS
Most
drm_admin
commands
operate on a default object (default_obj)
at a default host (default_host).
Together,
default_obj
and
default_host
specify a default replica.
Defaults are established by the
set
command
and are remembered until changed by another
set.
Currently, the only known object is
glb.
Some
drm_admin
commands operate on a host other than the default.
We identify this host as
other_host .
The host name you supply as a
default_host
or an
other_host
takes the form
family:host,
where the host can be specified either by its name
or by its network address.
For example,
ip:bertie,
ip:#192.5.5.5,
dds://jeeves,
and
dds:#101a.57f95
are acceptable host names.
(All
HP-UX
hosts have
ip
as the
family.)
- addrep other_host
Add
other_host
to the replica list at
default_host.
The replica at
default_host
will propagate
other_host
to all other replica lists for
default_obj.
- chrep -from other_host -to new_other_host
Change the network address for
other_host
in the replica list at
default_host
to
new_other_host.
The replica at
default_host
will propagate this change to all other replica lists for
default_obj.
The
chrep
command fails if a replica of
default_obj
is running at
other_host
or if
other_host
is not on the replica list at
default_host.
- delrep other_host
Delete the replica of
default_obj
at
other_host.
The
delrep
command tells the replica at
other_host
- 1.
To propagate all of the entries in its propagation queue.
- 2.
To propagate a delete request to all other replicas, causing
other_host
to be deleted from all other replica lists for
default_obj.
- 3.
To delete its copy of
default_obj .
- 4.
To stop running.
The
delrep
command returns you immediately to the
drm_admin
prompt, but the actual deletion of the replica can take a long time
in configurations that are not stable and intact.
To check whether the daemon for the deleted replica has stopped,
list the processes running on its host.
- info
Get status information about the replica for
default_obj
at
default_host.
- lrep [ -d ] [ -clocks ] [ -na ]
List replicas for
default_obj
as stored in
the replica list at
default_host.
The
-d
option lists deleted as well as existing replicas.
The
-clocks
option shows the current time on each host
and indicates clock skew among the replicas.
The
-na
option lists the network address of each host.
- merge { -from | -to } other_host
The
merge
command copies entries in the
default_obj
database and replica list from one replica to another.
It copies an entry if no corresponding entry exists
in the destination database or if the corresponding entry
in the destination database bears an earlier timestamp.
A merge does not cause entries to be propagated.
The database and replica list at the origination are not changed.
The
-from
option copies entries from the
default_obj
database and replica list at
other_host
to the
default_obj
database and replica list at
default_host.
The
-to
option copies entries from the database and replica list at
default_host
to the database and replica list at
other_host.
A
merge -from
followed by a
merge -to
causes the replicas at the two hosts to converge.
- merge_all
The
merge_all
command uses
default_host
as the hub for a global merge of all replicas for
default_obj.
For each host on the replica list at
default_host,
a
merge_all
first does a
merge -from,
then does a
merge -to.
All replicas of
default_obj
are thereby forced into a consistent state.
The
merge_all
operation does not cause any entries to be propagated.
Perform a
merge_all
when:
A replica has been incommunicado for two weeks or more,
A replica dies (for example,
its database is destroyed by a disk failure).
- monitor [ -r n ]
This command causes
drm_admin
to read the clock of each replica of
default_obj
every
n
minutes and report any clock skews or non-answering replicas.
If
-r
is not specified, the period is 15 minutes.
- purgerep other_host
The
purgerep
command purges
other_host
from the replica list at
default_host.
The replica at
default_host
then propagates a delete request to the replicas at
the hosts remaining on its list,
thereby removing
other_host
from all other replica lists for
default_obj.
The delete request is not sent to
other_host.
A
purgerep
can cause data to be lost
and should only be used when a replica has died.
A
merge_all
operation after the
purgerep
is strongly recommended to prevent the remaining replicas of the
default_obj
database from becoming inconsistent.
If the purged replica is still running, it should be
reset.
Recommendation: Use
chrep
(rather than
addrep
and
purgerep)
to change entries on the replica list.
- quit
Quit the
drm_admin
session.
- reset other_host
Reset the replica of
default_obj
at
other_host.
The
reset
command tells the replica at
other_host
to delete its copy of
default_obj
and stop running.
It does not cause
other_host
to be deleted from any other replica lists.
This command can cause data to be lost unless a successful
merge_all
is done first.
- set [ -o obj_name ] -h host_name
Set the default object and host.
All subsequent commands operate on
obj_name.
Subsequent commands that do not specify a host are sent to
host_name.
If you do not specify the
-o
option,
drm_admin
keeps the current
default_obj.
If you use
set
with the
-o
option,
drm_admin
checks the clocks at all hosts with replicas of the specified object.
- stop
Stop the server for
default_obj
that is running at
default_host.
EXAMPLES
Start
drm_admin,
set the default object to
glb,
and set the default host to
mars:
$ /usr/sbin/ncs/drm_admin
drm_admin: set -o glb -h ip:mars
Default object: glb default host: ip:mars state: in service
Checking clocks of glb replicas
ip:mars 1987/04/09.17:09
ip:pluto 1987/04/09.17:09
ip:mercury 1987/04/09.17:07