[Contents] [Prev] [Next] [Index] [Report an Error]


Managing NVS Cards on SRP Modules

Each SRP module contains an NVS card that stores system files. In this documentation, the NVS card on the primary SRP module is referred to as the primary NVS card; the NVS card on the redundant SRP module is referred to as the redundant NVS card.

If you have two SRP modules installed in a router, you can use NVS cards of different capacities on the SRP modules. The effective capacity of the higher-capacity NVS card will equal that of the lower-capacity NVS card.

NVS Features

The software contains a number of features that optimize the way the router restores its configuration if it is shut down improperly:

To prevent corruption of NVS cards, always issue the halt command before you remove an NVS card or an SRP module (see Removing an SRP Module). Always reboot the router using the rebooting procedure (see Chapter 10, Booting the System); do not reboot the router by switching it off and on.

Installing and Removing NVS Cards

For information about replacing NVS cards, see E-series Hardware Guide, Chapter 5, Installing Modules.

Synchronizing NVS Cards

NOTE: The information in this section does not apply to the ERX-310 router, which does not support SRP module redundancy.


If the router contains two SRP modules, it is important to keep the contents of the modules' NVS cards synchronized. Synchronization prevents the redundant NVS card from overwriting saved files on the primary NVS card if the primary SRP module fails and the redundant SRP module assumes control.

By default, autosynchronization is enabled on the router. Autosynchronization runs as a background process every 5 minutes, tracking changes in image, configuration, and script files, and keeping the two SRP modules synchronized. You can also synchronize the SRP modules manually by issuing the synchronization command.

Before synchronization, the router does the following:

Depending on the outcome of the second check, the router proceeds as follows:

If an SRP synchronization is in progress or has failed and the router is recovering, the router will prevent the redundant SRP module from assuming the primary role while the primary is rebooting, and for 30 seconds after the primary module has rebooted. These conditions prevent a redundant SRP module with corrupted or missing files from becoming the primary and overwriting files or directories on the primary module.

synchronize

Synchronizing NVS Cards of Different Capacities

If the capacity of the primary NVS card is equal to or smaller than that of the redundant NVS card, the router copies all the files from the primary NVS card to the redundant NVS card. However, if the capacity of the primary NVS card exceeds that of the redundant NVS card, the router creates an invisible synchronization reserve file on the primary NVS card, provided that there is enough space for the file.

The purpose of the synchronization file is to prevent the creation of data that will not fit on the redundant NVS card. The file contains no useful data, and is not visible when you view the files in NVS. The size of the file is equal to the difference in capacities of the two NVS cards. For example, if the primary NVS card has a capacity of 224 MB, and the redundant NVS card has a capacity of 220 MB, the size of the synchronization file is 4 MB, and only 220 MB of space is available on the primary NVS card.

If there is not enough space on the primary NVS card to create the synchronization reserve file, the synchronize command fails, and you see a warning message on the console. To resolve this issue, either delete unwanted files from the primary NVS card or replace the redundant NVS card with a higher-capacity NVS card.

Disabling Autosynchronization

If autosynchronization is enabled while you are copying very long scripts or installing new software releases, it detects a disparity between the modules during the middle of the process. This feature causes significant unnecessary synchronization, resulting in prolonged copy times.

If you have installed a redundant SRP module, perform the following steps before copying long scripts:

  1. Turn off autosynchronization with the disable-autosync command.
  2. Perform the installation or copy the script.
  3. Reenable autosynchronization with the no disable-autosync command.
  4. Manually synchronize the modules with the synchronize command.

Refer to the commands and guidelines in the previous section and below.

disable-autosync

Validating and Recovering Redundant SRP File Integrity

NOTE: The information in this section does not apply to the ERX-310 router, which does not support SRP module redundancy.


Even when NVS cards on the primary and redundant SRP modules are synchronized, differences can exist in the content of files that reside on the primary NVS card and the redundant NVS card. You can use the flash-disk compare command to detect these differences so you can validate and, if necessary, recover the file integrity of the redundant SRP module.

