xref: /titanic_51/usr/src/man/man1m/sndradm.1m (revision b819cea2f73f98c5662230cc9affc8cc84f77fcf)
te
Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
SNDRADM 1M "Oct 2, 2007"
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 [sndr_set]

sndradm [options] -E [sndr_set]

sndradm [options] -d [sndr_set]

sndradm [options] -D block [sndr_set]

sndradm [options] -D noblock [sndr_set]

sndradm [options] -l [sndr_set]

sndradm [options] -m [sndr_set]

sndradm [options] -m -r [sndr_set]

sndradm [options] -u [sndr_set]

sndradm [options] -u -r [sndr_set]

sndradm [options] -w [sndr_set]

sndradm [options] -H [sndr_set]

sndradm [options] -p [sndr_set]

sndradm [options] -P [sndr_set]

sndradm [options] -q a volume [sndr_set]

sndradm [options] -q d [sndr_set]

sndradm [options] -q r volume [sndr_set]

sndradm [options] -i [sndr_set]

sndradm [options] -a value [sndr_set]

sndradm [options] -A value [sndr_set]

sndradm [options] -F value [sndr_set]

sndradm [options] -W value [sndr_set]

sndradm [options] -R

sndradm [options] -R b p bitmap [sndr_set]

sndradm [options] -R b s bitmap [sndr_set]

sndradm [options] -R C tag [sndr_set]

sndradm [options] -R g io_groupname [sndr_set]

sndradm [options] -R m sync [sndr_set]

sndradm [options] -R m async [sndr_set]

sndradm [options] -R -f volset-file

sndradm [options] -R r [sndr_set] *
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 replicate 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 (sndr_set) on the command line, sndradm operates on all configured Remote Mirror 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 version (-v).

OPTIONS

The sndradm utility supports the following options: -f volset-file

Specifies a file containing the sndr_set information for one or more Remote Mirror sets in the same format as the fully specified command line sndr_set documented below.

-g io_groupname

Limits operations to only those Remote Mirror sets belonging to io_groupname. The io_groupname 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.

-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 synchronization from the primary to the secondary volume, Remote Mirror prompts: "Overwrite secondary with primary? (Y/N) [N]".

sndr_set

Specifies the Remote Mirror set. For a set that has already been enabled, this can be a set_name in the format 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} \e
[g io_groupname] [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 replicated. 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

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.

io_groupname

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 indicate a disk group name of dg). It is the responsibility of the user to ensure that the cluster tag specified to the Remote Mirror matches the appropriate 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 ndr_ii 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 disabled by iiadm -d. See iiadm(1M)

-I d master shadow bitmap

Delete the ndr_ii entry with the specified master, shadow, and bitmap from the Availability Suite configuration file. Use the dscfg command to list ndr_ii configuration 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 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 block|noblock 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 secondary site.

-F value

Specifies the maximum number of 512-byte FBAs that can be queued in kernel memory to a set replicating in asynchronous 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 isignored when disk-based I/O queues are used.

-h

Prints the sndradm usage summary.

-v

Prints the Remote Mirror version number.

-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 logging 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 resynchronization (based on the scoreboard). This option does not work on the secondary for any volumes that are currently synchronizing.

-w

Waits for a synchronization copy to complete or abort, or returns immediately if invoked on the secondary system.

-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 resynchronizing data, and is therefore in good health. Inactive 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.

-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 secondary 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 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 primary and secondary volumes might be different and no logging information exists to incrementally resynchronize 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 concurrently enables Remote Mirror replication of new updates from the primary (source) volume to the secondary (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 scoreboards are updated. Enables Remote Mirror replication for the primary volume and also uses the Remote Mirror 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.

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 bitmap. 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 \e
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 asynchronous set.

example% sndradm -q a /dev/rdsk/c1t2d0s3 \e
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 success, regardless of the current status of the Remote Mirror set.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Evolving
SEE ALSO

dscfg(1M), sndrd(1M), sndrsyncd(1M), ds.log(4), rdc.cf(4), attributes(5), sv(7D)