ETERNUS SF AdvancedCopy Manager Operator's Guide 13.0 -Microsoft(R) Windows(R) 2000- -Microsoft(R) Windows Server(TM) 2003-
Contents Index PreviousNext

Appendix C Preprocessing and Postprocessing of Replication

The replication preprocessing and postprocessing are performed before and after replication.

C.1 Overview 

The scripts of preprocessing and postprocessing of replication are started before and after the replication (copy) processing.

AdvancedCopy Manager retains the processing required for a replication source volume and replication destination volume in these scripts.

This chapter describes the content and setup of preprocessing and postprocessing.

C.2 Preprocessing and Postprocessing of Replication 

The replication preprocessing and postprocessing in AdvancedCopy Manager needs to be performed for both the replication source volume and the replication destination volume. However, the purpose for each is different.

The specific processing executed during the preprocessing and postprocessing differs according to the data contents of the volume. The next chapter explains the preprocessing and postprocessing of the file system.

C.2.1 Preprocessing and postprocessing for a file system 

AdvancedCopy Manager assumes that the file system consists of volumes and executes the following preprocessing and postprocessing on the copy source volume and copy destination volume.

Copy-source volume

Preprocessing

[Default operation]

The copy-source volume is locked.

[When the Xflush option is specified or BufferFlushOnly is set to on]

The file system buffer of the copy-source volume is flushed.

[When the f option is specified]

No processing is done (the copy-source preprocessing script is not executed).

Postprocessing

[Default operation]

The copy-source volume is unlocked.

[When the Xflush option is specified]

No processing is done.

[When the f option is specified]

No processing is done (the copy-source postprocessing script is not executed).

Copy-destination volume

Preprocessing

[Default operation]

The copy-destination volume is locked.

[When the t option is specified]

No processing is done (the copy-destination preprocessing script is not executed).

Postprocessing

[Default operation]

The copy-destination volume is unlocked.

[When the t option is specified]

No processing is done (the copy-destination postprocessing script is not executed).


The preprocessing and postprocessing on the copy source volume is intended to guarantee the copy source data. The preprocessing and postprocessing on the copy destination volume is intended to disable access from other processes during the synchronous processing and snapshot copying.

The implementation status of the preprocessing and postprocessing for a file system is shown below. This table shows whether preprocessing and postprocessing are performed depending on the command type .It also shows the copy status upon execution of the command.

[table C.1 Preprocessing and postprocessing for a file system]

Command

Copy status

Source/Destination

Preprocessing

Postprocessing

Synchronous processing start command

(swsrpstartsync)

uncopy or

replication established state

Source

X

X

Destination

O--*1

H--*2

Replication creation command

(swsrpmake)

equivalency holding state

Source

O

O

Destination

H--*1

O--*2

Replication cancellation command

(swsrpcancel)

equivalency holding state

Source

O

O

Destination

H--*1

O--*2

replication established state

Source

X

X

Destination

X

X

copying

Source

X

X

Destination

X

H--*2

Snap shot replication creation command

(swsrpmake)

uncopy

Source

O

O

Destination

O

O

O:executed
H:Indicates execution when the copy-destination volume is a shared volume in a cluster system (note, however, that no call is made to the copy-destination postprocessing script).
X:not executed

The postprocessing for the preprocessing executed in step (1) is executed in step (2).

The preprocessing and postprocessing for a file system can be customized. The processing is started in accordance with the table above when a replication management command is executed. For replication between servers, these scripts are executed by remote execution by TCP/IP in the preprocessing and postprocessing of a volume that is not connected.

The operation image before and after processing is shown in Figure C.1.

[Figure C.1 Synchronized replication processing]

If processing other than the standard preprocessing and postprocessing is required in the preprocessing and postprocessing, customize the scripts.

When customizing a script, strictly observe the following rules regarding error code:

Error code

Usage

0-99

Unusable (reserved for AdvancedCopy Manager)

100-255

Usable

