Disk Mirroring Commands

mirror

To configure disk mirroring on a node, use the mirror command in global configuration mode. To disable disk mirroring, use the no form of this command.

mirror location [preconfigure] node-id primary-device:secondary-device:

no mirror location

Syntax Description

location node-id

Specifies the node of the RP. It can be a node that is not yet installed if the preconfigure keyword is used. The node-id argument is entered in the rack/ slot/ module notation.

preconfigure

(Optional) Enables you to specify a node that is not yet installed.

primary-device :

Specifies the primary boot device used to store installation packages and configuration files. Supported devices are:

  • disk0:

  • disk1: (if installed)

  • compactflash: (if installed)

secondary-device :

Storage device on the same RP as the primary-device , to where critical data is replicated. Supported devices are the same as for primary-device : , but secondary-device : must be different than the primary-device : .

Command Default

None

Command Modes

Global configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The mirror command replicates all critical data contained in the primary partition of the primary boot device, onto a second storage device on the same RSP. Therefore, if the primary boot device fails, applications continue to be serviced transparently by the secondary device, without having to switch control to a standby RSP.

Before the mirror command can be used, the secondary storage device must be partitioned using the format command. If the primary boot device is not partitioned, once mirroring is enabled and all data on the primary boot device is replicated to the secondary device, the primary boot device is partitioned automatically. This guarantees that only critical data on the primary boot device is mirrored to the secondary device. Noncritical data, such as logging data, should not be mirrored and should, therefore, be saved to the secondary partition on the storage device.

To temporarily suspend disk mirroring without changing the configuration, use the mirror pause command in EXEC mode.

Task ID

Task ID

Operations

root-lr

read, write

Examples

The following example shows how to configure disk mirroring from the primary boot device (disk0:) to the secondary storage device (disk1:):

RP/0/RSP0/CPU0:(config)# mirror location 0/rp0/cpu0 disk0: disk1:
  

mirror resume

To resume disk mirroring on a node after it has been temporarily stopped, use the mirror resume command in EXEC or administration EXEC mode.

mirror resume [location {node-id | all}]

Syntax Description

location {node-id | all}

(Optional) Specifies the node of the RSP. The node-id argument is entered in the rack/ slot/ module notation. The all keyword specifies all RSP nodes.

Command Modes

EXEC

Administration EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The mirror resume command resumes the mirroring of the primary boot device after it has been temporarily paused with the mirror pause command.

The mirror resume command has no affect if the mirror configuration command is not enabled and the mirror pause command has not been used.

Task ID

Task ID

Operations

root-lr

read, write

Examples

The following example shows how to resume disk mirroring on the active RSP:


RP/0/RSP0/CPU0:router# mirror resume
  

mirror verify

To verify disk synchronization for disk mirroring on a node, use the mirror verify command in EXEC or administration EXEC mode.

mirror verify [location node-id]

Syntax Description

location node-id

(Optional) Specifies the node of the RSP. The node-id argument is entered in the rack/ slot/ module notation.

Command Default

If no node is specified, the verification is done on the active RSP.

Command Modes

EXEC

Administration EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The mirror verify command verifies the synchronization consistency between the primary and secondary media devices being used in mirroring. The command verifies that the full contents are identical between the mirrored devices and reports any inconsistencies found.

Task ID

Task ID

Operations

root-lr

read, write

Examples

The following example shows how to verify the disk mirroring on the active RSP:


RP/0/RSP0/CPU0:router# mirror verify
  
  
  
  Mirror Verify Information for 0/RSP0/CPU0.
  ========================================================
  Primary device and secondary device are fully synchronized.
  

mirror pause

To temporarily pause disk mirroring on a node, use the mirror pause command in EXEC or administration EXEC mode.

mirror pause [location {node-id | all}]

Syntax Description

location {node-id | all}

(Optional) Specifies the node of the RSP. The node-id argument is entered in the rack/ slot/ module notation. The all keyword specifies all RSP nodes.

Command Default

If no node is specified, disk mirroring is paused on the active RSP.

Command Modes

EXEC

Administration EXEC

Command History

Release

Modification

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The mirror pause command temporarily pauses the mirroring of the primary boot device. This command is primarily useful during an installation operation to prevent significant performance degradation on single CPU boards. The mirror pause command does not change the configured state of mirroring, but rather causes the mirroring to be suspended until the mirror resume command is used.

