[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 system, 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 system 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 system using the rebooting procedure (see Chapter 8, Booting the System); do not reboot the system by switching it off and on.

Installing and Removing NVS Cards

For information about replacing NVS cards, see ERX Installation and User Guide, Chapter 3, Installing ERX Modules.

Synchronizing NVS Cards

If the system 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 system. 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 system does the following:

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

If an SRP synchronization is in progress or has failed and the system is recovering, the system will prevent the redundant SRP module from assuming the primary role while the primary is rebooting, and for thirty seconds after the primary 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

host1#synchronize
host1#synchronize low-level-check all
host1#synchronize low-level-check configuration

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 system 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 system 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 autosync 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

host1(config)#disable-autosync

Validating and Recovering Redundant SRP File Integrity

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 earlier in this chapter 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.
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 system 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 system to:
host1#synchronize low-level-check all
host1#synchronize low-level-check configuration

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 system. In addition, do not run multiple instances of the flash-disk-compare command simultaneously on the same system.

    flash-disk compare

host1#flash-disk compare all
WARNING: This command may take several minutes to complete.
Proceed? [confirm]
WARNING: No changes should be made to the system while this command is in
         progress.
Please wait.........................................................
All file checksums matched.
Number of Files = 866
Number of Bytes = 61660650

host1#flash-disk compare configuration
WARNING: This command may take several minutes to complete.
Proceed? [confirm]
WARNING: No changes should be made to the system while this command is in
         progress.
Please wait......
At least one configuration file failed checksum test.

    synchronize

host1#synchronize
host1#synchronize low-level-check all
host1#synchronize low-level-check configuration

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 on the reloading process displays.
  2. When the countdown begins, press the <mb> key sequence (case-insensitive).

This 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 initialize command.

    flash-disk initialize



Note: This command is available only in the Boot mode.

host1#halt primary
host1#reload
WARNING: Execution of this command will cause the system to 
reboot.
Proceed with reload? [confirm] 
Reload operation commencing, please wait...
[ Press mb]
:boot##flash-disk initialize

Copying the Image on the Primary SRP Module

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 on 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



Note: This command is available only in the Boot mode.

host1#halt primary
host1#reload
WARNING: Execution of this command will cause the system to 
reboot.
Proceed with reload? [confirm] 
Reload operation commencing, please wait...
[ Press mb]
:boot##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



Note: This command is available only in the Boot mode.

: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



Note: This command is available only in the Boot mode.

:boot##flash-disk scan
Proceed with Flash disk scan? [confirm]
Srp PCMCIA Card Scan...
Boot Block OK
File Allocation Table OK
Root Directory OK
Checking File Space
Please Wait...
Checking Free Space
Please Wait...
PCMCIA Card Scan Detected Errors in:
\\images\ct1Diag\ct1Diag3c440e9e.cmp

PCMCIA Card Scan successful!


:boot##flash-disk scan repair
WARNING: Execution of this command may cause the contents of 
the Flash disk to
         be modified.
Proceed with Flash disk scan? [confirm]
Srp PCMCIA Card Scan...
Boot Block OK
File Allocation Table OK
Root Directory OK
Checking File Space
Please Wait...
Checking Free Space
Please Wait...
PCMCIA Card Scan Removed:
\\images\ct1Diag\ct1Diag3c440e9e.cmp

PCMCIA Card Scan successful!


:boot##flash-disk scan
Proceed with Flash disk scan? [confirm]
Srp PCMCIA Card Scan...
Boot Block OK
File Allocation Table OK
Root Directory OK
Checking File Space
Please Wait...
Checking Free Space
Please Wait...
PCMCIA Card Scan successful! 

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

host1#show nvs
total nvs file sizes =  228864
total nvs file errors = 0
nvs flash in use =      1265152
available nvs flash =   35435008

    show flash

host1#show flash
Flash Manufacturer:             STI     Capacity:       224133120

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