AdvancedCopy Manager does not support preprocessing and postprocessing of databases other than Oracle, SQL Server, and Exchange databases. Database preprocessing and postprocessing must be executed uniquely before and after, respectively, execution of the AdvancedCopy Manager command.

C.2.2 Preprocessing when replication is executed 

The replication source volume (RepSrcPre.js) and the replication destination volume (RepDstPre.js) are prepared for a pretreatment script, and it is stored in the following directory subordinates. Please customize a script according to the necessity for processing.

In the case of non-cluster operation

<Environmental setting directory> \etc\repl\scripts directory subordinate

In the case of cluster operation

<Shared disk>:\etc\opt\swstorage\etc\repl\scripts directory subordinate

C.2.3 Postprocessing when replication is executed 

The replication source volume (RepSrcPost.js) and the replication destination volume (RepDstPost.js) are prepared for a post-processing script, and it is stored in the following directory subordinates. Please customize a script according to the necessity for processing.

In the case of non-cluster operation

<Environmental setting directory> \etc\repl\scripts directory subordinate

In the case of cluster operation

<Shared disk>:\etc\opt\swstorage\etc\repl\scripts directory subordinate

The volume is locked/unlocked, and the buffer is flushed by the command, not by the script. Therefore, the copy-source preprocessing and postprocessing scripts are executed, respectively, immediately before and after the copy-source/copy-destination volumes are locked/unlocked and the buffer is flushed. The copy-source/copy-destination preprocessing and postprocessing scripts essentially do not perform any processing.

[[Snapshot-type replication (OPC)]]

[ [Synchronous-type replication (EC) (1): When the copy-destination volume is not a shared volume in a cluster system]]

[[Synchronous-type replication (EC) (2): When the copy-destination volume is a shared volume in a cluster system]]

In the replication preprocessing for the copy-source volume and copy-destination volume, to avoid a temporary access contention with other applications, locking is retried if it cannot complete its operation. If the number of times locking is executed reaches the specified retry count, the command ends abnormally. If an abnormal end occurs, a process that is using the copy-source volume or copy-destination volume remains. Stop all applications and services involved or take other appropriate measures so that the volume cannot be used by another process. Although the retry count can be changed by creating volume locking specification files and re-setting the count (for details on the files, refer to "Copy source volume locking specification file", and "Copy-destination volume locking specification file", in this manual), the files do not need to be created if appropriate measures have been taken to prevent other processes from using the target volumes during replication processing execution.

For synchronous-type replication (EC) in which the copy-destination volume is a shared volume in a cluster system, to prevent the cluster system from being monitored, the copy-destination volume is locked only while the start replicating command is running and the create replication command is running (see the figure above). That is, the copy-destination volume remains unlocked from when the start replication command is executed to when the create replication command is executed. This may cause a message described in "About the message outputted to an event viewer", in this manual to be output to the event log, but since there is no problem, the message can be ignored.

C.2.4 Copy source volume locking specification file

If locking fails in copy source volume backup preprocessing, locking is retried to avoid a temporary access conflict with other applications. The standard retry operations are as follows:

The maximum number of retries (default value = 20 times) and retry interval (default value = 1 second) can be changed by creating a setting file called the copy source volume locking specification file. In this setting file, the following instructions can be specified for the copy source volume preprocessing:

C.2.4.1 Creating a copy source volume locking specification file 

Create a copy source volume locking specification file on the server that contains the copy source volume, naming it as follows:

File name

[In the case of non-cluster operation]

"environment-settings-directory\etc\repl\data\SRCLOCK.INI

[In the case of cluster operation]

<Shared disk>:\etc\opt\swstorage\etc\repl\data\SRCLOCK.INI


Examples of settings in the copy source volume locking specification file are listed below.

[g1d1p1]

BufferFlushOnly=off

LockForceMode=on

LockRetryNumber=10

LockRetryInterval=10

[g1d1p2]

BufferFlushOnly=on

[ANY]

BufferFlushOnly=off

LockForceMode=off

