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:

-fvolset-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.

-gio_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.

-Ctag

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:

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.

-Iamastershadowbitmap

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)

-Idmastershadowbitmap

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.

-avalue

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).

-Avalue

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.

-Wvalue

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.

-Fvalue

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.

Add a disk queue to a set or group. This operation is valid when the set or group is in logging mode.

-qd

Remove a disk queue from a set or group. This operation is valid when the set or group is in logging mode.

-qrvolume

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.

-Rbpbitmap

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.

-Rbsbitmap

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.

-RCtag

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.

-Rm{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.

-Rggroup

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.

volumefailed

An I/O operation to the local data volume has failed

bitmapfailed

An I/O operation to the local bitmap volume has failed

diskqueuefailed

An I/O operation to disk queue volume has failed

needsync

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.

needreversesync

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.

reversesyncing

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.