C H A P T E R  2

Operation Considerations

This chapter consists of the following main topics:



Note - Sun suggests that the same disk management method (either software volume management or raw disk partitioning) be used with the Remote Mirror software and the Point-in-Time Copy software on the primary site and the secondary site volumes.

The Sun StorageTek Availability Suite software replicates data at the block level, and the block counts for a given size are different for a disk slice and a volume. Due to this difference, a remote mirror replication or reverse sync, or a point-in-time full independent copy or reverse copy, might fail if the target size is smaller than the source size.




Point-in-Time Copy Operations

This section discusses the operation of the Point-in-Time Copy software from a system administrator's viewpoint. Typical tasks are described in detail, with examples. The examples use these volume names:


Volume Name

Definition

/dev/rdsk/c1t3d0s0

The name of the master volume

/dev/rdsk/c1t3d0s4

The name of the shadow volume

/dev/rdsk/c1t2d0s5

The name of the bitmap volume

io-groupname

The name of the I/O group

/dev/rdsk/c1t4d0s6

The name of the overflow volume


All commands are accessed on the following path:

/usr/sbin/iiadm

Point-in-Time Copy software operations include, but are not limited to, these tasks:



Note - If a remote mirror volume is a target of Point-in-Time Copy update or copy, a remote mirror volume set must be in logging mode for the Point-in-Time Copy software to successfully perform an enable, copy, update, or reset operation on a remote mirror volume. If not, the point-in-time copy operation fails and the Remote Mirror software reports that the operation is denied.




Understanding System Startup and Shutdown

Point-in-Time Copy makes use of the Service Management Facility (SMF) for the startup and shutdown of its software. SMF provides an infrastructure that augments the traditional Unix startup scripts, init run levels, and configuration files. The traditional run-level control script, which started and stopped Point-in-Time Copy software, has been replaced with an SMF service that is enabled during system startup and disabled at system shutdown.

When the Point-in-Time service is brought online during system startup, the volumes of previously configured shadow volume sets are resumed. During shutdown, the Point-in-Time service is brought offline, suspending the volumes of previously configured shadow volume sets.



Note - The commands for suspending and resuming shadow volume sets are not made available to the user. The sets may be suspended and resumed, however, by disabling and enabling the Point-in-Time Copy SMF service using the dscfgadm utility. For more information, refer to the Sun StorageTek Availability Suite 4.0 Software Installation and Configuration Guide.



Unlike the run-control scripts, which were started sequentially, many SMF services may start concurrently during system startup, resulting in decreased boot times. To ensure that the Point-in-Time Copy SMF service is started at the appropriate time in the boot process, its service description specifies formalized dependency relationships with other services.

The Availability Suite services under SMF control and the current state is shown below. See man dscfgadm for additional information.


# dscfgadm -i
SERVICE         STATE           ENABLED
nws_scm         online          true
nws_sv          online          true
nws_ii          online          true
nws_rdc         online          true
nws_rdcsyncd    online          true
 
Availability Suite Configuration:
Local configuration database: valid
cluster configuration database: valid
cluster configuration location: /dev/did/rdsk/d16s7


Quiescing a Master Volume

In Solaris operating systems, a disk block is the smallest atomic unit of I/O. Disk blocks are 512 bytes. An I/O operation is atomic if it is guaranteed either to be fully complete (all of the data is confirmed to have been written) or to fail (none of the data is written because some part of the data was confirmed to be unwritable).

Most file systems, databases, and applications create or update an item on a disk in an I/O operation that involves more than a single disk block. For example, if you create a file, you need to populate the file, plus enter its existence in a directory. Or, if you create a record in a database, you need to write the record, plus update the index.

Because systems might experience hardware or software failure, and might crash or lose power, most file systems, volume managers, and databases support a facility or mechanism to repair inconsistencies detected at initial access time. Deterministic repair of the data in these situations is possible, but it might cause partial data to be rolled back or intentionally discarded.