LockRetryNumber=20

LockRetryInterval=100

An explanation of how to create a copy source volume locking specification file is given below.

+SRCLOCK.INI parameter settings

Key

Explanation

BufferFlushOnly

Specifies flushing the file system buffer of the copy source volume instead of locking the copy source volume:

off (default value) = buffer is not flushed (locking)

on = buffer is flushed (no locking)

If the Xflush option is specified in swsrpmake or swsrpbackup_exchange and BufferFlushOnly=off, then the Xflush option has priority.

If BufferFlushOnly is set to on, all other parameters (LockForceMode, LockRetryNumber, and LockRetryInterval) become invalid.

Before on is set for this parameter, all write processing on the copy source volume must be stopped. (If a replica is created without the write processing stopped, then the copy source volume data is not guaranteed.)

LockForceMode

If locking of the copy source volume fails, locking is retried. This parameter specifies that the volume be dismounted before locking is retried.

off (default value) = no dismounting before locking is retried

on = dismounting before locking is retried

When the volume is dismounted, all handles opened for the volume become invalid.

* If the volume is set in the used state immediately after it is dismounted, then locking may be impossible.

If on is specified for BufferFlushOnly, then this parameter becomes invalid.

LockRetryNumber

If locking of the copy source volume fails, locking is retried. This parameter specifies the retry count. A numeric value ranging from 1 to 10000 can be specified.

The default value is 20 (times).

If the transaction volume cannot be locked after locking is retried for the specified retry count, then the processing is suspended and the command ends abnormally.

If on is specified for BufferFlushOnly, then this parameter becomes invalid.

LockRetryInterval

If locking of the copy source volume fails, locking is retried. This parameter specifies the retry interval (in milliseconds). A numeric value ranging from 1 to 600000 (10 minutes) can be specified. The default value is 1000 (1 second).

If on is specified for BufferFlushOnly, then this parameter becomes invalid.


C.2.5 Copy destination volume locking specification file 

If locking fails in copy destination volume backup preprocessing, locking is retried to avoid a temporary access conflict with other applications. The standard retry operations are as follows:

The maximum number of retries (default value = 20 times) and retry interval (default value = 1 second) can be changed by creating a setting file called the copy destination volume locking specification file. In this setting file, the following instructions can be specified for the copy destination volume preprocessing:

C.2.5.1 Creating a copy destination volume locking specification file 

Create a copy destination volume locking specification file on the server that contains the copy destination volume, naming it as follows:

File name

[For a non-cluster operation]

environment-setting-directory\etc\repl\data\DSTLOCK.INI

[For a cluster operation]

<shared-disk>:\etc\opt\swstorage\etc\repl\data\DSTLOCK.INI


Examples of settings in the copy destination volume locking specification file are listed below.

[g1d1p1]

LockForceMode=on

LockRetryNumber=10

LockRetryInterval=10

[ANY]

LockForceMode=off

LockRetryNumber=20

LockRetryInterval=100

An explanation of how to create a copy destination volume locking specification file is given below.

+DSTLOCK.INI parameter settings

Key

Explanation

LockForceMode

If locking of the copy destination volume fails, locking is retried. This parameter specifies that the volume be dismounted before locking is retried.

off (default value) = no dismounting before locking is retried

on = dismounting before locking is retried

When the volume is dismounted, all handles opened for the volume become invalid.

* If the volume is set in the used state immediately after it is dismounted, then locking may be impossible.

LockRetryNumber

If locking of the copy destination volume fails, locking is retried. This parameter specifies the retry count. A numeric value ranging from 1 to 10000 can be specified.

The default value is 20 (times).

If the transaction volume cannot be locked after locking is retried for the specified retry count, then the processing is suspended and the command ends abnormally.

LockRetryInterval

If locking of the copy destination volume fails, locking is retried. This parameter specifies the retry interval (in milliseconds). A numeric value ranging from 1 to 600000 (10 minutes) can be specified. The default value is 1000 (1 second).



Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2002-2006