You are here: Administration > Command Line Mirror Administration

Command Line Mirror Administration

In addition to performing actions through the LifeKeeper GUI, the mirror can also be administered using the command line. There are several commands (found in the $LKROOT/bin directory) that can be used to administer a DataKeeper resource.

Mirror Actions

mirror_action <tag> <action> <source> [target(s)]

<tag> is the LifeKeeper resource tag of the DataKeeper resource

<action> is one of: pause, resume, force, fullresync

<source> is the current source system

<target> is the target system (or list of systems) that the action should affect

Examples:

To pause the mirror named datarep-ext3 from source system, adam, to target system, eve:

mirror_action datarep-ext3 pause adam eve

To resume replication from adam to both eve and sophocles:

mirror_action datarep-ext3 resume adam eve sophocles

To force the mirror online on system eve:

mirror_action datarep-ext3 force eve

To resume replication and force a full resynchronization from adam to sophocles:

mirror_action datarep-ext3 fullresync adam sophocles

Mirror Settings

mirror_settings <tag> <setting> <value>

<tag> is the LifeKeeper resource tag of the DataKeeper resource

<setting> is one of: logdir, logmax, compress

<value> is the value to be set

Note: mirror_settings should be run on the target system(s) (or on all systems, if you want the settings to take effect regardless of which system becomes the mirror source). The mirror must be paused and restarted before any settings changes will take effect.

Examples:

To set the network compression level to 5:

mirror_settings datarep-ext3 compress 5

To disable network compression:

mirror_settings datarep-ext3 compress 0

To set the rewind logging directory (and enable rewind logging):

mirror_settings datarep-ext3 logdir /tmp/logs

To disable rewind logging:

mirror_settings datarep-ext3 logdir “”

To set the rewind log maximum size to 1GB:

mirror_settings datarep-ext3 logmax 1073741824

To disable the rewind log maximum size limit:

mirror_settings datarep-ext3 logmax 0

Bitmap Administration

bitmap -a <num>|-c|-d|-X <bitmap_file>

-a <num> adds the asynchronous write parameter to the bitmap file. It is needed if a synchronous mirror is upgraded to include an asynchronous target. The default value for <num> is 256.

-c  cleans the bitmap file (zeroes all the bits). This can be used to avoid a full resync in case an exact replica of the source disk exists on the target. Use this option with extreme caution.

-d  dirties the bitmap file (sets all the bits to ones). This option can be used to force a full resync, for example after a split-brain situation has occurred.

-X<bitmap file> examines the bitmap file and displays useful information about the bitmap and the mirror.

In addition, the mdadm command may also be used to administer a DataKeeper resource, as the DataKeeper resource is actually an md device. Refer to the mdadm(8) man page for details. Note: When using mdadm, be sure to use the version that is located in $LKROOT/bin, as it is more up-to-date than the version included with the operating system.

© 2012 SIOS Technology Corp., the industry's leading provider of business continuity solutions, data replication for continuous data protection.