System Administration Commands sndradm(1M)
NAME
sndradm - control Sun StorageTek Availability Suite Remote
Mirror operations
SYNOPSIS
sndradm -I a master shadow bitmap
sndradm -I d master shadow bitmap
sndradm -h usage message
sndradm -v version information
sndradm [options] -e [sndrset]
sndradm [options] -E [sndrset]
sndradm [options] -d [sndrset]
sndradm [options] -D block [sndrset]
sndradm [options] -D noblock [sndrset]
sndradm [options] -l [sndrset]
sndradm [options] -m [sndrset]
sndradm [options] -m -r [sndrset]
sndradm [options] -u [sndrset]
sndradm [options] -u -r [sndrset]
sndradm [options] -w [sndrset]
sndradm [options] -H [sndrset]
SunOS 5.11 Last change: 2 Oct 2007 1
System Administration Commands sndradm(1M)
sndradm [options] -p [sndrset]
sndradm [options] -P [sndrset]
sndradm [options] -q a volume [sndrset]
sndradm [options] -q d [sndrset]
sndradm [options] -q r volume [sndrset]
sndradm [options] -i [sndrset]
sndradm [options] -a value [sndrset]
sndradm [options] -A value [sndrset]
sndradm [options] -F value [sndrset]
sndradm [options] -W value [sndrset]
sndradm [options] -R
sndradm [options] -R b p bitmap [sndrset]
sndradm [options] -R b s bitmap [sndrset]
sndradm [options] -R C tag [sndrset]
sndradm [options] -R g iogroupname [sndrset]
sndradm [options] -R m sync [sndrset]
sndradm [options] -R m async [sndrset]
SunOS 5.11 Last change: 2 Oct 2007 2
System Administration Commands sndradm(1M)
sndradm [options] -R -f volset-file
sndradm [options] -R r [sndrset] *
DESCRIPTION
The /usr/sbin/sndradm command is the administrative command
line interface for the Sun StorageTek Availability Suite
Remote Mirror software. Remote Mirror enables you to repli-
cate disks between different physically-separate Sun servers
in real time. Remote Mirror is conceptually similar to the
local disk mirroring scheme of RAID 1 but it performs its
replication operations over longer distances.
If you do not specify a Remote Mirror set (sndrset) on the
command line, sndradm operates on all configured Remote Mir-
ror sets.
The sndradm command generates an entry in the Availability
Suite log file, /var/adm/ds.log (see ds.log(4)), for all
operations except print (-p, -P and -i), help (-h), and ver-
sion (-v).
OPTIONS
The sndradm utility supports the following options:
-f volset-file
Specifies a file containing the sndrset information for
one or more Remote Mirror sets in the same format as the
fully specified command line sndrset documented below.
-g iogroupname
Limits operations to only those Remote Mirror sets
belonging to iogroupname.
The iogroupname for a given set must be consistent
across both the primary and the secondary hosts.
-C tag
On a clustered node, limits operations to only those
Remote Mirror sets belonging to the cluster resource
group or disk group name specified by tag. This option
is not valid on a system that is not clustered.
SunOS 5.11 Last change: 2 Oct 2007 3
System Administration Commands sndradm(1M)
-n
Does not prompt the user after starting a Remote Mirror
operation using sndradm. For all but the printing, help,
and version options, the default behavior is to prompt
for a response. For example, after starting a full syn-
chronization from the primary to the secondary volume,
Remote Mirror prompts: "Overwrite secondary with pri-
mary? (Y/N) [N]".
sndrset
Specifies the Remote Mirror set. For a set that has
already been enabled, this can be a setname in the for-
mat shost:sdev. You can supply a fully specified Remote
Mirror set in the same format as a configuration file:
phost pdev pbitmap shost sdev sbitmap ip {sync async} \
[g iogroupname] [C tag]
These parameters are described as follows:
phost
Specifies the server on which the primary volume
resides.
pdev
Specifies the primary volume partition to be repli-
cated. Specify full pathnames only (for example,
/dev/rdsk/c0t1d0s2).
pbitmap
Specifies the volume partition on which the bitmap
(scoreboard log) of the primary partition is stored.
Specify full pathnames only (for example,
/dev/rdsk/c0t1d0s3).
shost
Specifies the server on which the secondary volume
resides.
sdev
SunOS 5.11 Last change: 2 Oct 2007 4
System Administration Commands sndradm(1M)
Specifies the secondary volume partition. Specify
full path names only (for example,
/dev/rdsk/c0t1d0s4).
sbitmap
Specifies the volume partition on which the bitmap
(scoreboard log) of the secondary partition is
stored. Specify full path names only (for example,
/dev/rdsk/c0t1d0s5).
ip
Specifies the network transfer protocol.
sync async
Specifies the Remote Mirror operating mode. sync is
the Remote Mirror mode where the I/O operation is
not confirmed as complete until the remote volume
has been updated. async is the Remote Mirror mode
where the primary host I/O operation is confirmed as
complete before updating the remote volume.
iogroupname
Specifies the name of the Remote Mirror consistency
group to which the Remote Mirror set belongs. In
asynchronous mode, write ordering must be preserved
across all replicating volumes in a Remote Mirror
consistency group. This ensures that the secondary
volumes belonging to the group contains a valid
point-in-time copy of the corresponding primary
volumes.
When adding an existing set to a consistency group
or when enabling a set to be in a group, the set
must be configured with the same group name on both
the primary and the secondary hosts.
tag
For operation within a cluster, this specifies the
disk group name or resource tag of the local data
and bitmap volumes in cases where this is not
implied by the name of the volume (for example,
/dev/rdsk/md/dg/vol and /dev/vx/rdsk/dg/vol both
SunOS 5.11 Last change: 2 Oct 2007 5
System Administration Commands sndradm(1M)
indicate a disk group name of dg). It is the respon-
sibility of the user to ensure that the cluster tag
specified to the Remote Mirror matches the appropri-
ate cluster resource group tag, and to keep all the
Availability Suite services up to date in the event
of cluster resource group reconfigurations. It is
illegal to specify the cluster resource tag on a
system that is not clustered.
PARAMETERS
A valid sndradm command must specify one of the parameters
listed below.
-I a master shadow bitmap
Add an ndrii entry with the specified master, shadow,
and bitmap to the Availability Suite configuration file.
See sndrsyncd(1M). If the corresponding Point-in-Time
Copy set does not exist, it is enabled when the next
sync command is issued on the related volume(s). When no
longer required, this Point-in-Time Copy set can be dis-
abled by iiadm -d. See iiadm(1M)
-I d master shadow bitmap
Delete the ndrii entry with the specified master, sha-
dow, and bitmap from the Availability Suite configura-
tion file. Use the dscfg command to list ndrii confi-
guration entries.
-a value
Specifies the value, on or off, of the automatic sync
variable for the set. Once autosync has been requested
for a set, the functionality is active from the time a
sync operation is requested until the set is manually
put into logging mode. Once the set is manually put into
logging mode, the autosync functionality is not active
and remains inactive until the next time a sync request
is made. To check whether autosync is active, use
sndradm -P. To check whether autosync has been requested
for a set, look for the"auto=on;" tag for the set in the
output of dscfg -l. See sndrsyncd(1M).
-A value
Specifies the maximum number of threads that can be
SunOS 5.11 Last change: 2 Oct 2007 6
System Administration Commands sndradm(1M)
created to process the asynchronous queue when a set is
replicating in asynchronous mode. The default is 2.
-W value
Specifies the maximum number of writes that can be
queued to a set replicating in asynchronous mode. The
default is 4096. For example, set this value to 1 to
ensure that the secondary volume is never more than one
write operation behind the primary volume.
Tuning the maximum number of writes is only valid for
sets using memory-based async I/O queues. This value is
ignored when disk based I/O queues are used.
-D {block noblock}
Toggles the blocknoblock attribute of a disk-based
queue. The default setting is block. If the I/O fill
rate is larger than the drain rate for enough time for
the queue to fill, incoming I/O is blocked until there
is adequate space on the queue for it. This is to
preserve write ordering whether it is one volume or
across many volumes in the same consistency group. If
noblock is set, and incoming I/O fills the queue, the
I/O is not blocked. Instead, the set is put into logging
and the disk queue contents are disregarded. An ensuing
update sync synchronizes the latest data to the secon-
dary site.
-F value
Specifies the maximum number of 512-byte FBAs that can
be queued in kernel memory to a set replicating in asyn-
chronous mode. The default is 16384.
Tuning the maximum number of FBAs is valid only for sets
using memory-based async I/O queues. This value isig-
nored when disk-based I/O queues are used.
-h
Prints the sndradm usage summary.
-v
Prints the Remote Mirror version number.
SunOS 5.11 Last change: 2 Oct 2007 7
System Administration Commands sndradm(1M)
-e
Enables Remote Mirror for the set and enables scoreboard
logging. The scoreboard is set to indicate that a full
synchronization is required. Details of the set are
saved in the current configuration. See dscfg(1M). The
local volume and the bitmap volume are enabled for the
Storage Volume driver (see sv(7D)).
-E
Enables Remote Mirror for the set and enables scoreboard
logging. The scoreboard is cleared to indicate that the
primary and secondary volumes are already guaranteed to
be fully synchronized. Details of the set are saved in
the current configuration. See dscfg(1M). The local
volume and the bitmap volume are enabled for the Storage
Volume driver (see sv(7D)).
-d
Disables Remote Mirror for the set and halts any current
synchronization operations. sndradm -d also discards any
active scoreboards that track temporary differences
between primary and secondary volumes.
-l
Stops Remote Mirror replication and copy operations
between primary and secondary volumes and starts
independent Remote Mirror scoreboard logging on these
volumes. When all the sets in a consistency group are
replicating, it means that the secondary volumes contain
a valid point-in-time copy of the corresponding primary
volumes. Under this condition, as soon as one Remote
Mirror set drops into logging mode, the rdc kernel
module drops all the other sets in the group into log-
ging mode automatically. This ensures that the secondary
volumes still contains a valid point-in-time copy. To
resume the Remote Mirror after using the -l parameter,
use the -m parameter to perform a full resynchronization
or the -u parameter to perform an update resynchroniza-
tion (based on the scoreboard).
This option does not work on the secondary for any
volumes that are currently synchronizing.
SunOS 5.11 Last change: 2 Oct 2007 8
System Administration Commands sndradm(1M)
-w
Waits for a synchronization copy to complete or abort,
or returns immediately if invoked on the secondary sys-
tem.
-H
Reports on the health of the network link used by the
specified volume set. The health of the link is reported
as active or inactive. Active means that the network
link is actively being used for replicating or resyn-
chronizing data, and is therefore in good health. Inac-
tive means that the network link is not actively being
used for replicating or resynchronizing data, which
might indicate a problem with the link.
-p
Displays a list of configured Remote Mirror volumes or
sets.
-P
Displays a list of configured Remote Mirror volumes or
sets with extra details. (See state descriptions,
below.)
-q a volume
Add a disk queue to a set or group. This operation is
valid when the set or group is in logging mode.
-q d
Remove a disk queue from a set or group. This operation
is valid when the set or group is in logging mode.
-q r volume
Replace a disk queue for a group or set. The queue is
removed from the set or group as in the queue-disable
operation and the new disk queue is added as in the
queue-add operation. This operation is valid when the
set or group is in logging mode.
SunOS 5.11 Last change: 2 Oct 2007 9
System Administration Commands sndradm(1M)
-i
Displays a list of configured Remote Mirror volumes or
sets in the same format as the volset-file.
-R
Attempt to reset a Remote Mirror set's error condition
such as failed bitmaps.
-R b p bitmap
Reconfigure a Remote Mirror set's primary bitmap. This
command should be entered on both primary and secondary
servers. It is only possible to reconfigure the primary
bitmap for one set at a time.
-R b s bitmap
Reconfigure a Remote Mirror set's secondary bitmap. This
command should be entered on both primary and secondary
servers. It is only possible to reconfigure the secon-
dary bitmap for one set at a time.
-R C tag
Reconfigure the cluster tag, or disk group name, of a
Remote Mirror set's local volumes, in those cases where
this is not indicated by the pathname. This does not
affect the remote volumes. This parameter cannot be used
on a system that is not clustered.
-R m {sync async}
Reconfigure the replication mode of a Remote Mirror set.
The sets belonging to a consistency group must be either
all synchronous or all asynchronous. It is not possible
to mix modes within a group.
-R g group
Reconfigure the consistency group of a Remote Mirror
set. This command should be entered with the same group
name on both primary and secondary servers.
To remove a set from a consistency group, specify the
SunOS 5.11 Last change: 2 Oct 2007 10
System Administration Commands sndradm(1M)
null string (" ") when reconfiguring the consistency
group.
The following parameters can be issued only from the primary
server:
-m
Starts a full volume copy from the primary volume to the
secondary volume, and concurrently enables Remote Mirror
replication of new updates from the primary volume to
the secondary volume. Use this parameter when the pri-
mary and secondary volumes might be different and no
logging information exists to incrementally resynchron-
ize the volumes. See EXIT STATUS.
-r
Reverses the direction of the synchronization so the
primary volume is synchronized from the secondary
volume. Use this parameter with the -m or -u parameter.
-m -r starts a full volume copy from the secondary
(source) volume to the primary (target) volume but con-
currently enables Remote Mirror replication of new
updates from the primary (source) volume to the secon-
dary (target) volume, ensuring the volume sets remain
synchronized. Use -m -r when the primary and secondary
volume content might differ and the secondary has the
desired contents, yet no logging information exists to
incrementally resynchronize the volumes (using -u). -u
-r resynchronizes the primary (target) volume from the
secondary (source) volume, using the Remote Mirror
scoreboard logs maintained while replication was
suspended. It then resumes Remote Mirror replication of
new updates from the primary volume to the secondary
volume so that the volume sets remain synchronized.
Quiesce the workload to the volume sets during the
restore/refresh operation. This action ensures that the
primary and secondary volumes match before replication
of new updates resumes.
-u
Updates a Remote Mirror volume set. This parameter
resynchronizes a Remote Mirror volume set. Only the
blocks logged as changed in the Remote Mirror score-
boards are updated. Enables Remote Mirror replication
for the primary volume and also uses the Remote Mirror
SunOS 5.11 Last change: 2 Oct 2007 11
System Administration Commands sndradm(1M)
scoreboard logs to start the resynchronization process
so that the corresponding secondary volume matches the
primary volume.
States Returned from sndradm -P
The following are the states that can be returned from
sndradm -P.
volume failed
An I/O operation to the local data volume has failed
bitmap failed
An I/O operation to the local bitmap volume has failed
disk queue failed
An I/O operation to disk queue volume has failed
need sync
A sync to this volume has been interrupted. It needs to
be completed (or restored via Point-in-Time Copy). The
direction of the data flow must not be changed until one
or the other is done.
need reverse sync
A reverse sync to this volume has been interrupted. It
needs to be completed (or restored via Point-in-Time
Copy). The direction of the data flow must not be
changed until one or the other is done.
logging
Incoming writes are logged in the bitmap only. Data is
not replicated to the remote site. need sync, need
reverse sync, and queuing are all substates of logging
such that writes are logged in the bitmap, but not
replicated. Queuing mode (described below) logs the
writes to the bitmap, and queues the request for later
replication by the async flushers.
SunOS 5.11 Last change: 2 Oct 2007 12
System Administration Commands sndradm(1M)
reverse syncing
A secondary to primary copy is in progress.
syncing
A primary to secondary copy is in progress.
queuing
During normal async replication using disk queues, i/o
is placed on the disk queue to be replicated by the
async flusher threads. In the event of a temporary link
failure, the set transitions to queuing mode. The queue
is not discarded, as it would be with memory based
queues. Instead, data is logged in the bitmap and placed
on the queue. When the link comes up, and sndradm -u is
issued, (automated by turning autosync on for the set)
the flushers restarts. This preserves write ordering
through a temporary link outage. If write ordering is
not necessary, and only the latest data is needed, the
set can be put into logging manually (sndradm -l) and an
update sync issued (sndradm -u). This action discards
the data on the queue, and fast resyncs using the bit-
map. If the queue fills before the link comes back and
the update sync is issued, the queue is discarded and
the set put into logging mode to avoid application
hangs.
EXAMPLES
Example 1 Enabling a Remote Mirror Set
The following command enables a Remote Mirror asynchronous
set on host example, where example is the primary host and
example-remote is the secondary host.
example% sndradm -e example /dev/rdsk/c1t0d0s1 /dev/rdsk/c1t1d0s3 \
example-remote /dev/rdsk/c2t3d0s5 /dev/rdsk/c2t4d0s5 ip async
Example 2 Adding a Disk Queue to an Asynchronous Set
The following command adds a disk queue volume to an asyn-
chronous set.
SunOS 5.11 Last change: 2 Oct 2007 13
System Administration Commands sndradm(1M)
example% sndradm -q a /dev/rdsk/c1t2d0s3 \
example-remote:/dev/rdsk/c2t3d0s5
Example 3 Removing a Disk Queue from an Asynchronous Set
The following command removes the disk queue volume from a
set with a disk queue volume attatched to it.
example% sndradm -q d example-remote:/dev/rdsk/c2t3d0s5
Example 4 Disabling a Remote Mirror Set
The following command disables a Remote Mirror set enabled
on host example.
example% sndradm -d example-remote:/dev/rdsk/c2t3d0s5
EXIT STATUS
0 Command completed successfully.
>0 An error occurred.
When the -m or -u option is executed in a script, the exit
status following one of these options always returns suc-
cess, regardless of the current status of the Remote Mirror
set.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 2 Oct 2007 14
System Administration Commands sndradm(1M)
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWrdcr, SUNWrdcu
Interface Stability Evolving
SEE ALSO
dscfg(1M), sndrd(1M), sndrsyncd(1M), ds.log(4), rdc.cf(4),
attributes(5), sv(7D)
SunOS 5.11 Last change: 2 Oct 2007 15
|