If a point-in-time copy is established against a non-quiesced volume, the point-in-time copy could span non-atomic I/O operations. If this occurs, at initial access time, deterministic repair might be invoked, yielding unpredictable results.

Therefore, a point-in-time copy or update should not be performed against a source volume (master or shadow) without quiescing or stopping all application I/O and flushing any file system caches, such as lockfs(1M), associated with the volume. This quiesced or stopped state is required only for the duration of the copy or update operation, which typically takes milliseconds or seconds to complete. As always, the destination volume (master or shadow) must be in the unmounted or unaccessed state.

A notable exception to this rule is encountered in systems using a logging file system, or in Oracle®, that support hot backup. There is no reason to quiesce a volume set prior to a point-in-time copy if the database is in hot-backup mode. Refer to the specific application's documentation for detailed information, and see any applicable Sun documents available at: http://docs.sun.com.

Sun StorageTek Availability Suite 4.0 Point-in-Time Copy software provides an attractive complement to a hot-backup facility. Instead of putting the database in hot backup mode for the minutes or hours needed to perform disk or tape replication, the Point-in-Time Copy software requires this mode for only milliseconds or seconds.


Point-in-Time Copies of Mounted Volumes

When the Point-in-Time Copy software makes a copy or update, the source, which is usually the master volume, can be mounted and should be in the quiesced or in a stopped state. Instantly after the copy or update, the target, which is usually the unmounted shadow volume, contains on-disk metadata that states that the volume is currently mounted, but the shadow volume, by design, is not.

When a point-in-time copy is established in this way, when the target volume is first mounted, the software detects that a currently dismounted volume has mounted metadata. The software usually forces fsck to run under these conditions because the assumption is that the only time a volume contains mounted metadata, but is not currently mounted, is after a system crash. Point-in-Time Copy software breaks this assumption: fsck or the database recovery mechanism should return no errors, unless the master was not quiesced when the point-in-time copy was initiated (see Quiescing a Master Volume).

The target of a point-in-time copy operation, which is usually the shadow volume, must not be mounted. If the target is mounted, the application accessing the target volume will read inconsistent and changing data.



Note - If a remote mirror volume is a target of Point-in-Time Copy update or copy, a remote mirror volume set must be in logging mode for the Point-in-Time Copy software to successfully perform an enable, copy, update, or reset operation on a remote mirror volume. If the set is not in logging mode, the point-in-time copy operation fails and the Remote Mirror software reports that the operation is denied.



 


How the Delay Units Function Affects Volume Copy Operations

During an enable, copy, or update operation, a background process is started to synchronize the contents of the master and the shadow volumes. Dependent shadow volume sets do not require this background process (see Dependent Copy Operations). This background processing is driven by the bitmap and traverses from the start of the bitmap to the end, performing the I/O operations and bitmap processing to clear every set bit.

This background synchronization is done in a loop and is mediated by two types of variables: the units variables and the delay variables. Copy units are expressed in 32 Kbyte chunks (for example: 50 Mbyte = 1600); delay units are expressed in milliseconds. The loop performs the specified copy units worth of I/O, and then sleeps for copy delay milliseconds, until the synchronization is complete.

By adjusting the copy units and copy delay values, a system administrator can tune the impact that background synchronization imposes on the system. Once a shadow volume set has been enabled, the system administrator can tune individual or grouped shadow volume sets as desired.

See To Set Copy Parameters.


Export, Import, and Join of Dual-Ported or SAN-Accessible Shadow Volumes

An independent shadow volume that resides on a dual-ported storage array that is attached to two hosts can be utilized by both hosts using the export, import, and join facilities.

The export, import, and join facilities enable retention of point-in-time copy information across the entire process of moving the shadow volume from the original host to the partner host and back again. The independent shadow volume can be exported from the original host, imported by a second host, and later rejoined to its original shadow volume set with no loss of Point-in-Time continuity.

The export command removes an independent shadow volume from its shadow volume set, leaving the master volume and the bitmap volume in place to track changes to the master volume. Any attempt to process I/O to the shadow volume during this process will fail, since the volume is no longer an active member of its original shadow volume set.

