C H A P T E R  4

Using the Point-in-Time Copy Software

This chapter explains how to enable and use the Point-in-Time Copy software. The examples in this chapter show how to perform operations using the command-line interface (CLI). This chapter includes:


Task Summary: Getting Started

This table briefly lists the steps and tasks for getting started with the Point-in-Time Copy software.


TABLE 4-1 Getting Started Task Summary

Step

For Instructions (Command-Line Interface)

  1. Choose volumes to use.

Sizing Requirements for Volume Sets

  1. Enable shadow volume sets consisting of master volume, shadow volume, and bitmap volume.

Enabling Volume Sets

  1. Initialize and attach overflow volumes to compact dependent shadow volume sets

Using Overflow Volumes

  1. Collect volume sets in I/O groups for ease of management.

To Move Shadow Volume Sets Into I/O Groups

  1. Perform copy, update, and other operations on the volume sets.

Chapter 4, including:


Updating, Copying, and Waiting Operations

Performing Full Copy Operations

  1. Check volume set status.

To Display Shadow Volume Set Status



Increasing the Storage Volume Limit

The Sun StorageTek Availability Suite software has a default limit of 4096 storage volumes for use with the software. For example, if you use Point-in-Time Copy software only, you can have 1365 volume sets, each consisting of a master, shadow, and bitmap volume. If you use both the Remote Mirror and the Point-in-Time Copy products, the number of volume sets is shared between these two products.

If you want to increase the storage volume limit, edit the /usr/kernel/drv/nsctl.conf file and change the number associated with nsc_max_devices.

The following procedure describes how to increase the storage volume default limit.


procedure icon  To Increase the Storage Volume Limit

1. Log in as the root user.

2. Open the /usr/kernel/drv/nsctl.conf file using a text editor such as vi(1) or ed(1).

3. Search for the nsc_max_devices field.

4. Edit the number in this field to increase your volume limit.

5. Save and exit the file.

6. Restart the Availability Suite services as follows:


# dscfgadm -d
# dscfgadm -e


Sizing Requirements for Volume Sets

Before you can enable shadow volume sets, you must create the volumes with your volume manager. The Point-in-Time Copy software supports VERITAS Volume Manager, Solaris Logical Volume Manager (SLVM) software, and raw volumes.

Shadow volume sets can be organized in I/O groups so that commands can be carried out across multiple shadow volume sets with one command. The number of I/O groups is limited only by the amount of storage you have physically available. The following are the sizing requirements for volume sets:

8 Kbyte per 1 Gbyte of master volume size (rounded up to the nearest whole Gbyte), plus an additional 24 Kbyte for overhead.

For example, to shadow a 3-Gbyte master volume, the bitmap size must be (3 × 8 Kbyte) + 24 Kbyte, or 48 Kbyte in size. A 50-Gbyte master volume requires a 424-Kbyte bitmap volume.

264 Kbyte per 1 Gbyte of master volume size (rounded up to the nearest whole Gbyte), plus an additional 24 Kbyte for overhead.

For example, to shadow a 3-Gbyte master volume, the bitmap size must be (3 × 264 Kbyte) + 24 Kbyte, or 816 Kbyte in size. A 50-Gbyte master volume in a compact dependent shadow volume set requires a 13224-Kbyte bitmap volume.

If you enable a shadow volume set with a bitmap that is too large, the shadow volume set is created even though space might be wasted. If you enable a shadow volume set with a bitmap that is too small, the enable command fails with an error message. See also dsbitmap Bitmap Sizing Utility.


Enabling Volume Sets

Use a volume for the bitmap.

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

A remote mirror volume set must be in logging mode (only if a remote mirror volume is a target of Point-in-Time Copy update/copy) 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.


procedure icon  To Enable an Independent Volume Set

Use the -e ind option to enable an independent shadow volume set. A full volume copy of the master volume to the shadow volume is performed. Both the master volume and the shadow volume are available at once, but the shadow volume is treated as a dependent shadow until the full copy is complete. See also To Enable Volume Sets.

1. Unmount the shadow volume /dev/dsk/c1t3d0s4.

2. Enable an independent shadow volume set by typing:


# iiadm -e ind /dev/rdsk/c1t3d0s0 /dev/rdsk/c1t3d0s4 /dev/rdsk/c1t2d0s5
#-- to enable an independent shadow volume set
# iiadm -g io-groupname -e ind /dev/rdsk/c1t3d0s0 /dev/rdsk/c1t3d0s4 \ /dev/rdsk/c1t2d0s5
#-- to enable an independent shadow volume set in an I/O group

3. Mount the shadow volume, /dev/dsk/c1t3d0s4.

If the shadow volume set is enabled in a nonexistent I/O group, the I/O group is created.


procedure icon  To Enable a Dependent Volume Set

Use the -e dep option to enable a dependent shadow volume set. No copy operation takes place and the volume set is available at once. See also To Enable Volume Sets.

1. Unmount the shadow volume /dev/dsk/c1t3d0s4.

2. Enable a dependent volume set by typing:


# iiadm -e dep /dev/rdsk/c1t3d0s0 /dev/rdsk/c1t3d0s4 /dev/rdsk/c1t2d0s5
#-- to enable a dependent volume set
# iiadm -g io-groupname -e dep /dev/rdsk/c1t3d0s0 /dev/rdsk/c1t3d0s4 \ /dev/rdsk/c1t2d0s5
#-- to enable a dependent volume set in an I/O group 

