C H A P T E R  5

The sndradm Command


Note - To use the Remote Mirror software, you must be the root user.



This chapter describes the Remote Mirror software's /usr/sbin/sndradm command and options.

The topics in this chapter include:


Log File

The /var/adm/ds.log file contains operation log messages for the Remote Mirror commands. For example, these log messages show a volume set enabling and updating:


Oct 17 13:48:10 sndr: sndradm -e atm10 /dev/vx/rdsk/oracle816/oratest /dev/vx/rdsk/oracle816/oratest_bm atm20 /dev/vx/rdsk/oracle816/oratest /dev/vx/rdsk/oracle816/oratest_bm ip sync g oragroup
Successful
Oct 17 13:48:10 sv: enabled /dev/vx/rdsk/oracle816/oratest
Oct 17 13:48:10 sv: enabled /dev/vx/rdsk/oracle816/oratest_bm
Oct 18 10:23:54 sndr: sndradm -u atm10 /dev/vx/rdsk/oracle816/oratest /dev/vx/rdsk/oracle816/oratest_bm atm20 /dev/vx/rdsk/oracle816/oratest /dev/vx/rdsk/oracle816/oratest_bm ip sync g oragroup
Starting


Syntax Summary



Note - If you use a command without specifying any volume set arguments, the command operates on all Remote Mirror volume sets.



Syntax

sndradm switches [options]

For example, to update the secondary volume from the primary volume:

