DESCRIPTION
The drm_admin tool administers servers based on the Data Replication
Manager (DRM), such as the Global Location Broker (GLB).
It can 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 instance, you can use drm_admin to
merge two replicas of the GLB database, but you must 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 (the GLB daemon) 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 in the following section.
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. The only
currently supported family is dds; you can specify a host in this family
by its entry directory or by its network address. For example,
dds://thurber and dds:#1234.abcd are acceptable host names.
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.
delrep other_host [ -force ]
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 -force option causes a more drastic delete. It deletes other_host
from the replica list at default_host. The replica at default_host
propagates the delete request to the replicas at the hosts remaining on
its list, thereby removing other_host from all other replica lists for
default_obj.
A force delete can cause data to be lost and should only be used when a
replica has irrevocably "died." We recommend strongly that you do a
merge_all operation after the force delete to prevent the remaining
replicas of the default_obj database from becoming inconsistent. If the
deleted replica is still running, it should be reset.
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 time stamp.
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. A merge_all
first does a merge -from each host on default_host's
replica list; then it does a merge -to each host on the
replica list. All replicas of default_obj are thereby
forced into a consistent state.
A merge_all should be used
⊕ When a replica is force deleted
⊕ When a replica is reset
⊕ When a replica has been incommunicado for 2 weeks or
more
⊕ When a replica "dies" (for example, when its database is
destroyed by a disk failure). The merge_all operation
does not cause any entries to be propagated.
monitor [ -r n ]
This command causes drm_admin to read the clock of each
replica of the default_obj every n minutes and to report
any clock skews or non-answering replicas. If you do not
specify -r, the period is 15 minutes.
quit Quit the drm_admin session.
reprep other_host
Replace the network address for other_host in the replica
list at default_host. The replica at default_host will
propagate the new entry for other_host to all other
replica lists for default_obj. Use reprep only when a
host's network number changes.
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 to 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. Subsequent commands that
do not specify a host will be sent to this host. All
subsequent commands will operate on the object obj_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:
$ /etc/ncs/drm_admin
drm_admin: set -o glb -h dds://mars
Default object: glb default host: dds://mars
state: in service
Checking clocks of glb replicas
dds://mars 1987/04/09.17:09
dds://pluto 1987/04/09.17:09
dds://mercury 1987/04/09.17:07
SEE ALSO
glbd, lb_admin
Managing the NCS Location Broker.