ETERNUS SF AdvancedCopy Manager Operator's Guide 13.0 -Microsoft(R) Windows(R) 2000- -Microsoft(R) Windows Server(TM) 2003- |
Contents
Index
![]() ![]() |
The replication preprocessing and postprocessing are performed before and after replication.
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.
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.
Preprocessing and postprocessing for a replication source volume
The purpose of the processing is to freeze the replication source data in a state in which consistency is temporarily ensured. Replication source data is frozen temporarily in preprocessing, and after the replication has been created, the frozen status is released in postprocessing.
Preprocessing and postprocessing for a replication destination volume
This is intended to prevent applications from accessing the copy destination volume during replication. The copy destination data is set to the access disabled status during the preprocessing. After a replica is created, dismount processing is executed and the access disabled status is cancelled during postprocessing.
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.
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.
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.
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.
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
RepSrcPre.js(replication source volume preprocessing sample script)
1: // AdvancedCopy Manager for Windows 2: // All Rights Reserved, Copyright FUJITSU LIMITED, 2002-2006 3: // 4: // RepSrcPre.js: Pre-Processing Script for Replication(Source) 5: // 6: // [Parameters] 7: // 1st argument: device name of source volume 8: // 9: // [Return Values] 10: // 0: The script ended normally. 11: // 2: The number of the arguments is incorrect. 12: // (1,3): unused, but must not be used because older versions use this value. 13: // 4: An error other than the above occurred. 14: 15: try { 16: // create global objects 17: var WshShell = WScript.CreateObject("WScript.Shell"); // create Shell object 18: var WshEnv = WshShell.Environment("PROCESS"); // create Environment object 19: var fsObj = WScript.CreateObject("Scripting.FileSystemObject"); // create FileSystemObject object 20: 21: // create SwstReplicationPreProc object 22: var proc = new SwstReplicationPreProc(); 23: 24: // there is nothing to do if the pre/post-processing is not customized 25: proc.doNothingForDriveLetter(); 26: 27: SwstQuit(0); 28: } catch (e) { 29: SwstQuit(9); 30: } 31: 32: function SwstReplicationPreProc() 33: { 34: // member variables 35: this.svName = WScript.Arguments.length!=1?SwstQuit(1):WScript.Arguments.Item(0); // device name of source volume 36: this.postFileName = getDataPathName() + "\\" + getPutFileName(this.svName) + ".spre"; // name of postprocessing file 37: 38: // member functions 39: this.doNothingForDriveLetter = doNothingForDriveLetter; // self-explanatory 40: this.writePostFile = writePostFile; // self-explanatory 41: } 42: 43: function doNothingForDriveLetter() 44: { 45: this.writePostFile(this.postFileName, "none"); 46: } 47: 48: function writePostFile(postfile, postdata) 49: { 50: var overwrite = true; // means to overwrite a file if it exists. 51: var postFileStream = fsObj.CreateTextFile(postfile, overwrite); 52: postFileStream.WriteLine(postdata); 53: postFileStream.Close(); 54: } 55: 56: function SwstQuit(exitStatus) 57: { 58: switch(exitStatus) { 59: case 0: 60: WScript.Quit(0); 61: case 1: 62: WScript.Echo("[Replication Preprocessing] The number of the arguments is incorrect."); 63: WScript.Quit(2); 64: default: 65: WScript.Echo("[Replication Preprocessing] The script exited abnormally."); 66: WScript.Quit(4); 67: } 68: } 69: 70: function getDataPathName() 71: { 72: return WshShell.RegRead(getSetupInfoKey() + "\\etcPathName") + "\\etc\\repl\\data\\DEFAULT"; 73: } 74: 75: function getBinPathName() 76: { 77: return WshShell.RegRead(getSetupInfoKey() + "\\PathName") + "\\bin"; 78: } 79: 80: function getSetupInfoKey() 81: { 82: var nodeName = WshEnv.Item("SWSTGNODE"); 83: if( nodeName != "" ){ 84: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion\\" + nodeName; 85: } 86: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion"; 87: } 88: 89: function getPutFileName(deviceName){ 90: var fileName; 91: if( isSafeDISKName(deviceName) ){ 92: var re = /(\S+)\/(\S+):(\S+)/; 93: fileName = deviceName.replace(re, "$1_$2_$3"); 94: }else{ 95: fileName = deviceName; 96: } 97: return(fileName); 98: } 99: 100: function getGXDXPX(deviceName){ 101: var gXdXpX; 102: if( isSafeDISKName(deviceName) ){ 103: var re = /(\S+)\/(\S+):(\S+)/; 104: gXdXpX = deviceName.replace(re, "$3"); 105: }else{ 106: gXdXpX = deviceName; 107: } 108: return(gXdXpX); 109: } 110: 111: function isSafeDISKName(deviceName){ 112: var key = ":g"; 113: var s = deviceName.indexOf(key); 114: if ( s < 0 ) { 115: return (false); 116: } else { 117: return (true); 118: } 119: } |
RepDstPre.js(replication destination volume preprocessing sample script)
1: // AdvancedCopy Manager for Windows 2: // All Rights Reserved, Copyright FUJITSU LIMITED, 2002-2006 3: // 4: // RepDstPre.js: Pre-Processing Script for Replication(Destination) 5: // 6: // [Parameters] 7: // 1st argument: device name of destination volume 8: // 9: // [Return Values] 10: // 0: The script ended normally. 11: // 2: The number of the arguments is incorrect. 12: // (1,3): unused, but must not be used because older versions use these values. 13: // 4: An error other than the above occurred. 14: 15: try { 16: // create global objects 17: var WshShell = WScript.CreateObject("WScript.Shell"); // create Shell object 18: var WshEnv = WshShell.Environment("PROCESS"); // create Environment object 19: var fsObj = WScript.CreateObject("Scripting.FileSystemObject"); // create FileSystemObject object 20: 21: // create SwstReplicationPreProc object 22: var proc = new SwstReplicationPreProc(); 23: 24: // there is nothing to do if the pre/post-processing is not customized 25: proc.doNothingForDriveLetter(); 26: 27: SwstQuit(0); 28: } catch (e) { 29: SwstQuit(9); 30: } 31: 32: function SwstReplicationPreProc() 33: { 34: // member variables 35: this.dvName = WScript.Arguments.length!=1?SwstQuit(1):WScript.Arguments.Item(0); // device name of destination volume 36: this.postFileName = getDataPathName() + "\\" + getPutFileName(this.dvName) + ".dpre"; // name of postprocessing file 37: 38: // member functions 39: this.doNothingForDriveLetter = doNothingForDriveLetter; // self-explanatory 40: this.writePostFile = writePostFile; // self-explanatory 41: } 42: 43: function doNothingForDriveLetter() 44: { 45: this.writePostFile(this.postFileName, "none"); 46: } 47: 48: function writePostFile(postfile, postdata) 49: { 50: var overwrite = true; // means to overwrite a file if it exists. 51: var postFileStream = fsObj.CreateTextFile(postfile, overwrite); 52: postFileStream.WriteLine(postdata); 53: postFileStream.Close(); 54: } 55: 56: function SwstQuit(exitStatus) 57: { 58: switch(exitStatus) { 59: case 0: 60: WScript.Quit(0); 61: case 1: 62: WScript.Echo("[Replication Preprocessing] The number of the arguments is incorrect."); 63: WScript.Quit(2); 64: default: 65: WScript.Echo("[Replication Preprocessing] The script exited abnormally."); 66: WScript.Quit(4); 67: } 68: } 69: 70: function getDataPathName() 71: { 72: return WshShell.RegRead(getSetupInfoKey() + "\\etcPathName") + "\\etc\\repl\\data\\DEFAULT"; 73: } 74: 75: function getBinPathName() 76: { 77: return WshShell.RegRead(getSetupInfoKey() + "\\PathName") + "\\bin"; 78: } 79: 80: function getSetupInfoKey() 81: { 82: var nodeName = WshEnv.Item("SWSTGNODE"); 83: if( nodeName != "" ){ 84: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion\\" + nodeName; 85: } 86: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion"; 87: } 88: 89: function getPutFileName(deviceName){ 90: var fileName; 91: if( isSafeDISKName(deviceName) ){ 92: var re = /(\S+)\/(\S+):(\S+)/; 93: fileName = deviceName.replace(re, "$1_$2_$3"); 94: }else{ 95: fileName = deviceName; 96: } 97: return(fileName); 98: } 99: 100: function getGXDXPX(deviceName){ 101: var gXdXpX; 102: if( isSafeDISKName(deviceName) ){ 103: var re = /(\S+)\/(\S+):(\S+)/; 104: gXdXpX = deviceName.replace(re, "$3"); 105: }else{ 106: gXdXpX = deviceName; 107: } 108: return(gXdXpX); 109: } 110: 111: function isSafeDISKName(deviceName){ 112: var key = ":g"; 113: var s = deviceName.indexOf(key); 114: if ( s < 0 ) { 115: return (false); 116: } else { 117: return (true); 118: } 119: } |
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
RepSrcPost.js(replication source volume postprocessing sample script)
1: // AdvancedCopy Manager for Windows 2: // All Rights Reserved, Copyright FUJITSU LIMITED, 2002-2006 3: // 4: // RepSrcPost.js: Post-Processing Script for Replication(Source) 5: // 6: // [Parameters] 7: // 1st argument: device name of source volume 8: // 9: // [Return Values] 10: // 0: The script ended normally. 11: // 2: The number of the arguments is incorrect. 12: // (1,3): unused, but must not be used because older versions use this value. 13: // 4: An error other than the above occurred. 14: 15: try { 16: // create global objects 17: var WshShell = WScript.CreateObject("WScript.Shell"); // create Shell object 18: var WshEnv = WshShell.Environment("PROCESS"); // create Environment object 19: var fsObj = WScript.CreateObject("Scripting.FileSystemObject"); // create FileSystemObject object 20: 21: // create SwstReplicationPostProc object 22: var proc = new SwstReplicationPostProc(); 23: 24: // do nothing if postprocessing file exists 25: if (fsObj.FileExists(proc.postFileName) == false) { 26: SwstQuit(0); 27: } 28: 29: // get postprocessing type 30: var postProcType = proc.getPostProcData(proc.postFileName); 31: switch(postProcType) { 32: case "none": 33: proc.doNothing(); 34: break; 35: } 36: 37: // clear temporary files 38: proc.deletePostFile(proc.postFileName); 39: SwstQuit(0); 40: } catch (e) { 41: SwstQuit(9); 42: } 43: 44: function SwstReplicationPostProc() 45: { 46: // member variables 47: this.svName = WScript.Arguments.length!=1?SwstQuit(1):WScript.Arguments.Item(0); // device name of source volume 48: this.postFileName = getDataPathName() + "\\" + getPutFileName(this.svName) + ".spre"; // name of postprocessing file 49: 50: // member functions 51: this.getPostProcData = getPostProcData; // self-explanatory 52: this.doNothing = doNothing; // self-explanatory 53: this.deletePostFile = deletePostFile; // self-explanatory 54: } 55: 56: function getPostProcData(postfile) 57: { 58: var iomode = 1; // means read-only mode 59: var create = false; // means not to create a file 60: var postFileStream = fsObj.OpenTextFile(postfile, iomode, create); 61: var postData = postFileStream.ReadLine(); 62: postFileStream.Close(); 63: return postData; 64: } 65: 66: function doNothing() 67: { 68: // do nothing 69: } 70: 71: function deletePostFile(postfile) 72: { 73: if (fsObj.FileExists(postfile) == true) { 74: fsObj.DeleteFile(postfile); 75: } 76: } 77: 78: function SwstQuit(exitStatus) 79: { 80: switch(exitStatus) { 81: case 0: 82: WScript.Quit(0); 83: case 1: 84: WScript.Echo("[Replication Postprocessing] The number of the arguments is incorrect."); 85: WScript.Quit(2); 86: default: 87: WScript.Echo("[Replication Postprocessing] The script exited abnormally."); 88: WScript.Quit(4); 89: } 90: } 91: 92: function getDataPathName() 93: { 94: return WshShell.RegRead(getSetupInfoKey() + "\\etcPathName") + "\\etc\\repl\\data\\DEFAULT"; 95: } 96: 97: function getBinPathName() 98: { 99: return WshShell.RegRead(getSetupInfoKey() + "\\PathName") + "\\bin"; 100: } 101: 102: function getSetupInfoKey() 103: { 104: var nodeName = WshEnv.Item("SWSTGNODE"); 105: if( nodeName != "" ){ 106: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion\\" + nodeName; 107: } 108: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion"; 109: } 110: 111: function getPutFileName(deviceName){ 112: var fileName; 113: if( isSafeDISKName(deviceName) ){ 114: var re = /(\S+)\/(\S+):(\S+)/; 115: fileName = deviceName.replace(re, "$1_$2_$3"); 116: }else{ 117: fileName = deviceName; 118: } 119: return(fileName); 120: } 121: 122: function getGXDXPX(deviceName){ 123: var gXdXpX; 124: if( isSafeDISKName(deviceName) ){ 125: var re = /(\S+)\/(\S+):(\S+)/; 126: gXdXpX = deviceName.replace(re, "$3"); 127: }else{ 128: gXdXpX = deviceName; 129: } 130: return(gXdXpX); 131: } 132: 133: function isSafeDISKName(deviceName){ 134: var key = ":g"; 135: var s = deviceName.indexOf(key); 136: if ( s < 0 ) { 137: return (false); 138: } else { 139: return (true); 140: } 141: } |
RepDstPost.js(replication destination volume postprocessing sample script)
1: // AdvancedCopy Manager for Windows 2: // All Rights Reserved, Copyright FUJITSU LIMITED, 2002-2006 3: // 4: // RepDstPost.js: Post-Processing Script for Replication(Destination) 5: // 6: // [Parameters] 7: // 1st argument: device name of destination volume 8: // 9: // [Return Values] 10: // 0: The script ended normally. 11: // 2: The number of the arguments is incorrect. 12: // (1,3,5-7): unused, but must not be used because older versions use these values. 13: // 4: An error other than the above occurred. 14: 15: try { 16: // create global objects 17: var WshShell = WScript.CreateObject("WScript.Shell"); // create Shell object 18: var WshEnv = WshShell.Environment("PROCESS"); // create Environment object 19: var fsObj = WScript.CreateObject("Scripting.FileSystemObject"); // create FileSystemObject object 20: 21: // create SwstReplicationPostProc object 22: var proc = new SwstReplicationPostProc(); 23: 24: // do nothing if postprocessing file exists 25: if (fsObj.FileExists(proc.postFileName) == false) { 26: SwstQuit(0); 27: } 28: 29: // get postprocessing type 30: var postProcType = proc.getPostProcData(proc.postFileName); 31: switch(postProcType) { 32: case "none": 33: proc.doNothing(); 34: break; 35: } 36: 37: // clear temporary files 38: proc.deletePostFile(proc.postFileName); 39: SwstQuit(0); 40: } catch (e) { 41: SwstQuit(9); 42: } 43: 44: function SwstReplicationPostProc() 45: { 46: // member variables 47: this.dvName = WScript.Arguments.length!=1?SwstQuit(1):WScript.Arguments.Item(0); // device name of destination volume 48: this.postFileName = getDataPathName() + "\\" + getPutFileName(this.dvName) + ".dpre"; // name of postprocessing file 49: 50: // member functions 51: this.getPostProcData = getPostProcData; // self-explanatory 52: this.doNothing = doNothing; // self-explanatory 53: this.deletePostFile = deletePostFile; // self-explanatory 54: } 55: 56: function getPostProcData(postfile) 57: { 58: var iomode = 1; // means read-only mode 59: var create = false; // means not to create a file 60: var postFileStream = fsObj.OpenTextFile(postfile, iomode, create); 61: var postData = postFileStream.ReadLine(); 62: postFileStream.Close(); 63: return postData; 64: } 65: 66: function doNothing() 67: { 68: // do nothing 69: } 70: 71: function deletePostFile(postfile) 72: { 73: if (fsObj.FileExists(postfile) == true) { 74: fsObj.DeleteFile(postfile); 75: } 76: } 77: 78: function SwstQuit(exitStatus) 79: { 80: switch(exitStatus) { 81: case 0: 82: WScript.Quit(0); 83: case 1: 84: WScript.Echo("[Replication Postprocessing] The number of the arguments is incorrect."); 85: WScript.Quit(2); 86: default: 87: WScript.Echo("[Replication Postprocessing] The script exited abnormally."); 88: WScript.Quit(4); 89: } 90: } 91: 92: function getDataPathName() 93: { 94: return WshShell.RegRead(getSetupInfoKey() + "\\etcPathName") + "\\etc\\repl\\data\\DEFAULT"; 95: } 96: 97: function getBinPathName() 98: { 99: return WshShell.RegRead(getSetupInfoKey() + "\\PathName") + "\\bin"; 100: } 101: 102: function getSetupInfoKey() 103: { 104: var nodeName = WshEnv.Item("SWSTGNODE"); 105: if( nodeName != "" ){ 106: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion\\" + nodeName; 107: } 108: return "HKEY_LOCAL_MACHINE\\SOFTWARE\\Fujitsu\\AdvancedCopy Manager\\CurrentVersion"; 109: } 110: 111: function getPutFileName(deviceName){ 112: var fileName; 113: if( isSafeDISKName(deviceName) ){ 114: var re = /(\S+)\/(\S+):(\S+)/; 115: fileName = deviceName.replace(re, "$1_$2_$3"); 116: }else{ 117: fileName = deviceName; 118: } 119: return(fileName); 120: } 121: 122: function getGXDXPX(deviceName){ 123: var gXdXpX; 124: if( isSafeDISKName(deviceName) ){ 125: var re = /(\S+)\/(\S+):(\S+)/; 126: gXdXpX = deviceName.replace(re, "$3"); 127: }else{ 128: gXdXpX = deviceName; 129: } 130: return(gXdXpX); 131: } 132: 133: function isSafeDISKName(deviceName){ 134: var key = ":g"; 135: var s = deviceName.indexOf(key); 136: if ( s < 0 ) { 137: return (false); 138: } else { 139: return (true); 140: } 141: } |
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.
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.
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:
Locking is retried one second after locking fails.
If locking is not successful after 20 retries (a total of 21 times including the first locking attempt), then the processing is stopped and the command ends abnormally.
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:
Making invalid all file handles in the volume before locking is retried (forcible locking function)
Flushing the file system buffer instead of locking/unlocking during the copy source preprocessing (function equivalent to the Xflush option)
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.
Create a section for the volume whose locking operation is to be changed and code parameters (in the above example, the g1d1p1 and g1d1p2 sections are created). The four parameters listed in the table below may be changed. All of these four parameters need not be coded. Code only the parameters that you want to change. The default value is used for the parameters that are not coded.
To change the default locking operation, create a section called "ANY" and code parameters. This enables the locking operation to be changed for all volumes except the volumes explicitly coded in the copy source volume locking specification file (in the above example, the locking of all volumes except g1d1p1 and g1d1p2 depends on the value in the "ANY" section).
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. |
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:
Locking is retried one second after locking fails.
If locking is not successful after 20 retries (a total of 21 times including the first locking attempt), then the processing is stopped and the command ends abnormally.
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:
Making invalid all file handles in the volume before locking is retried (forcible locking function)
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.
Create a section for the volume whose locking operation is to be changed and code parameters (in the above example, the g1d1p1 and g1d1p2 sections are created). The four parameters listed in the table below may be changed. All of these four parameters need not be coded. Code only the parameters that you want to change. The default value is used for the parameters that are not coded.
To change the default locking operation, create a section called "ANY" and code parameters. This enables the locking operation to be changed for all volumes except the volumes explicitly coded in the copy source volume locking specification file (in the above example, the locking of all volumes except g1d1p1 and g1d1p2 depends on the value in the "ANY" section).
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
![]() ![]() |