sndradm -u [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

The /usr/sbin/sndradm command uses the command switches shown in TABLE 5-1. TABLE 5-2 shows the commands sorted in alphabetical order and TABLE 5-3 shows the options.

TABLE 5-4 describes the commands and synchronization situations performed from a primary host, secondary host, or both.

 

Command Switches


TABLE 5-1 sndradm Command Switches Sorted By Function

Function

Command and Switch

See This Section

Enable and Disable Volume Sets

 

 

Enable the software for the specified set (sync not required).

sndradm -E

Use the following commands to enable and disable volume sets.

Enable the software for the specified set (sync required).

sndradm -e

Use the following commands to enable and disable volume sets.

Disable the software for the specified set.

sndradm -d

Disabling Volume Sets

Add or delete a Point-in-Time Copy software volume group.

sndradm -I

Adding and Deleting Point-in-Time Copy Software Volumes

Stop the software replication, enter logging mode, and track changes using bitmaps.

sndradm -l

Stopping Replication and Starting Logging

Synchronize or Update Volume Sets

 

 

Copy the entire contents of the primary volume to the secondary volume; also known as full synchronization.

sndradm -m

Starting a Full Synchronization

Copy the entire contents of the secondary volume to the primary volume; also known as full reverse synchronization.

sndradm -m -r

Starting a Full Synchronization

Update only the changed data of the primary volume to the secondary volume; also known as update synchronization or resynchronization.

sndradm -u

Starting an Update Resynchronization

Update only the changed data of the secondary volume to the primary volume; also known as reverse synchronization or reverse update.

sndradm -u -r

Starting an Update Resynchronization

Wait for a synchronization operation to finish executing.

sndradm -w

Waiting for Synchronization to Finish Executing

Reconfigure or Change Volume Sets

 

 

Change the bitmap of a volume set.

sndradm -R b

Reconfiguring or Modifying a Volume Set

Update or reconfigure the disk group name or cluster resource tag.

sndradm -R C

Updating the Disk Cluster Tag Name

Update or reconfigure the software volume sets.

sndradm -R -f volset-file

Updating the Volume Set Information

Move all the specified Remote Mirror sets to a different group.

sndradm -R g

Moving a Volume Set to a Different I/O Group

Reset the replication mode of a volume set.

sndradm -R m {sync|async}

Changing the Replication Mode of a Volume Set

Display Information

 

 

Display the command syntax.

sndradm -h

See the display that results from entering this command at the command prompt

Display the version information.

sndradm -v

See the display that results from entering this command at the command prompt

Display the software status.

sndradm -p

Displaying Volume Set and I/O Group Status

Display detailed software status.

sndradm -P

Displaying Volume Set and I/O Group Status

Display the software volume set and I/O group names.

sndradm -i

Listing of Volume Sets and I/O Group Names

Display the status of the link connecting systems running the software.

sndradm -H

Displaying Link Status

Disk Queue Commands

 

 

Set disk queue blocking mode.

sndradm -D

Managing Disk Queues

Add disk queue to group.

sndradm -g group -q a vol

Managing Disk Queues

Remove disk queue from group.

sndradm -g group -q d

Managing Disk Queues

Replace disk queue for a group.

sndradm -g group -q r newvol

Managing Disk Queues

Add disk queue to a set.

sndradm -q a vol shost:sdev

Managing Disk Queues

Remove disk queue from a set.

sndradm -q d shost:sdev

Managing Disk Queues

Replace disk queue for a set.

sndradm -q r newvol shost:sdev

 

Managing Disk Queues

Miscellaneous

 

 

Set the number of asynchronous threads

sndradm -A

Setting the Number of Asynchronous Threads

Set and tune the asynchronous queue.

sndradm -W
sndradm -F

Setting the Asynchronous Queue

 

 

Tuning the Asynchronous Queue

Toggle the autosynchronization state.

sndradm -a {on|off}

Enabling or Disabling Autosynchronization


TABLE 5-2 sndradm Command Switches in Alphabetical Order

Command and Switch

Description

See This Section

sndradm -a {on|off}

Autosynchronization on or off.

Enabling or Disabling Autosynchronization

sndradm -A

Set the number of asynchronous threads.

Setting the Number of Asynchronous Threads

sndradm -e

Enable the software for the specified set (sync required).

Use the following commands to enable and disable volume sets.

sndradm -E

Enable the software for the specified set (sync not required).

Use the following commands to enable and disable volume sets.

sndradm -d

Disable the software.

Disabling Volume Sets

sndradm -D

Set disk queue blocking mode.

Managing Disk Queues

sndradm -g group -q a

Add disk queue to a group.

Managing Disk Queues

sndradm -g group -q d

Remove disk queue from a group.

Managing Disk Queues

sndradm -g group -q r

Replace disk queue for a group.

Managing Disk Queues

sndradm -h

Display the command syntax.

See the display that results from entering this command at the command prompt

sndradm -H

Display the status of the link connecting systems running the software.

Displaying Link Status

sndradm -i

Display the software volume set and I/O group names.

Displaying Volume Set and I/O Group Status

sndradm -I

Add or delete a Sun StorageTek Point-in-Time Copy software volume group for use with the software.

Adding and Deleting Point-in-Time Copy Software Volumes

sndradm -l

Place the volume sets into logging mode.

Stopping Replication and Starting Logging

sndradm -m

Copy the entire contents of the primary volume to the secondary volume.

Starting a Full Synchronization

sndradm -m -r

Copy the entire contents of the secondary volume to the primary volume.

Starting a Full Synchronization

sndradm -p

Display software status.

Displaying Volume Set and I/O Group Status

sndradm -P

Display detailed software status.

Displaying Volume Set and I/O Group Status

sndradm -q a

Add disk queue to a set.

Managing Disk Queues

sndradm -q d

Remove disk queue from a set.

Managing Disk Queues

sndradm -q r

Replace disk queue for a set.

Managing Disk Queues

sndradm -R

Use after fixing a failed bitmap volume. It clears the BMF error and commits the current state of the Remote Mirror set to the bitmap header.

 

sndradm -R b

Reconfigure the volume set by changing the bitmap volume.

Changing the Bitmap Volume in a Volume Set

sndradm -R C

Reconfigure the disk group name or cluster resource tag.

Updating the Disk Cluster Tag Name

sndradm -R g

Reconfigure the specified volume sets by moving them to a different group.

Moving a Volume Set to a Different I/O Group

sndradm -R -f volset-file

Reconfigure the volume sets specified in the volset-file.

Updating the Volume Set Information

sndradm -R m {sync|async}

Reconfigure the replication mode of a volume set.

Changing the Replication Mode of a Volume Set

sndradm -u

Update only the changed data of the primary volume to the secondary volume; also known as update synchronization or resynchronization.

Starting an Update Resynchronization

sndradm -u -r

Update only the changed data of the secondary volume to the primary volume; also known as reverse synchronization or reverse update.

Starting an Update Resynchronization

sndradm -v

Displays the version information.

See the display that results from entering this command at the command prompt

sndradm -w

Wait for a synchronization operation to finish executing.

Waiting for Synchronization to Finish Executing

sndradm -W
sndradm -F

Set and tune the asynchronous queue.

Setting the Asynchronous Queue

Tuning the Asynchronous Queue


 

Command Options


TABLE 5-3 sndradm Command Options

Option

Definition

-n

Does not prompt the user after issuing a sndradm command. The default is to prompt and request a response. For example, after starting a full synchronization from the primary to secondary volumes, the Remote Mirror software prompts Overwrite secondary with primary? (Y/N) [N].

This option is useful when you include the commands in a script file.

-f volset-file

Specifies a volume set file defining the Remote Mirror software volume sets. If you do not specify a volset-file, volset, or set-name, the command acts on all volume sets.

volset

Specifies the complete Remote Mirror software set configuration information. If you do not specify a volset-file, volset, or set-name, the command acts on all volume sets. The volset format is as follows:

 

phost pdev pbitmap shost sdev sbitmap ip {sync | async} [g io-groupname] [C tag] [q qdev]

 

phost - Server on which the primary volume resides.

 

pdev - Primary volume partition to be copied. Specify only full path names, for example, /dev/rdsk/c0t1d0s4.

 

pbitmap - Volume partition where the bitmap of the primary partition is stored. Specify only full path names, for example, /dev/rdsk/c0t1d0s6.

 

shost - Server on which the secondary volume resides.

 

sdev - Secondary volume partition. Specify only full path names, for example, /dev/rdsk/c0t1d0s7.

 

sbitmap - Volume partition in which the bitmap of the secondary partition is stored. Specify only full path names, for example, /dev/rdsk/c0t1d0s8.

 

ip - Specifies the network protocol.

 

sync | async - Specifies the Remote Mirror software operating mode. sync is the mode in which the I/O operation is not confirmed as complete until the remote volume has been updated. async is the mode in which the primary host I/O operation is confirmed as complete before updating the remote volume.

 

g io-groupname - Specifies which I/O group the volume set belongs to.

 

C tag - 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.) You must ensure that the cluster tag specified to the Remote Mirror software matches the appropriate cluster resource group tag and to keep all installed data services updated in the event of cluster resource group reconfigurations.

You can use the C tag and -C tag options in a Sun Cluster 3.0 Update 3/3.1/3.2 environment. If you use these options in another environment, the Remote Mirror operation does not execute.

 

qdev - Specifies a disk queue device.