The mirror pause command has no affect if the mirror configuration command is not enabled.

Task ID

Task ID

Operations

root-lr

read, write

Examples

The following example shows how to pause disk mirroring on the active RSP:


RP/0/RSP0/CPU0:# mirror pause 

show mirror

To display disk mirroring information, use the show mirror command in EXEC or administration EXEC mode.

show mirror [location {node-id | all}]

Syntax Description

location {node-id | all}

(Optional) Specifies the node of the RSP for which to display the mirroring information. The node-id argument is entered in the rack/ slot/ module notation. The all keyword specifies all RSP nodes.

Command Default

No default behavior or values

Command Modes

EXEC

Administration EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

filesystem

read

Examples

The following is sample output from the show mirror command:


RP/0/RSP0/CPU0:router# show mirror 
  
  
  
  Mirror Information for 0/RSP0/CPU0.
  ========================================================
   Mirroring Enabled
     Configured Primary:         disk0:
     Configured Secondary:       disk1:
  
   Current Mirroring State:      Syncing Files
     Current Physical Primary:   disk1:
     Current Physical Secondary: disk0:
  
   Mirroring Logical Device:     disk0:
  
   Physical Device     State       Flags
  --------------------------------------------------------
    disk0:           Available     Enabled Formatted 
    disk1:           Available     Enabled Formatted 
    compactflash:    Not Present   
    disk0a:          Available     Formatted 
    disk1a:          Available     Formatted 
    compactflasha:   Not Present   
  
  Mirroring Rommon Variable
   BOOT_DEV_SEQ_CONF = disk0:;disk1:
   BOOT_DEV_SEQ_OPER = disk1:
   MIRROR_ENABLE = Y
   
Table 1. show mirror Field Descriptions

Field

Description

Mirroring Enabled

Indicates whether mirroring is enabled or disabled.

Configured Primary

If mirroring is enabled, the configured primary disk for mirroring.

Configured Secondary

If mirroring is enabled, the configured secondary disk for mirroring.

Current Mirroring State

Current status of mirroring. Possible values are as follows:

Syncing files—Files are being synchronized between the primary and secondary disks.

Not Configured—Mirroring is not configured.

Mirroring Paused—In this state, no mirroring is being done to the secondary device and the disk redundancy has been removed. The values of the BOOT_DEV_SEQ_OPER and MIRROR_ENABLE variables reflect this.

Redundant—The primary and secondary disks are totally in synchronization. Any read or write failure on the primary device results in disk redundancy switchover such that all operations are performed on the secondary device.

Current Physical Primary

Current primary disk.

Current Physical Secondary

Current secondary disk.

Mirroring Logical Device

Device name used by the mirroring process to intercept all application requests to that named device before passing them through to one of the mirrored physical devices.

Physical Device

Physical disk in router.

State

Status of the disk. Possible values are as follows:

Available—Disk exists in router and is available.

Not present—Disk does not exist in router. Partitioning of disks is available only after the disk has been formatted with the partition keyword.

Flags

Enabled—Disk mirroring has been enabled on this device and the device is part of the mirroring process.

Repaired—During the boot, some minor inconsistencies were discovered on the disk and were repaired to make the file system consistent.

Formatted—Disk was formatted before mirroring was enabled.

BOOT_DEV_SEQ_CONF=

ROM Monitor environmental variable for the boot disk sequence. This variable is is set when mirroring is enabled through the mirror configuration command. The devices in this ROMMON variable declare the primary and the secondary devices of the mirroring process. The first device is the primary device and the second device is the secondary device in the mirroring process.

Note

 

This variable is also shared by the disk backup feature. This variable can also be set or unset using the system boot-sequence command of the disk backup feature. But the use of system boot-sequence and system backup commands is blocked, if mirroring is enabled.

BOOT_DEV_SEQ_OPER=

ROM Monitor environmental variable that reflects the state of the disk redundancy status. When mirroring is enabled and the state is redundant, this variable is set to the primary device followed by the secondary device. When mirroring is not in the redundancy state, then this variable is updated to contain only the primary device.

MIRROR_ENABLE

ROM Monitor environmental variable whose value reflects the mirroring status. If it is set to Y, then mirroring is enabled. If it is set to P, then mirroring is paused. If empty, mirroring is not enabled.