9.7;drm_admin (DRM administrative tool), revision 1.0, 87/08/14
DRM_ADMIN (DRM_ADMINISTRATIVE_TOOL) -- DRM administrative tool.
usage: /sys/ncs/drm_admin
FORMAT
/sys/ncs/drm_admin
The drm_admin tool administers servers based on the Data Replication Manager
(DRM). It can inspect or modify replica lists, merge databases to force
convergence among replicas, stop servers, and delete replicas. Currently, the
Global Location Broker (GLB) is the only server that can be administered with
drm_admin.
Note that drm_admin cannot create, delete, or change entries contained in the
GLB database; use the lb_admin tool for these functions. To start a server or
to create a replica, use glbd, the Global Location Broker daemon.
Once invoked, drm_admin enters an interactive mode. It issues the prompt
drm_admin:" and accepts the commands described below.
COMMANDS
Most drm_admin commands operate on a default object (obj_name) at a default
host (host_name). Together, obj_name and host_name specify a default replica.
Defaults are established by the set command and are remembered until changed
by another set.
Currently, the only known obj_name is glb.
A host_name takes the form family:host. The only currently supported family is
dds; a host in this family is specified by its entry directory or its network
address. For example, dds://martha and dds:#1234.abcd are acceptable host
names.
Some drm_admin commands operate on a host other than the default; this host is
specified as a host_nameA argument.
addrep hostnameA Adds host host_nameA to the replica list at host_name. The
replica at host_name will propagate host_nameA to all
other replica lists for obj_name.
delrep hostnameA [-force]
Deletes the replica of obj_name at host_nameA.
The delrep command tells the replica at host_nameA 1) to
propagate all of the entries in its propagation queue; 2)
to propagate a delete request to all other replicas,
causing host_nameA to be deleted from all other replica
lists for obj_name; 3) to delete its copy of obj_name; and
4) to stop running.
The -force option causes a more drastic delete. It deletes
host_nameA from the replica list at the default host. The
replica at the default host propagates the delete request
to the replicas at the hosts remaining on its list,
thereby removing host_nameA from all other replica lists
for obj_name.
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
obj_name database from becoming inconsistent. If the
deleted replica is still running, it should be reset.
info Gets status information about the replica for obj_name at
host_name.
lrep [-d][-clocks][-na]
Lists replicas for obj_name (from the replica list at
host_name).
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 repnameA
The merge command copies entries in the obj_name database
and replica list from one replica to another. An entry is
copied 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 database and
replica list at host_nameA to the database and replica
list at the default host.
The -to option copies entries from the obj_name database
and replica list at the default host to the obj_name
database and replica list at host_nameA.
A merge -from followed by a merge -to causes the replicas
at the two hosts to converge.
mergeall The merge_all command uses the default host as the hub for
a global merge of all replicas for obj_name. A merge_all
first does a merge -from each host on host_name's replica
list; then it does a merge -to each host on the replica
list. All replicas of obj_name are thereby forced into a
consistent state.
A merge_all should be used 1) when a replica is force
deleted; 2) when a replica is reset; 3) when a replica has
been incommunicado for 2 weeks or more; or 4) when a
replica "dies" (e.g. when its database is destroyed by a
disk failure).
The merge_all operation does not cause any entries to be
propagated.
quit Quits the drm_admin session.
reprep hostnameA Replaces the network number for host_nameA in the replica
list at host_name. The replica at host_name will propagate
the new entry for host_nameA to all other replica lists
for obj_name. reprep is used only when a host's network
number changes.
reset hostnameA Resets the replica of obj_name at host_nameA.
The reset command tells the replica at host_nameA to
delete its copy of obj_name and to stop running. It does
not cause host_nameA 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 objname] -h hostname
Sets 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 the -o option is not specified, drm_admin keeps the
current default obj_name.
If set is used with the -o option, drm_admin checks the
clocks at all hosts with replicas of the specified object.
stop Stops the server for obj_name that is running at host
host_name.
EXAMPLES
Start drm_admin, set the default object to glb, and set the default host to
//mars.
$ /sys/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