The import command enables a new shadow volume set on the importing host. The new set includes the exported shadow volume as its shadow volume. A new bitmap volume is on the partner host. While enabled, any write operations from the partner host are tracked on the bitmap volume. After partner host processing is complete, the shadow volume set is disabled and the exported shadow volume with its new bitmap volume must be made available for the join command on the original host.

The join command reassociates the exported shadow volume with its original shadow volume set by using an OR operation to compare the contents of the bitmap volume from the partner host with the contents of the original bitmap. If no writes occurred to the shadow volume while it was on the secondary host, the bitmap contains only zeros, and this OR operation leaves the bitmap on the original host unchanged. The bitmap volume from the partner host is no longer needed after the join command is complete, and the volume can be reused.

If a write did occur on the partner host, the OR operation sets the bitmap for the associated block to 1 (or changed). Using the bitmap volume, you can now create a point-in-time copy using the update copy.

See Exporting, Importing, and Joining Shadows in a Standalone Environment and Exporting, Importing, and Joining Shadows in a Sun Cluster OE for details.


Grouping of Volume Sets

The Point-in-Time Copy software enables you to place shadow volume sets into I/O groups.

Groups are helpful in administering multiple volume sets in much the same way that a script would be. With an I/O group, a single CLI command can be executed on every member of the group.

I/O groups enable shadow volume sets to be controlled as a single unit for point-in-time copy or update operations. This facility is especially useful for making consistent point-in-time copies among a group of shadow volume sets. Group point-in-time copy or update operations are atomic, which means that an operation performed on a group is guaranteed to occur on every volume set in the group or to fail on all the volume sets if it fails on a single volume set.

You can specify I/O groups for the update, full volume copy, wait, list, display, abort, reset, disable, and export operations. I/O groups can be used to create consistent point-in-time copies among a group of master volumes (often required by DBMS that span multiple volumes).

TABLE 2-1 is a usage summary for options that support grouping (-g g). The legend for the usage summary is as follows:

ind - independent volume set

dep - dependent volume set

all - all configured volumes

m - master volume

s - shadow volume

v - shadow volume (reference name)

o - overflow volume

b - bitmap volume

 

 


TABLE 2-1 Usage Summary for Options That Support Grouping

Option

Description

-g g -e ind m s b

Group enable independent master shadow bitmap

-g g -e dep m s b

Group enable dependent master shadow bitmap

-g g -d

Disable group

-g g -u s

Update shadow for all volumes in group

-g g -u m

Update master for all volumes in group

-g g -c s

Copy to shadow for all volumes in group

-g g -c m

Copy to master for all volumes in group

-g g -a

Abort copy for all volumes in group

-g g -w

Wait for all volumes in group

-g g -i

Display status of all volumes in group

-g g -l

List all volumes in group

-g g -L

List all groups

-g g -m v v

Move one or more volumes into group

-g "" -m v

Remove volume from group

-g g -R

Reset all volumes in group

-g g -A o

Attach overflow to all volumes in group

-g g -D

Detach overflow from all volumes in group

-g g -E

Export shadow volume for all volumes in group

-g g -P d u

Set copy delay and units for all volumes in group

-g g -P

Get copy delay and units for all volumes in group


 


Data Services Logging File

The Sun StorageTek Availability Suite 4.0 Point-in-Time Copy software, like all data services software, generates entries in the data services log file, /var/adm/ds.log.

This file serves as a running history of commands that have been executed and includes any related warnings or error messages. This file is maintained by default.

You can rename the logging file if you want to keep dated versions of it, or you can delete the file if it becomes too large. In either case, a new logging file is automatically created by the software.

A sample section of a logging file with Point-in-Time Copy software messages is shown here.