3. Mount the shadow volume /dev/dsk/c1t3d0s4.

You now have a master volume-dependent Point-in-Time snapshot of the data. If the volume set is enabled in a nonexistent I/O group, the I/O group is created.


Using Overflow Volumes

You can initialize an overflow volume for use with compact dependent shadow volumes, and then attach the overflow volume to selected compact dependent shadow volume sets. You can also detach an overflow volume from a compact dependent shadow volume set.


procedure icon  To Initialize an Overflow Volume

Before you can attach an overflow volume to a shadow volume set, the overflow volume must be initialized. See also To Initialize an Overflow Volume.

single-step bulletInitialize an overflow volume by typing:


# iiadm -O /dev/rdsk/c1t4d0s6

You can now attach shadow volume sets with compact dependent shadow volumes to the newly initialized overflow volume. Any number of compact dependent shadows can be attached to an overflow volume as long as it has sufficient space.

This option supports the optional -n parameter, which directly performs the requested action without prompting. This option is typically used during script processing.



caution icon

Caution - Be sure that you want to initialize the overflow volume, especially if you are using the -noption.





Note - When using the -n option, the -n must precede the -O option on the command line (for example: -nO or -n -O). See -n Option to the -c and -u Command Options.




procedure icon  To Attach Overflow Volumes to Shadow Volume Sets

A dependent shadow volume set with a compact dependent shadow volume can have an overflow volume attached to it so that any writes to the volume set can be redirected to the overflow volume when necessary. See also To Attach an Overflow Volume.



Note - You can attach only one overflow volume to a compact dependent shadow volume.



single-step bulletAttach an overflow volume to a volume set by typing:


# iiadm -A /dev/rdsk/c1t4d0s6 /dev/rdsk/c1t3d0s4

single-step bulletAttach an overflow volume to all compact dependent shadow volume sets in an I/O group by typing:


# iiadm -g io-groupname -A /dev/rdsk/c1t4d0s6

This option supports the optional -n parameter, which directly performs the requested action without prompting. This option is typically used during script processing.

If the volume you are attaching has not yet been initialized (see To Initialize an Overflow Volume), it will be initialized before it is attached. Be certain that you want to initialize the volume, especially when using the -n option.



Note - When using the -n option, the -n must precede the -A option on the command line (for example, -nA or -n -A).




procedure icon  To Detach Overflow Volumes From Shadow Volume Sets

Use this procedure if you want to detach an overflow volume from a compact dependent shadow volume set. See also To Detach an Overflow Volume.

single-step bulletDetach an overflow volume from a shadow volume set by typing:


# iiadm -D /dev/rdsk/c1t3d0s4

single-step bulletDetach an overflow volume from all compact dependent shadow volume sets in an I/O group by typing:


# iiadm -g io-groupname -D

If the overflow volume contains any data associated with any shadow volume set that you are trying to detach, the command will fail.


Moving Shadow Volume Sets

Shadow volume sets can be moved into and out of I/O groups for ease of management. All shadow volume sets within an I/O group respond to commands sent to the I/O group.


procedure icon  To Move Shadow Volume Sets Into I/O Groups

Use the -m option to move one or more shadow volume sets into I/O groups for ease of management. Move a shadow volume set out of any I/O group by typing two quotation marks instead of the I/O group name. See also To Move a Volume Set. If you move the shadow volume set into a nonexistent I/O group, the Point-in-Time Copy software creates that I/O group.

single-step bulletMove the shadow volume set into an I/O group by typing:


# iiadm -g io-groupname -m /dev/rdsk/c1t3d0s4

single-step bulletMove multiple shadow volume sets into an I/O group by typing:


# iiadm -g io-groupname -m /dev/rdsk/c1t3d0s4 /dev/rdsk/c1t4d0s4

single-step bulletMove the shadow volume set out of an I/O group by typing:


# iiadm -g "" -m /dev/rdsk/c1t3d0s4


Setting Copy Parameters

Volume copy can be throttled by setting the copy parameters so that copy operations do not adversely affect ongoing business operations.


procedure icon  To Get and Set Copy Parameters

Use the -P option to set copy parameters after you have enabled your shadow volume sets and collected them in I/O groups for ease of management. When an update or a copy is in progress, two settings determine how much impact the copy or update has on availability of system resources to other applications.

The first setting, delay, is the length of time in system clock ticks (2 through 10000) to wait before sending the next series of data chunks.

The second setting, units, is the number of chunks of data to copy (100 through 60000) before delaying to allow access to other applications.

Get the current settings of these parameters with the -P option. The Point-in-Time Copy software defaults to minimum settings. See also To Set Copy Parameters.

single-step bulletSet copy parameters for a specific volume set by typing:


# iiadm -P delay units /dev/rdsk/c1t3d0s4

single-step bulletSet copy parameters for all volume sets in an I/O group by typing:


# iiadm -g io-groupname -P delay units

single-step bulletGet copy parameters for a specific volume set by typing:


# iiadm -P /dev/rdsk/c1t3d0s4

single-step bulletGet copy parameters for all volume sets in an I/O group by typing:


# iiadm -g io-groupname -P


Updating, Copying, and Waiting Operations

