Top
ETERNUS SF AdvancedCopy Manager V16.8 Operation Guide
FUJITSU Storage

C.2.4 Customizing Shell Script

The method to customize the shell script for replication pre/post-processing is explained below.

When You Do Not Want to Unmount Replication Target Volume

For the mounted copy source volume that you do not want to unmount, customize the shell scripts using the editor.

The two methods for customizing the script are as follows:

Customization Method for Executing the "fsfreeze" Command for Copy Source Volume

This customization can be performed only if the OS is Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, or Red Hat Enterprise Linux 6. Modify the pre-processing script (RepSrc.pre) for Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, or Red Hat Enterprise Linux 6 as follows:

  • In the pre-processing script for the copy source volume (RepSrc.pre), delete the comment characters ("#") on lines 109 to 119, 123, and 172 and describe the target device name in the if-clause on line 109.

This customization is available only if the file system in which the copy source volume belongs is ext3, ext4, or XFS.

The pre-processing and post-processing of the copy source volume by the customized scripts is as follows.

Table C.3 Copy Source Volume Pre-processing and Post-processing by Customized Script

Copy Source Volume status

Copy Source Pre-processing

Copy Source Post-processing

It is mounted.

The file system is frozen and the updates for the copy source volume are suppressed.
All of data buffered in memory are written to disk.

The file system is unfrozen and the update suppression for the copy source volume is canceled.

The post-processing of the copy destination volume by the customized scripts is as follows.

Table C.4 Copy Destination Volume Post-processing by Customized Script

Copy Destination Post-processing

No action is done.

Customization Method for Executing the "sync" Command for Copy Source Volume

Perform this customization if the "fsfreeze" command cannot be executed for the copy source volume. Modify the pre-processing and post-processing scripts of each OS as follows.

  • Customization for the copy source volume that you do not want to unmount

    • For Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, or Red Hat Enterprise Linux 6 environments

      In the pre-processing script for the copy source volume (RepSrc.pre), delete the comment characters ("#") on lines 99 to 106, 123, and 172 and describe the target device name in the if-clause on line 99.

    • For SUSE Linux Enterprise Server 15 or SUSE Linux Enterprise Server 12 environments

      In the pre-processing script for the copy source volume (RepSrc.pre), delete the comment characters ("#") on lines 93 to 100, 104, and 152 and describe the target device name in the if-clause on line 93.

  • Customization for the copy destination volume corresponding to the copy source volume that you do not want to unmount

    • For Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 7, or Red Hat Enterprise Linux 6 environments

      In the post-processing script for the copy destination volume (RepDst.post), delete the comment characters ("#") on lines 106 to 136 and describe the target device name in the if-clause on line 106.

    • For SUSE Linux Enterprise Server 15 or SUSE Linux Enterprise Server 12 environments

      In the post-processing script for the copy destination volume (RepDst.post), delete the comment characters ("#") on lines 102 to 132 and describe the target device name in the if-clause on line 102.

When performing this customization, note the following points:

  • With the post-processing script for the copy destination volume, the "fsck" command is executed for the copy destination volume, and waits for completion.

  • Do not update the file system in which the copy source volume belongs during execution of the "sync" command of the pre-processing script for the copy source volume until post-processing is performed. If the file system is updated, the file system in which the copy destination volume belongs is in an incomplete state, or the "fsck" command response becomes slow for post-processing of the copy destination volume or may result in an error.

This customization is available only if the file system in which the copy source volume belongs is ext2, ext3, ext4, or XFS.

The pre-processing and post-processing of the copy source volume by the customized scripts is as follows.

Table C.5 Copy Source Volume Pre-processing and Post-processing by Customized Script

Copy Source Volume status

Copy Source Pre-processing

Copy Source Post-processing

It is mounted.

All of data buffered in memory are written to disk.

No action is done.

The post-processing of the copy destination volume by the customized scripts is as follows.

Table C.6 Copy Destination Volume Post-processing by Customized Script

Copy Destination Post-processing

The consistency of the copy destination volume is checked.