set-name

Specifies the name of the volume set as assigned by the Remote Mirror software. The software assigns a default volume set name of shost:sdev, where shost is the secondary host name and sdev is the secondary volume partition name, separated by a colon (:).

-g io-groupname

Specifies the name of the I/O group containing the collection of Remote Mirror software volume sets. Specifying -g io-groupname limits any operation performed to the sets in the named io-groupname.

-C tag

You can use the C tag and -C tag options only in a Sun Cluster 3.0 Update 3, 3.1, or 3.2 environment. If you use these options in a non-cluster environment, the Remote Mirror operation does not execute. Specifying -C tag limits any operation performed to the sets in the named tag cluster resource tag.



From Which Host Are Commands Issued?

TABLE 5-4 describes the commands and synchronization situations which can be performed from a primary host, secondary host, or both.


TABLE 5-4 Which Host to Issue Commands From

Task

Where Command Is Issued

Comments

Assign a new bitmap to a volume set.

Primary and secondary host

Perform this command on the host where the new bitmap resides and is being assigned. Then perform it on the other host.

Disable the software.

Primary or secondary host

You can disable on one host, leave the other host enabled, and then re-enable the disabled host.

 

Primary and secondary hosts

Perform this operation on both hosts if you are deleting a volume set.

Enable the software.

Primary and secondary hosts

When enabling the software for the first time, issue the command from both hosts.

Perform full forward or reverse synchronization (copy).

Primary host

Ensure that both hosts are enabled.

Perform forward or reverse synchronization (update).

Primary host

Ensure that both hosts are enabled.

Set logging mode.

Primary host

Perform on the primary host only if a synchronization is in progress.

 

Secondary host

Perform on the secondary host if the primary host failed.

 

Primary or secondary host

Perform on either host if no synchronization is in progress

Toggle the autosynchronization state.

Primary host

 

Update an I/O group.

Primary host

 



Enabling and Disabling Volume Sets

Use the following commands to enable and disable volume sets.


Function

Command

See This Section

Enable the software for the specified set (sync not required).

sndradm -E

Use the following commands to enable and disable volume sets.

Enable the software for the specified set (sync required).

sndradm -e

Use the following commands to enable and disable volume sets.

Disable the software for the specified set.

sndradm -d

Disabling Volume Sets

Add or delete a Point-in-Time Copy software volume group.

sndradm -I

Adding and Deleting Point-in-Time Copy Software Volumes

Stop the software replication, enter logging mode, and track changes using bitmaps.

sndradm -l

Stopping Replication and Starting Logging


Enabling Volume Sets



Note - When you first enable the Remote Mirror software, you must enable it on the primary and secondary hosts. Always maintain the same volume set field order on primary and secondary hosts.



The sndradm -e and -E commands enable the Remote Mirror volume set (volset) and start logging changes to the volumes. Also use these commands to create one-to-many, many-to-one, and multihop volume sets. See One-to-Many, Many-to-One, and Multihop Volume Sets.



caution icon

Caution - When creating volume sets, do not create secondary or bitmap volumes using partitions that include cylinder 0. Data loss might occur. See VTOC Information.



When you first enable a set, the software assigns a default name of shost:sdev, where shost is the secondary host name and sdev is the secondary volume partition name, separated by a colon (:). The volume set name is referred to in this document as set-name.

After executing these commands, you can use the shost:sdev name for a volume set each time you issue a command, instead of specifying the complete primary and secondary host, volume, and bitmap information for a volume set.

sndradm -e

This command sets the bitmap to indicate that a full synchronization between volumes is required. It also enables logging and adds the local volume set (including the local bitmap volume) to the storage volume (sv) driver control.

Syntax

sndradm -e [-n] [[-f volset-file] | volset]

sndradm -E



caution icon

Caution - Before using sndradm -E, ensure that the volumes are already synchronized by means other than the Remote Mirror software (for example, restoring the volumes from tape or other media). Otherwise, the secondary or target volume will contain inconsistent data.



This command clears the bitmap logging to indicate that the specified volumes are fully synchronized and enables logging. It also adds the local volume set (including the local bitmap volume) to the storage volume (sv) driver control.

Syntax

sndradm -E [-n] [[-f volset-file] | volset]

After you enable a volume set, you can synchronize or update the volumes. See Starting a Full Synchronization and Starting an Update Resynchronization for more information.

 

Disabling Volume Sets

Use the sndradm -d command when the primary and secondary volumes no longer need to be associated with each other as software volume sets.

This command discards any active logging information in the bitmap volumes. See Enabling and Disabling Volume Sets to re-enable software replication and Starting a Full Synchronization to re-establish identical replicated sets.



Note - This command also removes the information for the specified set from the Sun StorageTek software configuration.



sndradm -d

When you issue this command, the software terminates all replication services between the specified primary and secondary volumes and discontinues the relationship between these volume sets. It also discards any active bitmaps that track temporary differences between primary and secondary volumes.

Syntax