To bring the master volume and the shadow volume into synchronization, you can perform either an update or a copy. An update writes only the blocks of data that have changed since the last update or copy was recorded in the bitmap. A copy operation performs a full volume copy, which takes longer than an update. You can update the master volume from the shadow volume or the shadow volume from the master volume. If necessary, you can cause the Point-in-Time Copy software to wait for a copy or update to complete before executing the next command.

The update, copy, and wait command options also support process ID (PID) locking see PID Locking a Shadow Volume Set.

Take the same precautions using copy and update options as you would using the dd(1M) command to copy between raw devices. That is, unmount the target of the copy and update operation first. You can unmount the source device also, to stop write operations to it and ensure a consistent shadow copy, but this source unmount is not required. After issuing the copy or update, remount the devices and resume the workload. You do not have to wait for the operation to be complete.

A remote mirror volume set must be in logging mode (only if a remote mirror volume is a target of Point-in-Time Copy update/copy) 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.



Note - If you do not use the -n option to the update command, you are prompted to confirm updates for any update from a shadow volume to its master volume. See -n Option to the -c and -u Command Options.



Use the -u option to perform fast resynchronizations, or updates, of a shadow volume set at much faster speeds than most full volume copy or mirroring operations. See also To Update a Volume Set.


procedure icon  To Update the Shadow Volume From the Master Volume

1. Unmount the shadow volume, /dev/rdsk/c1t3d0s4.

2. Update the shadow volume by typing:


# iiadm -u s /dev/rdsk/c1t3d0s4
#-- update the shadow from the master in the specified volume set
# iiadm -g io-groupname -u s
# -- update all volume group shadows associated with the specified I/O group

3. Mount the shadow volume.


procedure icon  To Update the Master Volume From the Shadow Volume

1. Unmount the master volume, /dev/rdsk/c1t3d0s0.

2. Update the master volume by typing:.


# iiadm -u m /dev/rdsk/c1t3d0s4
# -- update the master from the shadow in the specified volume set
# iiadm -g io-groupname -u m
# -- update all volume group masters from their shadows in the specified I/O group



Note - The specified volume in this example is the shadow volume, even though you are updating the master volume. This is correct; always specify the set's shadow volume when performing on a shadow volume set



3. Mount the master volume.

Performing Full Copy Operations

You typically perform a full volume copy when you need two physically separate volumes, if a volume has become corrupted, or if a volume has failed. See also To Copy Volumes.


procedure icon  To Copy All Data From the Master Volume to the Shadow Volume

1. Unmount the shadow volume, /dev/rdsk/c1t3d0s4.

2. Copy all data from the master volume to the shadow volume by typing:


# iiadm -c s /dev/rdsk/c1t3d0s4
# -- copy all data from master volume to shadow volume in the specified volume set
# iiadm -g io-groupname -c s
#-- copy all data from all masters in an I/O group to their shadows

3. Mount the shadow volume.


procedure icon  To Copy All Data From the Shadow Volume to the Master Volume

1. Unmount the master volume, /dev/rdsk/c1t3d0s0.

2. Copy all data from the shadow volume to the master by typing:


# iiadm -c m /dev/rdsk/c1t3d0s4
#-- copy all data from shadow volume to master volume in the specified volume set
# iiadm -g io-groupname -c m
#-- copy all data from all shadows in an I/O group to their masters

3. Mount the master volume.


procedure icon  To Wait for Completion of Copy or Update

When you want to issue a command involving shadow volume sets that are part of an ongoing copy or update operation, issue a wait command and then issue your next command. The Point-in-Time Copy software waits until the copy or update is complete before proceeding with the next command. See also To Wait for a Copy or Update Operation to Complete.

The wait command option also supports the unlock PID option, -n. If the locking process has terminated without unlocking a shadow volume set, you can unlock it by using the -n option to the wait command option. See PID Locking a Shadow Volume Set.

The wait command monitors all processes executing on the shadow volume set when the command is issued and returns when all of the processes have completed.

 


PID Locking a Shadow Volume Set

When you execute a copy or update command on a shadow volume set and you include the -p option, you lock that shadow volume set so that no other process can affect it. Executing the wait command option, -w, with the -p command option against a shadow volume set clears the PID lock only if your process is the locking process.

Locking a Shadow Volume Set

You can lock a shadow volume set when you update or copy a shadow volume.

For example, this command line updates a shadow volume from its master volume and PID locks the shadow volume set to the process that issues this command line:


# iiadm -p -u s /dev/rdsk/c1t3d0s4

This command line copies a shadow volume and PID locks the shadow volume set to the process that issues this command line:


# iiadm -p -c s /dev/rdsk/c1t3d0s4

When you attempt to PID lock a shadow volume set, three things can happen:

Unlocking the PID on a Shadow Volume Set

There are two circumstances in which you perform commands to unlock a PID lock: when you are finished with the shadow volume set and are no longer concerned that it might change while a command is executing, or when a process has terminated without releasing a PID lock.

For example, to unlock a shadow volume set that your process locked, type:.


# iiadm -p -w /dev/rdsk/c1t3d0s4

This command line waits for completion of all operations against a shadow volume set and unlocks the PID lock of the volume set. You must be the originating process in order for this command to execute successfully

In the event that a process is terminated before it unlocks a PID lock on a volume set, the wait command with the -n option can be used to unlock it.

