Changing the file replication direction

If a target file system is written to during a disaster, and then becomes the primary site, the replication direction can be changed so that the old source file system can be made the new primary file system.

To change the replication direction

  1. Promote the last known good Storage Checkpoint on the target system. All changes after the last Storage Checkpoint are deleted.
    • Unmount the file system:

      # umount target_mntpt

      where target_mntpt is the mount point on the target system.

    • Promote the last good Storage Checkpoint as displayed by the vfradmin getjobckpt command:

      # /opt/VRTS/bin/fsckpt_restore device_file checkpoint_name

      For example:

      # /opt/VRTS/bin/fsckpt_restore /dev/vx/dsk/replicatedg/target2
      vxfsrepl_ckpt_877167997_12Sep11_14_59
    • Mount the file system:

      # mount -t vxfs device_name target_mntpt
    • Rename the Storage Checkpoint name to "filesystem_root" or any other name:

      # /opt/VRTS/bin/fsckptadm rename old_checkpoint_name
      new_checkpoint_name target_mntpt

      For example:

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

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

  2. Create a Storage Checkpoint with the same name as the Storage Checkpoint that was promoted in the previous step on the old source system:
    # /opt/VRTS/bin/fsckptadm create checkpoint_name target_mntpt

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

  3. Change the replication job mode on the old target system:
    # vfradmin setjobmode -s name mntpt

    where name is the name of the replication job you want to modify and 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 (or DNS names).

  4. Change the replication job mode on the old source system:
    # vfradmin setjobmode -t name mntpt

    where name is the name of the replication job you want to modify and mntpt is the mount point on the old source system.

    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 (or DNS names).

  5. Start the replication job on the old target system:
    # vfradmin startjob name mntpt

    where name is the name of the replication job you want to start and mntpt is the mount point of the old target system.