Activating mirroring

Use the mirror_activate command to activate mirroring for a defined mirror coupling.

mirror_activate < vol=VolName | cg=cgName > [ target=TargetName ]

Parameters

Name Type Description Mandatory Default
vol Object name Master volume. N N/A
cg Object name Master CG name or a list of master CGs. N N/A
target Object name Target name of the mirror, mandatory if there are two mirrors defined on the volume. N [none]

This command activates the coupling - either volumes or consistency groups - and switches it to active state.

Requirements for a successful command completion:

  • The specified target must exist
  • The specified target must be mirrored
  • The specified target is a volume that does not belong to a consistency group
  • The specified target is not a master
  • A standby state was explicitly set by issuing the mirror_deactivate command on the same peer
Note:

If the new activation state is the same as the existing state, nothing is done and a success code is returned.

The mirroring can't be activated:
  • If the time stamps of the last_replicated snapshots on the master and the slave do not match.
  • If the command is issued on a master that did not receive acknowledgment from the slave following a cg_add_volume - or - cg_remove_volume command (until that command timed out or due to any unexpected failure), the command will fail and a new completion code will be returned (MIRROR_CONS_GROUP_MEMBERSHIP_MISMATCH - meaning that the member lists of the mirror consistency group peers are not the same).
  • If the command is issued on a master that did not receive acknowledgment from the slave following a vol_resize command (until that command timed out or due to any unexpected failure), the command will fail and a new completion code will be returned (MIRROR_SIZE_MISMATCH - meaning that the sizes of the mirror volume peers are not the same).

Access control

User Category Permission
Storage administrator Allowed
Application administrator Allowed
Security administrator Disallowed
Read-only users Disallowed
Operations administrator Disallowed
Host side accelerator client Disallowed

Return codes

  • VOLUME_BAD_NAME

    Volume name does not exist.

  • VOLUME_NO_MIRROR

    Local volume does not have remote mirroring definitions.

  • CONS_GROUP_BAD_NAME

    Consistency group name does not exist.

  • CONS_GROUP_NO_MIRROR

    Local consistency group does not have remote mirroring definitions.

  • LOCAL_PEER_IS_NOT_MASTER

    Local peer is not the master.

  • MIRROR_CONFIGURATION_ERROR

    Mirror local configuration does not match remote configuration.

  • REMOTE_MAX_VOLUMES_REACHED

    Maximum number of volumes is already defined on remote machine.

  • SYNC_ALREADY_ACTIVE

    Synchronization is already active.

  • VOLUME_BELONGS_TO_MIRRORED_CONS_GROUP

    Volume mirror is part of consistency group mirror.

  • MIRROR_CAN_NOT_BE_ACTIVATED

    Mirroring cannot be activated.

  • MIRROR_CONS_GROUP_MEMBERSHIP_MISMATCH

    Mirrored CG contains different volumes on master and slave. This problem occurs whenever the cg_add_vol or cg_remove_vol commands were previously issued and the master did not receive an acknowledgment from the slave until the command timed out, or any other unexpected failure.

  • MIRROR_SIZE_MISMATCH

    Slave volume and master volume sizes are different.

  • MIRROR_RETRY_OPERATION

    There is an operation in progress on this mirror, try again your request in a few seconds.

    Troubleshooting: Try again the command in a few seconds.

  • VOLUME_HAS_MULTIPLE_MIRRORS

    Volume has multiple mirrors, operation not allowed or target must be specified.

  • TARGET_BAD_NAME

    Target name does not exist.

  • VOLUME_TARGET_MISMATCH

    Volume and target do not match.

  • CONS_GROUP_BAD_TARGET

    Target name does not match the consistency group.

  • VOLUME_TOO_MANY_ACTIVE_MIRRORS

    This command cannot be used if more than one mirror is active on the volume.

  • REMOTE_MIRROR_IS_STANDBY

    Remote mirror is marked as standby.

  • REMOTE_DOMAIN_MAX_VOLUMES_REACHED

    Maximum number of volumes is already defined on remote machine domain.

  • MIRROR_IS_STANDBY

    Mirror is marked as standby.