For example, to unlock a shadow volume set whose locking process is defunct, type:.


# iiadm -n -p -w /dev/rdsk/c1t3d0s4

This command line waits until all commands against a shadow volume set have terminated, and then unconditionally unlocks the PID lock. You do not have to be the originating process in order for this command to execute successfully



caution icon

Caution - The -noption to the wait command, -w, has no inherent security and can be used by the root user even if an initiating process is still current. Be cautious in your use of this command option.



 


Listing Shadow Volume Sets and Volumes

These command options enable you to list various shadow volume sets and volumes.


procedure icon  To List Shadow Volume Sets

You can use the -l option to list all configured shadow volume sets, including suspended and offlined sets, or all such shadow volume sets in a specific I/O group. See also To List Volume Sets.

single-step bulletList all configured shadow volume sets by typing:


# iiadm -l

single-step bulletList all configured shadow volume sets in an I/O group by typing:


# iiadm -g io-groupname -l



Note - Typing iiadm with no options lists the same information as typing
iiadm -l.




procedure icon  To List Overflow Volumes

Use the -L option to list all overflow volumes. See also To List Overflow Volumes or Groups.

single-step bulletList all overflow volumes by typing:


# iiadm -L


procedure icon  To List I/O Groups

Use the -L option to list all I/O groups. See also To List Overflow Volumes or Groups.

single-step bulletList all I/O groups by typing:


# iiadm -g -L


Displaying Status

You can display the status of shadow volume sets and of overflow volumes. Displaying status enables you to see the progress of copy and update operations and the status of overflow volumes.


procedure icon  To Display Shadow Volume Set Status

Use the -i option to check the status of a shadow volume set or of all shadow volume sets in an I/O group. Use this option after issuing a copy or an update command to see if the operation is complete. Also see To Display Volume Set Status.

single-step bulletDisplay the status of a specific shadow volume set by typing:


# iiadm -i /dev/rdsk/c1t3d0s4

single-step bulletDisplay the status of all shadow volume sets in an I/O group by typing:


# iiadm -g io-groupname -i


procedure icon  To Display Overflow Volume Status

Use the -Q option to display the status of overflow volumes, the total overflow volume capacity, how much capacity is in use, and how much capacity is available. See also To List Overflow Volumes or Groups.

single-step bulletDisplay the status of a specific overflow volume by typing:


# iiadm -Q /dev/rdsk/c1t4d0s6



Note - If the overflow volume is not attached to any compact dependent shadow volumes and you use the iiadm -Q option, you see an error message.




Aborting Copy or Update Commands

Update operations and copy operations can consume system bandwidth. You can abort these operations during busy times and continue them later.


procedure icon  To Abort a Copy or an Update Operation

Use the -a option to abort a copy or update that is in process. The state of the copy or update is saved so that you can complete the operation at a later time. See also To Abort a Copy or Update Operation.

single-step bulletAbort the copy or update to a specific shadow volume set by typing:


# iiadm -a /dev/rdsk/c1t3d0s4

single-step bulletAbort all copy or update operations to all shadow volume sets in an I/O group by typing:


# iiadm -g io-groupname -a

Reissue the copy or update command for the affected volume set to continue.



Note - The master and shadow volumes of an independent volume set are complete, consistent volumes that can be used independently, after you disable the volume set. Thus prior to allowing a disable operation to complete, both the master and shadow volumes must be left in a consistent state.

If a copy or update operation is in progress, you cannot disable the volume set using the iiadm -d command option. To proceed, you must abort the copy or update operation using the iiadm -a command option. The volumes are left inconsistent, so a disable command option is subsequently allowed.



Aborting a shadow volume set causes all copy or resynchronization activity to stop. A Point-in-Time update is required to resume internal processing.

 


Resetting

Shadow volume sets that are offline for any reason can be put back online with the reset command. If a bitmap volume goes offline, the delay and units parameters revert to the default values when the volume is reset with the iiadm -R command.


TABLE 4-2 Reset Command Results for Various Volume Types

Offline Volume Type

After issuing a reset, the Point-in-Time Copy software:

Dependent shadow volume

Automatically updates the shadow volume from the master volume, using volume differences stored by the bitmap volume

Independent shadow volume

Automatically copies the master volume to the shadow volume

Bitmap

Resynchronizes the volume pair by copying the master volume to the shadow volume


Offlining a volume in a shadow volume set causes any I/O attempted on that volume to fail. The Point-in-Time copy driver intervenes, disallowing access (for example, to a shadow volume) and preventing writes and bitmap changes on a master.

Resetting the volume after it has been offlined reestablishes I/O. If the master volume had been offline, for example, bitmap management restarts on the previously established bitmap.

Resetting volumes is usually required when storage array maintenance is required, for example, when you must replace a disk on which part of a shadow volume set resides.


procedure icon  To Reset Volume Sets



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.



An offline shadow volume set can be brought back online with the -R option after the reason for the offline status has been cleared. Note that the volume set, while still associated, is not considered to contain valid shadow data. See also To Reset a Volume Set or I/O Volume Group.

single-step bulletReset an offline shadow volume set by typing:


# iiadm -R /dev/rdsk/c1t3d0s4

single-step bulletReset all offline shadow volume sets in an I/O group by typing:


# iiadm -g io-groupname -R



