Changing the file replication direction when the VFR job is managed by VCS

The file replication job direction can be changed when both the source and the target systems are under VCS control, in two separate VCS clusters.

To change the replication direction when the VFR job is managed by VCS

  1. Offline the replication job on the source system:
    # hares -offline job_name -sys system_name

    where job_name is the name of the replication job you want to offline, and system_name is the name of the system on which the replication job is running.

  2. After the replication job is offline, disable the replication job by typing the following commands on the source system:
    # haconf -makerw
    # hares -modify job_name Enabled 0
    # haconf -dump -makero
  3. After disabling the replication job, get the last known good Storage Checkpoint on the target system:
    # vfradmin job get ckpt job_name mntpt

    where job_name is the name of the replication job for which you want to display the Storage Checkpoint, and mntpt is the mount point of the target system.

  4. Unmount the file system on the source system using the hares -offline command for the corresponding mount point.
    # hares -offline vcs_mntpt -sys system_name

    where vcs_mntpt is the VCS mount point resource name and system_name is the name of the system on which the replication job was running.

    For CFS mount points, execute the following command on the source node:

    # cfsumount mntpt

    Verify that the VCS resource is offlined before proceeding.

    Type the following command to wait for the resource to go offline after issuing the offline command:

    # hares -wait vcs_mntpt State OFFLINE -system_name
  5. Promote the last good Storage Checkpoint displayed in step 3 on the source system. All changes after the last Storage Checkpoint are deleted.
    # /opt/VRTS/bin/fsckpt_restore device_file checkpoint_name

    where device_file is the full path to the VxVM volume used by the file system. For example, /dev/vx/dsk/replicatedg/src_volume.

    For example:

    # /opt/VRTS/bin/fsckpt_restore /dev/vx/dsk/replicatedg/src_volume
    		vxfsrepl_ckpt_877167997_12Sep11_14_59
  6. Mount the file system on the source system.
    # hares -online vcs_mntpt -sys system_name

    For CFS mount points, execute the following command on all nodes that were previously offlined:

    # cfsmount mntpt
  7. Rename the Storage Checkpoint name on the source system:
    # /opt/VRTS/bin/fsckptadm rename checkpoint_name new_checkpoint_name
    src_mntpt

    For example:

    # /opt/VRTS/bin/fsckptadm rename 
    vxfsrepl_ckpt_877167997_12Sep11_14_59 filesystem_root /src_mntpt

    For more information, see the fsckpt_restore (1M) and fsckptadm (1M) manual pages.

  8. Create a Storage Checkpoint with the same name as the Storage Checkpoint that was promoted in step 5 on the source system:
    # /opt/VRTS/bin/fsckptadm create checkpoint_name
    			src_mntpt

    For more information, see thefsckptadm (1M) manual page.

  9. Repeat step 4 though step 8 on the target system with the target mount point.
  10. Change the replication job mode on the old target system:
    # vfradmin job set mode -s job_name tgt_mntpt

    where job_name is the name of the replication job you want to modify and tgt_mntpt is the mount point on the old target system.

    This command prepares the old target system to become the new source system for the replication job. The command swaps the source and the target file system names and swaps the source and the target IP addresses.

  11. Change the replication job mode on the old source system:
    # vfradmin job set mode -t job_name src_mntpt

    where job_name is the name of the replication job you want to modify and src_mntpt is the mount point on the old source system from where the file system was being replicated.

    This command prepares the old source system to become the new target system for the replication job. The command swaps the source and the target file system names and swaps the source and the target IP addresses.

  12. Enable the replication job on the new source system (the old target system) using the following commands:
    # haconf -makerw
    # hares -modify job_name Enabled 1
    # haconf -dump -makero
  13. Run the -probe option on the new source system (the old target system) to monitor the resource:
    # hares -probe job_name -sys src_mntpt
  14. Online the file replication job on the new source system (the old target system):
    # hares -online job_name -sys src_mntpt