Feb 06 16:09:49 scm: scmadm cache enable succeeded
Feb 06 16:09:50 ii: iiboot resume cluster tag <none>
Feb 06 16:15:16 sv: enabled /dev/vx/rdsk/rootdg/ii_10mb_0
Feb 06 16:15:16 ii: Enabled /dev/vx/rdsk/rootdg/ii_10mb_0 /dev/vx/rdsk/rootdg/ii_1mb_0 /dev/vx/rdsk/rootdg/ii_mb_0 (dependent)
Feb 06 16:15:17 sv: enabled /dev/vx/rdsk/rootdg/ii_1mb_0
Feb 07 08:14:43 ii: Disabled /dev/vx/rdsk/rootdg/ii_1mb_0
Feb 07 08:15:05 sv: enabled /dev/vx/rdsk/rootdg/ii_10mb_0
Feb 07 08:15:05 ii: Enabled /dev/vx/rdsk/rootdg/ii_10mb_0 /dev/vx/rdsk/rootdg/ii_1mb_0 /dev/vx/rdsk/rootdg/ii_mb_0 (dependent)
Feb 07 08:15:05 sv: enabled /dev/vx/rdsk/rootdg/ii_1mb_0
Feb 07 08:15:19 ii: Create overflow succeeded /dev/vx/rdsk/rootdg/ii_9mb_0
Feb 07 08:15:28 ii: Attach /dev/vx/rdsk/rootdg/ii_1mb_0 /dev/vx/rdsk/rootdg/ii_9mb_0
Feb 07 08:19:59 ii: Start update /dev/vx/rdsk/rootdg/ii_1mb_0 to shadow
Feb 07 08:20:02 ii: Finish update /dev/vx/rdsk/rootdg/ii_1mb_0 to shadow
Feb 07 08:21:21 ii: Disabled /dev/vx/rdsk/rootdg/ii_1mb_0
Feb 07 08:21:27 sv: enabled /dev/vx/rdsk/rootdg/ii_10mb_0
Feb 07 08:21:27 ii: Enabled /dev/vx/rdsk/rootdg/ii_10mb_0 /dev/vx/rdsk/rootdg/ii_1mb_0 /dev/vx/rdsk/rootdg/ii_mb_0 (dependent)
Feb 07 08:21:27 sv: enabled /dev/vx/rdsk/rootdg/ii_1mb_0
Feb 07 08:21:38 ii: Attach /dev/vx/rdsk/rootdg/ii_1mb_0 /dev/vx/rdsk/rootdg/ii_9mb_0
Feb 07 08:22:42 ii: Disabled /dev/vx/rdsk/rootdg/ii_1mb_0


Operational Notes

Following are some operational notes.

Cautions: Enable, Copy, and Update Operations

Keep the following cautionary items in mind when performing an enable, copy, or update operation:

Using the CLI for Copy and Update Operations

Always specify the shadow volume name of the shadow volume group when using the copy or update commands.

Length of Volume Names

Master, shadow, and bitmap volume names (absolute path names) are currently limited to a maximum of 64 characters, consisting of any legal characters that can be part of a file name.

Shadowing the Root File System

You cannot make a shadow volume copy of the root device /.

Shadowing Encapsulated Volumes

The Point-in-Time Copy software does not support encapsulated volumes. You cannot create a shadow volume of an encapsulated volume.

Interaction With svadm

Using the command option iiadm -e to enable a volume set automatically adds the volumes to the sv layer. Using the iiadm -d command option to disable a volume set automatically removes volumes from the sv layer.

There is no checking in the sv layer to prevent you from deleting volumes with svadm that are actively being used by the Point-in-Time Copy software or other data services. If you remove volumes from the sv layer that are still in use by Point-in-Time Copy software or Remote Mirror software, you will be able to continue operations on these volumes with no error messages, but the data in the volume set will become inconsistent.

Creating and Configuring Sun StorageTek Volume Sets

The operations that access the configuration include, but are not limited to:



caution icon

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



When configuring a volume set, do not use the same volume set as a point-in-time copy shadow volume and as a remote mirror secondary volume. If you attempt to configure a volume set for two purposes, the data contained on the volume might not be valid for the application that accesses the volume.