caution icon

Caution - The iiadm -ggroup-Rcommand must not be usedwith multiple shadows of single masters. All the resets occur at the same time, with unpredictable results.




procedure icon  To Reset the Master Volume of Multiple Shadow Volumes

If the master volume of more than one shadow volume (multiple shadows) goes offline and, upon repair, must be returned online with the iiadm -R command, follow this procedure:

1. Reset all independent shadow volume sets except the shadow volume set that you want to use to update the master volume.


# iiadm -R shadow shadow2 ... shadowN

2. Wait for all these resets to finish with the -w command.


# iiadm -w shadow shadow2 ... shadowN

3. Reset the final shadow volume set that contains the shadow volume you want to use for updating the master volume.


# iiadm -R shadow

4. Wait for the copy to complete.


# iiadm -w shadow

5. Reset all dependent shadow volume sets.


# iiadm -R shadow shadow2 ... shadowN

 


Disabling a Shadow Volume Set

Disabling a shadow volume set ends the association of the volumes within the shadow volume set. The association of the data in the shadow volume set cannot be reestablished except by enabling the shadow volume set again, which causes a full copy of the master to the shadow. The shadow volume set is in effect new and the data status at the time of the disable operation is lost. Disable a volume set only if you are finished using it as a shadow volume set.


procedure icon  To Disable a Shadow Volume Set

See also To Disable Volume Sets and Interaction With svadm.

single-step bulletDisable the Point-in-Time Copy software for a volume set by typing:


# iiadm -d /dev/rdsk/c1t3d0s4

single-step bulletDisable all volume sets in an I/O group by typing:


# iiadm -g io-groupname -d


procedure icon  To Disable an Independent Shadow Volume Set During a Copy or Update Operation

The Point-in-Time Copy software requires that the master and shadow volumes of an independent shadow volume set be in a consistent state before the shadow volume set is disabled. Therefore, the Point-in-Time Copy software does not allow you to disable an independent shadow volume set while a copy or update operation is in progress.

Any volume that is a dependent shadow volume must be unmounted before attempting a disable operation. This includes an independent shadow volume that is dependent due to an incomplete copy or update operation.

If you must disable an independent volume set while a copy or update is in progress, and you are not concerned with the consistency of the target volume:

1. Unmount the shadow volume set.

2. Abort the copy or update.

See To Abort a Copy or an Update Operation.


# iiadm -a /dev/rdsk/c1t3d0s4

3. Disable the shadow volume set with the iiadm -d command option.


# iiadm -d /dev/rdsk/c1t3d0s4

The shadow volume set is now disabled.

If a shadow volume set is configured with a dependent shadow volume, any I/O being processed to the shadow volume is halted, and the volume set is disabled.



Note - The target (master or shadow) volume of the copy or update operation is left in an inconsistent state.




Exporting, Importing, and Joining Shadows in a Standalone Environment

The functionality implemented by the three iiadm command options, -E (export),
-I (import), and -J (join), allow for a shadow volume on a dual-ported device to be exported to a secondary host while still under Point-in-Time Copy software control. This capability enables shadow volume processing by associated applications to be off-loaded to a secondary host without affecting the primary host's master volume or its associated applications.

Retaining control of the shadow volume while imported on the secondary host maintains bitmap integrity to facilitate fast resynchronization via copy or update processing at a later time.

While the shadow volume is being exported to a secondary host, read and write access to the master volume is tracked by the Point-in-Time Copy software. Read and write access to the shadow volume on the secondary host is tracked by the Point-in-Time Copy software using a second bitmap.

Once secondary host processing is complete, the shadow volume and second bitmap can be disabled on the secondary host and joined to the original master volume. The master, shadow, and bitmap consistency is reconstructed. After completing the join processing, the shadow volume set is in the same state as it would have been if the secondary host processing of the shadow volume had been performed by the primary host.



Note - You might not need to copy the bitmap to the original host if the bitmap is on a dual-ported drive.





Note - The bitmap from host B that was copied across to be joined can be removed from host A once the join command is complete.





caution icon

Caution - Once a shadow volume is rejoined to its original master on host A, host B should not use the shadow volume even if it is still accessible.




procedure icon  To Export, Import, and Join a Shadow Volume

The following is a tabular outline that describes how to export, import, and join a shadow volume.

See also To Export a Shadow Volume.

See also To Import a Shadow Volume.

See also To Join a Shadow Volume.

1. Create a shadow volume on the primary host and start the application using that shadow volume.


Primary Host

Secondary Host

Comments

Master volume

 

Existing master volume, mounted, valid data

Create shadow and bitmap1 volumes

 

Should be the same redundancy (RAID) as the master

shadow volume

 

Same size as master on a dual-ported device

bitmap1 volume

 

Size based on master volume set

Enable independent shadow set

 

iiadm -e ind master shadow\ bitmap1

Mount shadow volume

 

mount shadow mount_point

Start application using shadow

 

 


2. Switch the application and shadow volume to the secondary host.


Primary Host

Secondary Host

Comments

Stop application using shadow

 

Existing master volume, mounted, valid data

Unmount shadow

 

umount mount_point

Export shadow volume

 

iiadm -E shadow

Create bitmap2

 

same size as bitmap1,

on dual-port device

Copy bitmap1 to bitmap2

 

