Disk Mirroring


Note


We recommend using the disk mirroring feature only on routers with route processors (RPs) or route switch processors (RSPs) that use hard disk drive (HDD); not on the ones with RPs or RSPs that use solid-state drive (SSD).


The Route Switch Processor (RSP) card has a primary storage device that is used to store installation packages and configuration files. This primary storage device is referred to as the primary boot device and is essential for booting the RSP and its normal operation.

Disk mirroring replicates the critical data on the primary boot device onto another storage device on the same RSP, henceforth referred to as the secondary device. If the primary boot device fails, applications continue to be serviced transparently by the secondary device, hence avoiding a switchover to the standby RSP. The failed primary storage device can be replaced or repaired without disruption of service.

Disk mirroring should only mirror critical data on the primary boot device onto a secondary storage device. Disk Mirroring shouldn’t mirror any noncritical data such as logging data.

Partitioning Disk Devices

To separate critical data from noncritical data, the disk devices need to be partitioned.

  • disk0 is partitioned to disk0: and disk0a:

  • disk1is partitioned to disk1: and disk1a:

Disk0: and disk1: are used for critical data whereas, disk0a: and disk1a: are used to store logging data and other noncritical data.

Disk Partition Size

Before you can configure disk mirroring on the RSP, you must have partitioned the secondary storage device. The sizes of disk partitions are related to the total disk size, and are provided in the following table.

Table 1. Size of Disk Partitions in Relation to Size of Disk
Size of Disk Primary Partition Percentage Secondary Partition Percentage

Less than 900 MB

Partitioning not supported

Partitioning not supported

900 MB to 1.5 GB

80%

20%

1.5 GB to 3 GB

60%

40%

More than 3 GB

50%

50%


Note


The primary partition on the secondary storage device must be large enough to contain all data on the primary boot device. This can be an issue if the primary boot device hasn’t yet been partitioned. For example, in the situation where both the primary boot device and the secondary storage device are 1 GB in size. The primary boot device contains 950 MB of data, and the secondary storage device is already partitioned to 800 MB in the primary partition and 200 MB in the secondary partition. In such cases, the 950 MB of data from the primary boot device doesn’t fit on the secondary storage device because of the partition. Such a configuration is rejected and an error is displayed. Replace the secondary storage device with a higher capacity device.


Configure Disk Mirroring

Procedure


Step 1

Before enabling disk mirroring, the following conditions must be met:

  • You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect a user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

  • The secondary storage device specified for the mirroring must be installed in the same node as the primary boot device. The supported storage devices are disk0: and disk1:

  • The secondary storage device must be the same size or larger than the designated primary storage device.

  • The secondary storage device must be partitioned.

If you don't partition the primary boot device, the following occurs:

  • The contents of the primary device are replicated to the secondary device.

  • Control of the mirroring server switches to the secondary storage device.

  • The primary device is partitioned.

  • Data is replicated back to the primary boot device.

Note

 

Although compactflash: can be used as the secondary device on a Performance Route Processor (PRP–2), there’s an issue with the ROM Monitor not being able to boot the minimum boot image (MBI) from the secondary device if the device isn’t disk0: or disk1:. In such a situation, you would need to go into ROMMON mode and boot the PRP-2 manually using the MBI on the compactflash:.

Step 2

Partition the secondary storage device into two partitions. If the device is already partitioned, then you do not need to perform the following configuration:

Router#format disk1: partition 

Step 3

Remove any noncritical data from the primary boot device. The primary boot device should contain installation packages and configuration files only. Log files can be copied to the a partition of the secondary device, for example disk1a:

Step 4

Enable disk mirroring of the primary device to the secondary device using the mirror command.

Router#configure 
Router(config)#mirror location 0/rsp0/cpu0 disk0:disk1: 

After disk mirroring is configured, if there’s a fault on the primary boot drive or it can’t be accessed for any reason, then control is automatically transferred to the secondary storage device.

Step 5

Verify disk mirroring is enabled for an RSP node or all locations using the show mirror location all command. This command also provides the status of the synchronization between the primary and secondary devices.