sndradm -d [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

Adding and Deleting Point-in-Time Copy Software Volumes



Note - Use the sndradm -e command to enable software volume sets before using this command. Enabling and Disabling Volume Sets describes this command.



Use the sndradm -I command to add or delete Point-in-Time Copy software volumes for use with enabled software volume sets. You can use this command on the secondary and primary hosts to offer data protection during reverse and forward synchronization update operations. You also use this command to offer data protection during an automatic or manual resynchronization.

The sndradm -I a command creates configuration entries marked with the ndr_ii key. The ndr_ii entries contain an additional state field that the kernel uses to determine when point-in-time copies must be made. The kernel notifies the Remote Mirror software synchronization daemon whenever a synchronization is started and waits for sndrsyncd to perform any necessary copies before allowing the synchronization to proceed.

The daemon is also notified when any Remote Mirror software resynchronization starts or finishes executing. The daemon performs Point-in-Time Copy operations on the secondary or target host, if configured to do so.

Consider the following when configuring a volume set:

See also:

sndradm -I a

This command adds a Point-in-Time Copy volume group entry to the Sun StorageTek configuration.

Syntax

sndradm -I a master-vol shadow-vol bitmap-vol

where master-vol, shadow-vol, and bitmap-vol are the full path to the raw device nodes for configured Point-in-Time Copy volumes. In this case, the master-vol is the Remote Mirror secondary volume.



caution icon

Caution - The shadow and bitmap volumes cannot be a volume currently in use by the point-in-time copy or Remote Mirror software. If the volumes are in use, data loss can occur as the result of this misconfiguration.



See the Sun StorageTek Availability Suite 4.0 Point-in-Time Copy Software Administration Guide for more information about these volume sets.



Note - The /usr/lib/sndrsyncd daemon creates a matching Point-in-Time Copy volume group entry before it performs an update synchronization after a network link or machine failure. After the update finishes executing, you can choose to delete this entry with the /usr/sbin/iiadm -d command. However, if you do not delete this entry, the daemon can use it in subsequent resynchronizations involving the Point-in-Time Copy software.



sndradm -I d

This command deletes a Point-in-Time Copy volume group entry from the Sun StorageTek configuration.

Syntax

sndradm -I d master-vol shadow-vol bitmap-vol

where master-vol, shadow-vol, and bitmap-vol are the full path to the raw device nodes for configured Point-in-Time Copy volumes.

Stopping Replication and Starting Logging

Use the sndradm -l command to start bitmap logging on enabled volume sets and I/O groups. Issue the sndradm -l command as follows:

To resume Remote Mirror software operations after using the sndradm -l command, use the sndradm -u command to perform an update resynchronization or the sndradm -m command to perform a full resynchronization. Note also that, when issued from the secondary host, the sndradm -l command does not work on the secondary volume for any volume that is currently synchronizing.



Tip - Place the secondary volume into logging mode and then mount any file systems in read-write mode to enable your application to write to the secondary volume. The Remote Mirror software logs the changes in the bitmap volume.



sndradm -l

This command enables you to stop replication between primary and secondary volumes and to start logging data changes on these volumes. The Remote Mirror software continues logging even if the operations of a volume set or I/O group are interrupted.

If all volume sets in an I/O group are replicating (meaning that the secondary volumes contain a valid copy of the corresponding primary volumes), all sets in the group enter logging mode automatically whenever one volume set enters logging mode. This scheme ensures that the secondary volumes contain a valid copy.

Syntax

sndradm -l [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]


Synchronizing and Updating Volume Sets

The following commands enable you to synchronize and update volume sets.

See also Restarting an Initial Synchronization and Performing a Reverse Copy or Update After a Primary Volume or Network Link Failure.


[ D ]

Function

Command

See This Section

Copy the entire contents of the primary volume to the secondary volume; also known as full synchronization.

sndradm -m

Starting a Full Synchronization

Copy the entire contents of the secondary volume to the primary volume; also known as full reverse synchronization.

sndradm -m -r

Starting a Full Synchronization

Update only the changed data of the primary volume to the secondary volume; also known as update synchronization or resynchronization.

sndradm -u

Starting an Update Resynchronization

Update only the changed data of the secondary volume to the primary volume; also known as reverse synchronization or reverse update.

sndradm -u -r

Starting an Update Resynchronization

Wait for a synchronization operation to finish executing before executing other commands.

sndradm -w

Waiting for Synchronization to Finish Executing


Restarting an Initial Synchronization

If, after enabling the volume sets, the initial synchronization operation using the sndradm -m or sndradm -u commands is interrupted, the software restarts the synchronization, according to the conditions described in the following table:


If You Enabled the Volume Sets With This Command

And Used This Command to Synchronize Volume Sets

The sndradm -u Command Results In

sndradm -e

sndradm -m
sndradm -m -r

A full synchronization operation, starting from the beginning.

sndradm -E

sndradm -m
sndradm -m -r

A synchronization restarts from the point of interruption.


Performing a Reverse Copy or Update After a Primary Volume or Network Link Failure

As specified in Rehearsing Disaster Recovery, do the following tasks after the network link or disk failure is repaired:

1. Place the primary and secondary host volumes into logging mode if they are not already in logging mode.
See Stopping Replication and Starting Logging.



Note - If you check the volume status at this point using the dsstat -m sndr command, the volume status might report VF (volume failed) or RN (reverse synchronization needed). When you perform the reverse copy or update, this volume status is cleared.



2. Perform the reverse copy or update.

Starting a Full Synchronization

Use the sndradm -m command when all of the following conditions exist:

Use the sndradm -m -r command when all of the following conditions exist:

You can use the primary volume during reverse synchronization
(sndradm -m -r). The primary volume shows a consistent volume image of the latest data as soon as the reverse synchronization starts. If your application had been writing to the secondary volume as part of a failure or disaster rehearsal, you can move the application back to the primary volume when the reverse synchronization starts. See also Rehearsing Disaster Recovery.

If a synchronization initiated by the sndradm -m or sndradm -m -r commands is interrupted, use the sndradm -u update command to finish executing the synchronization. You can use the sndradm -p, sndradm -P, and dsstat commands to view volume set status.

See also Restarting an Initial Synchronization and Performing a Reverse Copy or Update After a Primary Volume or Network Link Failure

 

sndradm -m

This command enables you to start a full copy operation from the primary volume to the secondary volume. It also enables replication concurrently from the primary volume to the secondary volume so that any new writes to the primary volume are also replicated to the secondary volume.

Syntax

sndradm -m [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

sndradm -m -r

This command enables you to start a full reverse copy operation from the secondary volume to the primary volume. It also enables replication from the primary volume to the secondary volume so that any new writes to the primary volume are also replicated to the secondary volume.

Syntax

sndradm -m -r [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

Starting an Update Resynchronization

Use the sndradm -u command when all of the following conditions exist:

Use the sndradm -u -r command when all of the following conditions exist:



Note - You can use the primary volume during reverse synchronization
(sndradm -u -r). If your application is running on the primary volume and you plan to reverse sync, you must momentarily quiesce your application until the reverse synchronization begins. The primary volume shows a consistent volume image of the latest data as soon as the reverse synchronization starts. If your application had been writing to the secondary volume as part of a failure or disaster rehearsal, you can move the application back to the primary volume when the reverse synchronization starts. See also Rehearsing Disaster Recovery.



If a synchronization initiated by the sndradm -m or sndradm -m -r commands is interrupted, use the sndradm -u update command to finish executing the synchronization. You can use the sndradm -p, sndradm -P, and dsstat commands to view volume set status.

See also Restarting an Initial Synchronization and Performing a Reverse Copy or Update After a Primary Volume or Network Link Failure.

sndradm -u

This command resynchronizes the secondary volume from the primary volume. It updates the secondary volume according to changes based on the bitmaps maintained while replication was stopped. It also enables concurrent replication between the primary and secondary volumes so that any new write operations to the primary volume are also replicated to the secondary volume.

Syntax

sndradm -u [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

sndradm -u -r

This command resynchronizes the primary volume from the secondary volume. It updates the primary volume according to changes based on the bitmaps maintained while replication was stopped. It also enables concurrent replication between the primary volume and secondary volumes so that any new write operations to the primary volume are also replicated to the secondary volume.



Tip - You can also use this command to roll back volume changes on the primary volume from a Point-in-Time Copy software image captured on the stopped secondary volume.



Syntax

sndradm -u -r [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

Waiting for Synchronization to Finish Executing

Use the sndradm -w command in one of the following situations:

sndradm -w

This command enables you to make the software wait until an in-progress copy or update synchronization finishes executing. It prevents another software command from executing on the specified volume set or I/O group.

Syntax

sndradm -w [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]


Reconfiguring or Modifying a Volume Set



Note - Before reconfiguring or changing volume sets (except for changing the volume set bitmap), place the volume sets in logging mode by using the
sndradm -l command.



The following commands enable you to reconfigure or modify a volume set.


Function

Command

See This Section

Change the bitmap of a volume set.

sndradm -R b

Changing the Bitmap Volume in a Volume Set

Move all the specified Remote Mirror sets to a different group.

sndradm -R g

Moving a Volume Set to a Different I/O Group

Change the replication mode of a volume set.

sndradm -R m {sync|async}

Changing the Replication Mode of a Volume Set

Update or reconfigure the software volume sets.

sndradm -R -f volset-file

Updating the Volume Set Information

Update or reconfigure the disk group name or cluster resource tag.

sndradm -R C

Updating the Disk Cluster Tag Name


Changing the Bitmap Volume in a Volume Set

Use the sndradm -R b command when you need to assign a new bitmap to a volume set.

sndradm -R b

This command enables you to assign a new bitmap to an existing volume set. You can change the bitmaps on the primary or secondary host. This command copies any data from the old bitmap to the new bitmap.

Syntax

sndradm -R b {p|s} new-bitmap-name [-C tag] [-n] [[-f volset-file] |volset | set-name]

Moving a Volume Set to a Different I/O Group



Note - Before reconfiguring or changing volume sets (except for changing the volume set bitmap), place the volume sets in logging mode by using the
sndradm -l command. After you finish changing the sets, perform an update synchronization using the sndradm -u command.



Use the sndradm -R g command to move volume sets to a different I/O group.

To move multiple sets to a single io-groupname, keep the io-groupname the same and specify different set-names on the command line.

See the following procedures:

sndradm -R g

This command enables you to move volume sets to a different I/O group, thereby updating an existing I/O group. You must specify at least one set-name. Issue this command from the primary and secondary hosts.



Note - The new group name must be identical on both the primary and the secondary hosts.



Syntax

sndradm -R g io-groupname [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]


procedure icon  To Remove Volume Sets From an I/O Group

1. Place the I/O group volume sets into logging mode:


# sndradm -g io-groupname -l

2. Remove volume sets:

3. After you finish changing the sets, perform an update synchronization using the sndradm -u command.


procedure icon  To Move Volume Sets to Another I/O Group

1. Place the I/O group volume sets into logging mode:


# sndradm -g io-groupname -l

2. Move volume sets:

3. After you finish changing the sets, perform an update synchronization using the sndradm -u command.

Changing the Replication Mode of a Volume Set



Note - Before reconfiguring or changing volume sets (except for changing the volume set bitmap), place the volume sets in logging mode by using the
sndradm -l command. After you finish changing the sets, perform an update synchronization using the sndradm -u command.



Use the sndradm -R m command to change the replication mode of a volume set.



Note - You can remove one volume set, selected volume sets, or all volume sets from a group using the sndradm -R g command. See To Remove Volume Sets From an I/O Group and Change the Replication Mode and Moving a Volume Set to a Different I/O Group.



sndradm -R m

This command enables you to reconfigure the replication or mirroring mode of a volume set.

Syntax

sndradm -R m {sync|async} [-C tag] [-n] [[-f volset-file] |volset | set-name]

Considerations


procedure icon  To Remove Volume Sets From an I/O Group and Change the Replication Mode

1. Place the I/O group volume sets into logging mode:


# sndradm -g io-groupname -l

2. Choose one of the following commands:

3. Change the volume set replication mode of each volume set:


# sndradm -R m {sync|async} set-name

4. If desired, add the volume sets you have changed to a different or the previous I/O group:


# sndradm -R g io-groupname [[-f volset-file] | volset | set-name]

See also Moving a Volume Set to a Different I/O Group

5. After you finish changing the sets, perform an update synchronization using the sndradm -u command.

Updating the Volume Set Information

Use the sndradm -R -f command to change the current volume sets being operated on by the Remote Mirror software. This command is useful when you use a volume set file and have made changes to it.

The fields for the volume set file specified using the -f option are similar to those in the volset, described in TABLE 5-3:

phost pdev pbitmap shost sdev sbitmap ip {sync|async} [g io-groupname] [C tag]
[q qdev]

See Setting Up a Volume Set File and the rdc.cf man page for more information.

sndradm -R -f

This command enables you to update or reconfigure the current volume set information from a specified volume set file.

Syntax

sndradm -R -f volset-file [-g io-groupname] [-C tag] [-n]

Updating the Disk Cluster Tag Name



Note - The Remote Mirror software is cluster-aware in the Sun Cluster environment and provides high-availability (HA) for the Sun StorageTek software.



Use the sndradm -R C command in cases where the disk group name or cluster resource tag are not indicated by the volume path name. This command does not affect remote volumes and cannot be used in nonclustered environments.

You can also move all volume sets in one cluster tag to another cluster tag. Use the command as follows:

sndradm -C tag -R C new-tag

sndradm -R C

This command enables you to update or reconfigure the current disk group name or cluster resource tag of the local volume in a volume set. tag here is defined as the disk group name or cluster resource tag.

Syntax

sndradm -R C tag [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]


Displaying Volume Set Information

Use the following commands to display information about volume sets.


Function

Command

See This Section

Display the command syntax information from the command prompt.

sndradm -h

See the display that results from entering this command at the command prompt

Display the software version information from the command prompt.

sndradm -v

See the display that results from entering this command at the command prompt

Display the software status.

sndradm -p

sndradm -P

Displaying Volume Set and I/O Group Status

Display the software volume set and I/O group names.

sndradm -i

Listing of Volume Sets and I/O Group Names

Display the status of the link connecting systems running the software.

sndradm -H

Displaying Link Status


Displaying Volume Set and I/O Group Status

When using the sndradm -p and sndradm -P commands to display status information, the reported status also includes information on the state of the set. Use the volset | set-name options to view the status for a single volume set. Use the -g io-groupname and -C tag options to filter the output so that it includes only those volumes that are part of io-groupname or tag.



Note - Issue this command from the primary host to display information correctly.



sndradm -p

This command displays a brief version of the Remote Mirror software status for volume sets and I/O groups. The following is example output of this command on the primary host:


# sndradm -p
/dev/rdsk/c4t96d0s1 										-> fast7:/dev/rdsk/c2t0d0s1
/dev/rdsk/c4t97d0s1 										-> fast7:/dev/rdsk/c2t0d0s1
/dev/rdsk/c4t98d0s1 										-> fast7:/dev/rdsk/c2t0d0s1

Syntax

sndradm -p [volset | set-name] [-g io-groupname] [-C tag]

sndradm -P

This command displays a detailed version of the Remote Mirror software status for volume sets and I/O groups. The following is example output of this command on the primary host:


# sndradm -P
 
/dev/rdsk/c4t96d0s1 									-> 
fast7:/dev/rdsk/c2t0d0s1
autosync: off, max q writes: 4096, max q fbas: 16384, mode: sync
 
/dev/rdsk/c4t98d0s1 										-> fast7:/dev/rdsk/c2t0d0s1
autosync: off, max q writes: 4096, max q fbas: 16384, mode: sync

The reported status also includes information on the state of the set:


volume failed

The volume has failed.

bitmap failed

The bitmap has failed.

disk queue failed

The disk queue has failed.

need sync

Logging is in progress but an earlier synchronization did not complete. The secondary volume might be in an inconsistent state. Clear the "need sync" state by either performing a synchronization or by updating the secondary volume with a Point-in-Time Copy to restore an earlier, valid snapshot.

need rev sync

Logging is in progress but an earlier reverse synchronization did not complete. The primary volume might be in an inconsistent state. Clear the "need rev sync" state by either performing a reverse synchronization or by updating the primary volume with a Point-in-Time Copy to restore an earlier, valid snapshot.

queuing

Logging is in progress but data is still being added to the queue on the disk queue. An update synchronization clears this state.

logging

Data is not being replicated. Changes are being recorded to the scoreboard.

reverse syncing

A synchronization from the secondary volume to the primary volume is in progress.

syncing

A synchronization from the primary volume to the secondary volume is in progress.

replicating

Data written to the primary volume is being replicated to the secondary volume.


Syntax

sndradm -P [volset | set-name] [-g io-groupname] [-C tag]

Listing of Volume Sets and I/O Group Names

Use the sndradm -i command to display volume set and I/O group names. This command displays volume set information in a volume set file format. See Section , Setting Up a Volume Set File.



Tip - You can also use the output of this command to create a volume set file suitable for editing and using with the sndradm -R -f volset-file command.



sndradm -i

This command enables you to display a list of the current volume set and I/O group names in use. The following is an example of the output.

Note that the output is formatted as it would be entered in a volset-file:
phost pdev pbitmap shost sdev sbitmap ip {sync|async}.


# sndradm -i
 
fast7 /dev/rdsk/c2t0d0s1 /dev/rdsk/c2t1d0s0 fast8 /dev/rdsk/c4t96d0s1 /dev/rdsk/c6t0d0s4 ip sync
 
fast7 /dev/rdsk/c2t0d0s1 /dev/rdsk/c2t1d0s3 fast8 /dev/rdsk/c4t97d0s1 /dev/rdsk/c6t0d0s6 ip sync
 
fast7 /dev/rdsk/c2t0d0s1 /dev/rdsk/c2t1d0s4 fast8 /dev/rdsk/c4t98d0s1 /dev/rdsk/c6t0d0s8 ip async

Syntax

sndradm -i [volset | set-name] [-g io-groupname] [-C tag]

Use the -g io-groupname and -C tag options to filter the output so that it includes only those volumes that are part of io-groupname or tag.

Displaying Link Status

Use the sndradm -H command to check the status of the link connecting primary and secondary hosts.



Note - Use the ping(1M) command to supplement the link status shown by sndradm -H.



sndradm -H

This command displays the currently configured primary and secondary host machine names, volumes, and bitmap volumes for the selected sets. It also shows whether the link between machines is active or inactive. For example:


# sndradm -H atm-fred:/dev/vx/rdsk/freddg/sndr_vol01
Report SNDR link health? (Y/N) [N]: y
 
SNDR: atm-ethel /dev/rdsk/c3t9d0s3 /dev/rdsk/c6t0d0s4atm-fred /dev/vx/rdsk/freddg/sndr_vol01 /dev/rdsk/c6t0d0s6
Inactive

Syntax

sndradm -H shost:sdev

where shost is the secondary host name and sdev is the secondary volume partition name, separated by a colon (:). When you first enable a set, the Remote Mirror software assigns a default volume set name of shost:sdev.

If you specify no arguments, the Remote Mirror software displays all configured volume sets. However, for best display results, specify a volume set using shost:sdev.


Enabling or Disabling Autosynchronization

Use the sndradm -a command to enable or disable autosynchronization. See Choosing Automatic or Manual Resynchronization for more information about autosynchronization.



Note - The sndradm -P command does not report whether autosynchronization is enable or disabled for a set. It reports whether autosynchronization is active at the time the sndradm -P command is issued.



sndradm -a

This command enables or disables the Remote Mirror software autosynchronization. If Remote Mirror software autosynchronization is enabled on the primary host, the synchronization daemon attempts to resynchronize volume sets if the system reboots or link failures occur.

The default state is disabled.

Syntax

sndradm -a {on|off} [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

Using Autosynchronization with Sun Cluster

Consider the following when using autosynchronization with Sun Cluster:

# sndradm -n -r -m


Setting the Asynchronous Queue

These commands apply only to memory-based queues. They have no effect on disk queues.



Note - Ensure that you do not configure the queue size to be larger than the available cache. As a rule of thumb, reserve 5 percent of the total cache.



Use the following commands to set the maximum number of writes or 512-byte blocks that can be queued in asynchronous mode.

See Tuning the Asynchronous Queue.

sndradm -W

This command enables you to set the maximum number of write operations to queue for asynchronous mode volume sets. The default value number is 4096. For example, set this value to 1000 to ensure that the secondary volume is never more than 1000 write operations behind the primary volume.

Syntax

sndradm -W value [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]

sndradm -F

This command enables you to set the maximum number of 512-byte blocks in the asynchronous queue. The default number is 16384, allowing about 8 Mbytes of data per queue.

Syntax

sndradm -F value [-g io-groupname] [-C tag] [-n] [[-f volset-file] |volset | set-name]


Tuning the Asynchronous Queue

These commands apply only to memory-based queues. They have no effect on disk queues.



Note - Ensure that you do not configure the queue size to be larger than available cache. As a rule of thumb, reserve 5 percent of the total cache.



The queues containing the Remote Mirror software asynchronous write operations are stored in system kernel memory. You can tune or adjust these queues so that they are correctly sized for your Remote Mirror software use and volume data set size. Left untuned, the queues can appear to slow performance and consume more system memory than is desirable.

Consider the following steps when tuning asynchronous queues:

1. The number of volume sets and whether a group contains a large number of volume sets in asynchronous mode (such a group shares a single queue and might affect performance).

2. Physical system memory.

3. Network latency.

The number of volume sets is most important. Large queue settings matched with a small number of volume sets ensures better performance than large queue settings with a large number of volume sets. However, try not to size queues so large that you exhaust kernel memory and degrade your system's performance.

This section includes the following topics:

Asynchronous Mode and the Queue

The Remote Mirror software's asynchronous mode helps when your network has sufficient bandwidth to handle many write transactions or when your replicating application (such as a database) performs burst-writes at a rate higher than the network limits allow.

Generally, you use asynchronous mode for a volume set when the I/O write rate is less than the throughput of the network you are using for replication. This mode provides low latency rates to the software, resulting in faster response at the host (see Asynchronous Replication Mode).

As the number of write operations in the queue increases, the transactions can exceed the ability of the queue and network to process them (depending on network bandwidth and latency). The Remote Mirror software appears slow and reports less than optimal write transaction performance. Unless you tune (or size) the queue correctly, asynchronous mode performance might appear to be the same as or worse than synchronous mode, depending on the volume data set size.

Consider changing the software's default queue size if:

You can change the asynchronous queue size by using the sndradm -W and
sndradm -F commands. The Remote Mirror software sets the following default sizes for the queue:


Default maximum number of write operations in the queue
(default for the sndradm -W command)

4096

Default maximum number of 512-byte data blocks
(default for the sndradm -F command)

16384



procedure icon  To Display the Current Queue Size

1. Type the following to display the current queue size:


# sndradm -P
 
/dev/vx/rdsk/rootdg/ds4-clone   ->      nws:/dev/vx/rdsk/rootdg/ds4-sndr-s
autosync: on, max q writes: 4096, max q fbas: 16384, mode: async

The kstat command also displays queue information:

2. Perform any of the following kstat(1M) commands to show more information.

Sample Output For a Correctly-Sized Queue

The following kstat(1M) kernel statistics output shows information about the asynchronous queue. In this example, the queue is sized correctly.


# kstat sndr:0:setinfo
module: sndr                            instance: 0
name:   setinfo                         class:    storedge
        async_block_hwm                 878
        async_item_hwm                  483
        async_throttle_delay            0
        maxqfbas                        16384
        maxqitems                       4096
        primary_host                    regina
        primary_vol                     rootdg/ds4-clone

This example shows only a portion of the command output needed for this section; the kstat command actually displays more information. The following table explains the settings and statistics shown in the example.


maxqfbas 16384

Default maximum number of 512-byte blocks in the asynchronous queue. Set this using sndradm -F

The default setting allows about 8 Mbyte of data per queue.

maxqitems 4096

Default maximum number of write operations to queue for asynchronous mode volume sets. Set this using sndradm -W.

According to this setting, each write consumes 2 Kbyte for the 8 Mbyte of data.

async_block_hwm 878

A total of 878 512-bytes blocks (approximately 439 Kbytes) have been put into the queue.

async_item_hwm 483

A total of 483 write transactions have been put into the queue.[1]

async_throttle_delay 0

No delay in the queue. The queue is not yet full.

 

Sample Output for an Incorrectly-Sized Queue

The following kstat(1M) kernel statistics output shows information about the asynchronous queue, which is incorrectly sized.


# kstat sndr:4:setinfo
module: sndr                            instance: 4     
name:   	setinfo                         				 class:    storedge
        async_block_hwm                 16380
        async_item_hwm                  2045
        async_throttle_delay            16497
        maxqfbas                        16384
        maxqitems                       4096
        primary_host                    andrea
        primary_vol                     rootdg/ds-forall

This example shows only a portion of the command output needed for this section; the kstat command actually displays more information.

This example shows the default queue settings, but the application is writing more data than the queue can handle. The async_block_hwm value of 16380 indicates that the application is approaching the limit for 512-byte blocks. The next few I/O operations might not be placed into the queue.

The value of async_throttle_delay indicates that the application has been delayed 16497 x 2 milliseconds. In this example, if the system has sufficient memory, increase the size of maxqfbas using the sndradm -F command.


Managing Disk Queues

You can have memory-based or disk-based queues. Disk-based queues have some advantages over memory-based queues. See Disk-Based Asynchronous Queues for further information. You can configure a disk queue when you first enable a set or you can use these commands later.

You can add, remove, and replace disk queues for sets and groups of sets with the disk queue CLI commands. You can also set each queue for blocking or non-blocking mode. See Blocking Mode and Non-blocking Mode for more information.



Note - The sndradm -q command is valid only in logging mode.



sndradm -q

This command enables you to add, remove, or replace a disk queue to a set or to a group.

Syntax

sndradm -g io-groupname -q a vol

sndradm -g io-groupname -q d

sndradm -g io-groupname -q r newvol

sndradm -q a vol shost:sdev

sndradm -q d shost:sdev

sndradm -q a newvol shost:sdev

For example, this is how to add a disk queue to a Remote Mirror set:


# sndradm -q a /dev/md/rdsk/d2 ns-81:/dev/md/rdsk/d221

sndradm -D

This command enables you to set the disk queue blocking mode for a set or group.

sndradm -D {block | noblock} set

For example, to change from blocking mode to nonblocking mode, type:


# sndradm -D noblock ns-81:/dev/md/rdsk/d221
Change Remote Mirror tunable? (Y/N) [N]: y


Setting the Number of Asynchronous Threads

You can change the number of asynchronous threads from the default value of 2. You can set the number of threads to a higher number limited only by practical considerations.

sndradm -A

This command enables you to set the number of asynchronous threads that drain the asynchronous queues.

sndradm -A asyncthreads set

See Multiple Asynchronous Flusher Threads for more details.

 


1 (TableFootnote) async_block_hwm and async_item_hwm show the maximum number that has been put into the queue since replication started. They do not show the current number in the queue.