dd bitmap1 bitmap2

Deport shadow/bitmap2

 

Required for VxVM or SDS(SLVM)

 

Import shadow/bitmap2

Required for VxVM or SDS(SLVM)

 

Import shadow volume

iiadm -I shadow bitmap2

 

Mount shadow volume

mount shadow mount_point

 

Start application using shadow

 


3. Switch the application and shadow volume to the primary host.


Primary Host

Secondary Host

Comments

 

Stop application using shadow

 

 

Unmount shadow volume

umount mount_point

 

Disable shadow volume

iiadm -d shadow

 

Deport shadow/bitmap2

Required for VxVM or SDS(SLVM)

Import shadow/bitmap2

 

Required for VxVM or SDS(SLVM)

Join shadow volume

 

iiadm -J shadow bitmap2

Mount shadow volume

 

mount shadow mount_point

Start application using shadow

 

 


 


Exporting, Importing, and Joining Shadows in a Sun Cluster OE

The Point-in-Time Copy software provides the functionality to allow for an independent shadow volume on a multi-ported storage device to be exported to a secondary node within a Sun Cluster Operating Environment (OE), while still under Point-in-Time Copy software control. This capability of Exporting / Importing / Joining of a Point-in-Time Copy shadow set enables shadow volume processing by associated applications to be off-loaded to a secondary node within a Sun Cluster OE, without affecting the primary node's master volume or its associated applications. Since the Point-in-Time Copy software retains control of the shadow volume while it is imported on a secondary node within a Sun Cluster OE, point-in-time consistency is retained to facilitate fast resynchronization via update processing at a later time.

On a per Point-in-Time Copy set basis, each volume set requires a minimum of three raw global device partitions or volume manager controlled volumes (for example, Solaris Volume Manager or VERITAS Volume Manager). For the E/I/J functionality to work correctly, the shadow volume must be on a different global device or volume manager controlled device group than its associated master and bitmap volumes. This allows the shadow volume's device group to be switched between various nodes in a Sun Cluster and to be used as an exportable shadow volume.

Configuring a Point-in-Time Copy Set in a Sun Cluster OE

The steps to create a highly available Point-in-Time Copy volume set are listed in the following section.

There is no convention required for the Resource Group Manager (RGM) resource groups or resource types, although a planned and well thought out naming scheme, spanning the volume manager, if one is used, and the Sun Cluster resource groups and types, will be beneficial later on if troubleshooting is required.

The setup creates a Point-in-Time Volume set on Sun Cluster nodes, node-A and node-B, with the exportable shadow volume available on node-C.


procedure icon  To Configure a Point-in-Time Copy Set in a Sun Cluster OE



Note - This example uses two SVM device groups: "oracle" and "backup", where "oracle" is the master volume's device group and "backup" is the exportable shadow volume's device group.



This example is based on configuring the following Point-in-Time Copy set:


# iiadm -ne ind /dev/md/oracle/rdsk/d1 /dev/md/backup/rdsk/d1 \
/dev/md/oracle/rdsk/d2



Note - Do not invoke the above, or similar, iiadm command at this time in the following sequence of steps. The device attributes of the constituent volumes of an enabled Point-in-Time Copy set are such that without Sun Cluster Resource Group Manager (RGM) control, the association of a master and bitmap volume, allowing an exportable shadow volume, makes all of the associated device groups no longer highly available. This fact could impact the high availability of the Sun Cluster as it pertains to these associated volumes.



1. Create a resource group that will contain the HAStoragePlus resource type associated with the Point-in-Time Copy set.

This resource group should specify two or more nodes within the Sun Cluster, or be left blank if all nodes in the Sun Cluster are capable of supporting the Point-in-Time Copy set as a highly available resource.


# scrgadm -a -g Availability_Suite_RG -h node-A,node-B[,node-C,...]

Or, for all nodes in the Sun Cluster, as long as the Availability Suite software has been installed and configured on each:


# scrgadm -a -g Availability_Suite_RG



Note - Additional resource types for other Sun Cluster High Availability (HA) data services or applications may be added to this same resource group at your discretion.



2. Assure that the SUNW.HAStoragePlus resource type is registered. If not register it.


# scrgadm -p | grep "Res Type name:" | grep HAStoragePlus
# scrgadm -a -t SUNW.HAStoragePlus

3. Add an HAStoragePlus resource type to the previously created resource group.

The HAStoragePlus resource type will be used to specify two Sun Cluster device groups, one representing the master-bitmap volume pair, and one for the exportable shadow volume. The ordering of these device group is important; the exportable shadow volume must be the last one specified.



Note - The HAStoragePlus resource type allows for its GlobalDevicePaths parameter to be either the full device path specification of a Sun Cluster device or the name of a Sun Cluster device group. The first format is used in this example, so that no doubt exists as to which devices are being associated. In doing so, the example will be setting a GlobalDevicePath with both a master and bitmap volume, each of which is in the same device group. As such, one of the device path specifications is redundant, and will be ignored.




# scrgadm -a -g Availability_Suite_RG -j \
Availability_Suite_RES -t SUNW.HAStoragePlus -x \
GlobalDevicePaths=/dev/md/oracle/rdsk/d1,\
/dev/md/oracle/rdsk/d2,/dev/md/backup/rdsk/d1 -x \
AffinityOn=False