Router(admin)#show mirror location all

Mirror Information for 0/RSP0/CPU0.
========================================================
 Mirroring Enabled
   Configured Primary:         disk0:
   Configured Secondary:       disk1:

 Current Mirroring State:      Redundant
   Current Physical Primary:   disk0:
   Current Physical Secondary: disk1:

 Mirroring Logical Device:     disk0:
 Mirroring Logical Device2:    disk1:

 Physical Device     State       Flags
--------------------------------------------------------
  disk0:           Available     Enabled 
  disk1:           Available     Enabled 
  compactflash:    Available     
  (null)           Available     
  disk0a:          Available     
  disk1a:          Available     
  compactflasha:   Not Present   
  harddisk:        Available     

Mirroring Rommon Variable
 BOOT_DEV_SEQ_CONF = disk0:;disk1:
 BOOT_DEV_SEQ_OPER = disk0:;disk1:
 MIRROR_ENABLE = Y

Step 6

Verify that disk synchronization is enabled for disk mirroring using the mirror verify command.

Router#mirror verify
  
Mirror Verify Information for 0/0/CPU0.
========================================================
  Primary device and secondary device are fully synchronized.
   

Replace the Secondary Mirroring Device

The secondary disk mirroring device is typically replaced in any of the following scenarios:

  • The disk fails or becomes unreliable.

  • Upgrading to a larger or faster disk or expanding storage capacity.

  • During a hardware refresh cycle to ensure compatibility and leverage newer technology.

  • As part of a maintenance strategy or scheduled replacement.

  • When configuration changes require aligning with new requirements.

Procedure


Step 1

Verify the mirroring state. In the output, the current mirroring state must be redundant.

Router#show mirror

Step 2

Pause the Mirroring using the mirror pause command.

Router#mirror pause

Step 3

Verify that mirroring has paused using the show mirror command. In the output, the current mirroring State should be paused.

Router#show mirror

Step 4

Unmount the device using the unmount command.

Router#unmount disk1:

Step 5

Physically remove the device and insert a new device.

Step 6

Format the disk using the format command.

Router# format disk1: partition

Step 7

Verify that the device is formatted using the show media command. Then, resume the mirroring.

Router# show media

Step 8

Resume the mirroring using the mirror resume command.

Router# mirror resume

Step 9

Verify that the mirroring has restarted using the show mirror command. In the output, the current mirroring state should be syncing . It can take 15–30 minutes for the mirroring process to complete. The exact time depends on the number of packages or files on the boot device. When the mirroring is complete, the current mirroring state should be redundant.

Router# show mirror

Replace the Primary Mirroring Device

The secondary disk mirroring device is typically replaced in any of the following scenarios:

  • The disk fails or becomes unreliable.

  • Upgrading to a larger or faster disk or expanding storage capacity.

  • During a hardware refresh cycle to ensure compatibility and leverage newer technology.

  • As part of a maintenance strategy or scheduled replacement.

  • When configuration changes require aligning with new requirements.

Procedure


Step 1

Verify the mirroring state using the show mirror command. In the output, the current mirroring state must be redundant.

Router#show mirror

Step 2

Pause the mirroring using the mirror pause command.

Router#mirror pause

Step 3

Verify that mirroring has paused using the show mirror command. In the output, the current mirroring State should be paused.

Router#show mirror

Step 4

Unmount the device using the unmount command.

Router#unmount disk1:

Step 5

Physically remove the device and insert a new device.

Step 6

Format the disk using the format command.

Router#format disk1: partition

Step 7

Verify that the device is formatted using the show media command. Then, resume the mirroring.

Router#show media

Step 8

Resume the mirroring using the mirror resume command.

Router#mirror resume

Step 9

Verify that the mirroring has restarted using the show mirror command. In the output, the current mirroring state should be syncing . It can take 15–30 minutes for the mirroring process to complete. The exact time depends on the number of packages or files on the boot device. When the mirroring is complete, the current mirroring state should be redundant.

Router#show mirror