The flash-disk compare command validates only those files that are synchronized between the primary and redundant SRP modules. It does not compare files that are normally excluded from the synchronization process, such as log files and core dump files. The command uses a simple checksum error detection algorithm to compare the contents of a file residing on the NVS card of the primary SRP module with the contents of the same file residing on the NVS card of the redundant SRP module.

To validate and recover redundant SRP file integrity:

  1. Ensure that the file systems on the primary NVS card and the redundant NVS card are synchronized. (See Synchronizing NVS Cards for details.)
  2. Issue the flash-disk compare command, specifying whether to perform the checksum validation for all files in NVS or only for configuration files.
  3. host1#flash-disk compare all
    
    host1#flash-disk compare configuration
    
    
    

The flash-disk compare configuration command, which validates only configuration files, excludes larger files such as software releases and scripts from the validation process. As a result, this command takes less time to complete than the flash-disk compare all command, which validates all NVS files.

  1. Review the flash-disk compare output to determine whether any files failed the checksum validation.

If the flash-disk compare command detects differences in the content of one or more files, the router reports a checksum test failure.

  1. If one or more files failed the checksum validation, determine whether the corrupted files reside on the primary SRP module or on the redundant SRP module.
  2. If the corrupted file resides on the primary SRP module, issue the srp switch command to force a switch from the primary SRP module to the redundant SRP module.

This action ensures that the error-free version of the file will be on the SRP module that assumes control after the switch.

  1. Issue the synchronize command with the low-level-check keyword to force the router to:

This action should resolve any file discrepancies between the primary and redundant SRP modules and restore SRP file integrity.

NOTE: Both the flash-disk compare and synchronize low-level-check commands perform CPU-intensive processing that can take several minutes to complete. For best results, do not run these commands simultaneously on the same router. In addition, do not run multiple instances of the flash-disk-compare command simultaneously on the same router.


flash-disk compare

synchronize

Reformatting the Primary NVS Card

You can reformat the primary NVS card. To do so:

  1. Access Boot mode.
  1. From Privileged Exec mode, enter the reload command. Information about the reloading process is displayed.
  2. When the countdown begins, press the <mb> key sequence (case-insensitive).

The CLI enters Boot mode (:boot## prompt). If you do not press the <mb> key sequence, the reloading process continues and returns the CLI to the normal User Exec mode.

  1. Issue the flash-disk initialize command.

flash-disk initialize

Copying the Image on the Primary SRP Module

NOTE: The information in this section does not apply to the ERX-310 router, which does not support SRP module redundancy.


You can copy the contents of NVS on the primary SRP module to a spare NVS card. To do so:

  1. Access Boot mode.
  1. From Privileged Exec mode, enter the reload command. Information about the reloading process displays.
  2. When the countdown begins, press the <mb> key sequence (case-insensitive).

This action puts the CLI in Boot mode (:boot## prompt).
If you do not press the <mb> key sequence, the reloading process continues and returns the CLI to the normal User Exec mode.

  1. Issue the flash-disk duplicate command.
  2. Follow the instructions on the screen. When prompted, insert the original or spare NVS card in the primary SRP module.

flash-disk duplicate

Scanning NVS Cards

You can find both structural errors in the data in NVS and physical errors in the NVS card. You can also remove files with errors, and attempt to repair structural or physical errors.

check-disk

:boot##check-disk
Copyright (c) 1993-1996 RST Software Industries Ltd. Israel. All rights reserved
ver: 2.6 FCS

Disk Check In Progress ...


        total disk space (bytes) :                    512,122,880
        bytes in each allocation unit :               8,192
        total allocation units on disk :              62,515
        bad allocation units :                        1
        available bytes on disk :                     120,651,776
        available clusters on disk :                  14,728
        maximum available contiguous chain (bytes) :  120,651,776
        available space fragmentation (%) :           0
        clusters allocated :                          47,786
Done Checking Disk.

flash-disk scan


Monitoring NVS Cards

Use the show nvs command to monitor the status of NVS on the primary SRP module. Use the show flash command to view information about the NVS card.

show nvs

show flash


[Contents] [Prev] [Next] [Index] [Report an Error]