The Sun Cluster resource type SUNW.HAStoragePlus, supports a configuration option AffinityOn, with the default value being True. This setting, along with the fact that the GlobalDevicePaths qualifier contains two device groups, with one of the device groups being the exportable shadow volume, implies that if the exportable shadow volume is currently in use on a secondary Sun Cluster node, this resource group will have a strong affinity to move to the node, regardless of the node list specified in step 2 above.

For example, in a three (or more) node Sun Cluster configuration, where two nodes have the system resources to support an HA enterprise class application like Oracle and the third Sun Cluster node is a low-end backup system, if the exportable shadow volume is in use on this third system, the HA application will move to the third Sun Cluster node, even if there are not system resources capable of supporting its execution. This is the justification for setting AffinityOn=False in the example above.

4. Bring the resource group online. Then, assure that the resource group is located on the Sun Cluster node where the Point-in-Time Copy enable command will be invoked.


# scswitch -Z -g Availability_Suite_RG
# scswitch -z -g Availability_Suite_RG -h node-A

5. Enable the Point-in-Time Copy set, taking note of the new option -n to enable exportable shadows.


# iiadm -ne ind /dev/md/oracle/rdsk/d1 /dev/md/backup/rdsk/d1 \
/dev/md/oracle/rdsk/d2

6. Validate that the Point-in-Time Copy set is available on this node.


# iiadm -i /dev/md/backup/rdsk/d1
# scstat -g
# scstat -D

7. Switch the resource group from this node to each of the other configured node(s), and validate the set.


# scswitch -z -g Availability_Suite_RG -h node-B
# telnet node-B
<login to root account>
# iiadm -i /dev/md/backup/rdsk/d1
# scstat -g
# scstat -D
# ^D {logout}

8. This Point-in-Time Copy volume set is now highly available and usable as a resource group to which other highly available applications (HA-NFS, HA-ORACLE, and so forth) can now be added.

For example:


# scrgadm -a -g Availability_Suite_RG -j nfs_res -t SUNW.nfs
# scswitch -e -j nfs

To use the Point-in-Time shadow volume on another node within the Sun Cluster, it must be exported from its associated set and disabled as a device path within its HAStoragePlus resource type.

9. Prior to being exported from a Point-in-Time Copy set, the II set must be fully independent, which is confirmed by wait (iiadm -w), returning.


# iiadm -w /dev/md/backup/rdsk/d1

10. Export the II shadow volume from its associated Point-in-Time Copy set.


# iiadm -E /dev/md/backup/rdsk/d1
# iiadm -i /dev/md/backup/rdsk/d1

11. The Point-in-Time exportable shadow volume can be switched to another node in the Sun Cluster.


# scswitch -z -D backup -h node-C

Or the Point-in-Time Copy set can be switched to another node in the Sun Cluster.


# scswitch -z -g Availability_Suite_RG -h node-C

12. Then, validate the correct behavior.


# telnet node-C
<login to root account>
# iiadm -i /dev/md/backup/rdsk/d1
# scstat -g
# scstat -D

13. The Point-in-Time Shadow volume is now accessible independently from the Point-in-Time Copy set, off-host, yet the original Point-in-Time set is still active on the other Sun Cluster node.

If the shadow volume will be accessed in a read/write mode, a secondary bitmap should be used to import the shadow locally on this node, so that subsequent fast-resynchronization operations (iiadm -u) can be done, versus the full-synchronization (iiadm -c).



Note - The exportable shadow MUST be enabled with the -C local tag, so that the system can differentiate between the highly available Point-in-Time Copy set and the locally accessible exportable shadow, which have the exact same name.




# iiadm -C local -I /dev/md/backup/rdsk/d1 /dev/md/backup/rdsk/d2
# iiadm -i /dev/md/backup/rdsk/d1



Note - From this node, you will see the imported shadow volume and the shadow volume's Point-in-Time Volume set as suspended on this node and active on node-A (or node-B).



14. While this imported shadow volume is active on this node, test steps #4 and #5 to validate that the original Point-in-Time Copy set is still highly available.

Remember that the original Point-in-Time Copy set is not configured to be highly available on node-C, since an attempt to do so will fail as long as the shadow volume is imported on this node.

15. When you are done using the imported shadow volume on this node (if it was decided to import it), disable the locally accessible imported shadow volume, switch it back to the node where the Point-in-Time Volume set is active, and enable the resource in the resource group.


# iiadm -C local -d /dev/md/backup/rdsk/d1

16. Take the resource offline and back online, forcing the exportable shadow volume back to the Sun Cluster node, where the rest of the Point-in-Time Copy set is enabled.


# scswitch -n -j Availability_Suite_RES
# scswitch -e -j Availability_Suite_RES



Note - From this node, you will still see the shadow volume's Point-in-Time volume set as suspended on this node, active on node-A (or node-B). The imported shadow volume is no longer listed.




# iiadm -i /dev/md/backup/rdsk/d1
# ^D {logout, back to node-A }

17. Now join the shadow volume (and possible changes) back with the original Point-in-Time Copy set.


# iiadm -J /dev/md/backup/rdsk/d1 /dev/md/backup/rdsk/d2

18. The Point-in-Time Copy set is back in its original state, as though the shadow volume has never been exported.

Point-in-Time Copy Set Considerations in a Sun Cluster OE

This section discusses issues involved with Point-in-Time Copy sets in a Sun Cluster OE.

Redundancy

To provide high availability to the data contained on a Point-in-Time Copy set when using global devices, it is assumed that the master, shadow and bitmap volumes are on redundant storage, since there is no means today to provide for host-based data service redundancy on raw global devices. If controller based redundancy is not available, then a Sun Cluster supported volume manager must be used. For performance reasons, it is recommended under all scenarios that bitmap volumes are NOT placed on RAID-5 volumes (either host-based or controller-based), since the nature of bitmap I/O processing within a Point-in-Time Copy volume set can be I/O intensive.

Implicit Join Operation

The implicit join operation is a new feature of the Availability Suite software, when using the Export, Import, Join functionality in a Sun Cluster OE. By design, a Point-in-Time Copy set with its shadow volume exported, can not coexist on the same node as the Point-in-Time Copy set containing the imported shadow volume.

From an operational point of view, having the master volume and shadow volume on two different Sun Cluster node is the sole reason for using Export, Import, Join functionality in a Sun Cluster OE. If you wanted both master and shadow volumes on the same node, you would have avoided using Export, Import, Join in the first place.

If a Sun Cluster voluntary or involuntary failover event decided to move the master and associated bitmap volume to the Sun Cluster node containing the imported shadow volume, the aforementioned design issue would prevent the failover from completing successfully. To address this concern, the Availability Suite software detects this failover condition and performs an implicit join operation, merging the two Point-in-Time Copy sets back into one. This operation should have no impact on the master or shadow volume, other then the fact that both volumes are now in the same Point-in-Time Copy set, on the same node in the Sun Cluster.

Incomplete Export / Import / Join Sequence

The operational procedures for Export, Import, Join are based on the assumption that all three steps will be performed. Due to circumstances in system availability outside of Availability Suite, after exporting the shadow volume from the set, it may not be possible to perform the Import step at this time, yet it is desirable to Join the exported shadow volume back into the Point-in-Time Copy set. In other words, it may be desirable at times to perform an Export, Join sequence, with no Import step. To perform a Join operation, there is still the requirement for a secondary bitmap volume, but since this secondary bitmap volume was NOT used during a recent Import operation, it contains stale data or uninitialized data. Prior to performing a Join operation, it is required to copy (using the Solaris dd utility) the current bitmap volume over the contents of the secondary bitmap volume, so that the secondary bitmap volume's data is in a known state. The failure to perform this manual initialization step may result in the Join operation failing, or when state data is used, it may cause an inconsistency between what is actually on the shadow volume and the current state as recorded in the bitmap.


Displaying Help and Software Version Numbers

The Point-in-Time Copy software display help information as well as software version numbers of installed modules.


procedure icon  To Display Help Information

Help information is displayed in two ways: in context with an incorrectly entered command line, and in response to the -h option. Command-line errors get specific help for the command in question. The -h option causes the entire help content to be sent to stderr.

single-step bulletDisplay the entire help content by typing:


# iiadm -h 


procedure icon  To Display Software Version Numbers

The version numbers of installed Point-in-Time Copy software modules are accessible through the -v option. See also To Print Software Versions.

single-step bulletDisplay the software version numbers by typing:


# iiadm -v


dsbitmap Bitmap Sizing Utility

The dsbitmap utility is installed along with the Sun StorageTek Availability Suite software. Use it to calculate the required size of a bitmap for a Point-in-Time Copy shadow volume set or a Remote Mirror volume set.

The dsbitmap utility is typically used by the system administrator during the initial stages of configuring Sun StorageTek Availability Suite software. The utility determines the required bitmap volume sizes, and then checks if the bitmap volumes that have been created are suitable.

dsbitmap

This utility enables you to determine the required size of the volume for a Point-in-Time Copy bitmap or a Remote Mirror bitmap. If you include an optional proposed bitmap volume in the command, its suitability as a bitmap volume for the proposed data volume is tested.

Syntax

To obtain the size of a Point-in-Time Copy bitmap, use this command:

dsbitmap -p data-volume [bitmap-volume]

To obtain the size of a Remote Mirror bitmap, use this command:

dsbitmap -r data-volume [bitmap-volume]

Usage for dsbitmap


# dsbitmap -h
usage: dsbitmap -h
       dsbitmap { -p | -r } data_volume [bitmap_volume]
       -h : This usage message
       -p : Calculate size of Point in Time bitmap
       -r : Calculate size of Remote Mirror bitmap

Examples for dsbitmap

Remote Mirror volumes display both memory and disk queue sizes.


# dsbitmap -r /dev/md/rdsk/d100
Remote Mirror bitmap sizing
 
Data volume (/dev/md/rdsk/d100) size: 2064384 blocks
Required bitmap volume size:
  Sync replication: 9 blocks
  Async replication with memory queue: 9 blocks
  Async replication with disk queue: 73 blocks

Point-in-Time Copy volumes display sizes for independent, dependent, and compact dependent sizes.


# dsbitmap -p /dev/md/rdsk/d100 
Point in Time bitmap sizing
 
Data volume (/dev/md/rdsk/d100) size: 2064384 blocks
Required bitmap volume size:
  Independent shadow: 62 blocks
  Full size dependent shadow: 62 blocks
  Compact dependent shadow: 798 blocks