Each SRP module contains a flash card that stores system files. On the E120 router and the E320 router, each SRP module can have an additional flash card; the second card is reserved for the storage of core dumps.
In this documentation, the flash card on the primary SRP module is referred to as the primary flash card; the flash card on the redundant SRP module is referred to as the redundant flash card.
If you have two SRP modules installed in a router, you can use flash cards of different capacities on the SRP modules. The effective capacity of the higher-capacity flash card equals that of the lower-capacity flash card.
The software contains a number of features that optimize the way the router restores its configuration if it is shut down improperly:
The E120 router and the E320 router can have a second flash card installed with its SRP modules. Device names are reserved for the E120 and E320 router flash card slots: disk0, disk1, standby-disk0, and standby-disk1. For backward compatibility, you can use the name standby, which is equivalent to standby-disk0. You can use the second card (disk1 or standby-disk1) only for storage of core dump (.dmp) files. When the a card is installed and mounted as disk1 or standby-disk1, all .dmp files are automatically stored on this card. You must use the card mounted as disk0 or standby-disk0 for all other file types. Core dump files are stored on disk0 or standby-disk0 only when a second card is not installed.
The copy, dir, delete, and rename commands all recognize the device names, as in the following examples. Disk1 and standby-disk1 accept only dump files. This means that you can copy only .dmp files to the second disk, delete only .dmp files from the second disk, and rename only .dmp files on the second disk.
host1#copy reset05.dmp server2:reset05.dmp host1#copy disk0:051802.dmp server2:reset05.dmp
host1#delete disk1:reset05.dmp host1#delete standby:reset05.dmp host1#delete standby-disk0:reset05.dmp host1#delete standby-disk1:reset05.dmp
host1#rename standby-disk1:foo.dmp standby-disk1:bar.dmp host1#rename foo.dmp /outgoing/bar.dmp
host1#dir Please wait...
active/standby file systems are synchronized
unshared in
file size size date (UTC) use
-------------- --------- -------- ------------------- ---
disk0:reboot.hty 654336 654336 03/01/2005 16:08:28
disk0:system.log 3644 3644 11/30/2004 20:48:18
disk0:special.rel 159256660 61695156 02/18/2005 10:31:48
disk0:lm4_12.dmp 344200394 344200394 02/12/2005 12:12:12
standby-disk0:lm4_13.dmp 344200394 344200394 02/13/2005 13:13:13
disk1:lm4_14.dmp 344200394 344200394 02/14/2005 14:14:14
standby-disk1:lm4_15.dmp 344200394 344200394 02/15/2005 15:15:15
disk0:boston.scr 833 833 02/22/2005 17:46:18
disk0:bulkstats.scr 170 170 02/13/2006 17:34:30
ram:bulkstats1.sts 737 737 03/07/2006 09:07:52
Disk capacity
-------------
Capacity Free Reserved
Device (bytes) (bytes) (bytes)
------ ---------- --------- --------
disk0: 1025482752 342066375 68157440
ram: 5767168 5734400 0
Because the device names are reserved, if you upgrade from a release where you previously used those names for remote hostnames, an error message appears when you try to use that remote hostname:
- %ambiguous file name, reserved disk device name "disk1"
must be removed from host table
To prevent corruption of flash cards, always issue the halt command before you remove an SRP module. See Removing an SRP Module. Issue the halt command before you remove a flash card installed as disk 0 or standby disk 0. Flash cards installed and mounted as disk1 or standby disk1 can be safely removed by issuing the no mount command for the card and then ejecting the card. Always reboot the router using the rebooting procedure. See Booting the System . Do not reboot the router by switching it off and on.
For information about replacing flash cards, see ERX Hardware Guide, Chapter 4, Installing Modules, or E120 and E320 Hardware Guide, Chapter 4, Installing Modules.
Before you remove the second flash card (disk1) on the SRP 120 module or the SRP 320 module, you must first unmount the card with the no mount command. This command causes the file system to reject all subsequent requests for opening files on the flash card and closes all open files. When this is accomplished, the disk is marked as safely unmounted and a status message indicates that is safe to eject the disk. A status message is displayed when you issue the mount or no mount command:
- % Device is mounted
- % Device is already mounted
- % Device is not present
- % Device is dismounted
- % Device is already dismounted
- % Device is not present
- % Command failed, files are open on device
![]() |
Caution: When you eject a mounted disk 0 while the router is in an operational state, the SRP module initiates a reload. When you eject a mounted disk 1, data on the disk can be corrupted, but the router does not reboot. |
mount
- host1#mount disk1
![]() |
Note: The information in this section does not apply to the ERX-310 router, which does not support SRP module redundancy. |
When the router contains two SRP modules, the contents of the modules’ flash cards need to be synchronized. Synchronization prevents the redundant flash card from overwriting saved files on the primary flash card if the primary SRP module fails and the redundant SRP module takes 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 synchronize command.
Before synchronization, the router does the following:
Depending on the outcome of the space verification, the router proceeds as follows:
If an SRP synchronization is in progress or has failed and the router is recovering, the router prevents the redundant SRP module from taking 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
![]() |
Note: In most cases, use the synchronize command instead of the synchronize low-level-check command. The synchronize low-level-check command is provided for troubleshooting, and is intended to be used under direction from JTAC. |
- host1#synchronize
- host1#synchronize low-level-check all
- host1#synchronize low-level-check configuration
If the capacity of the primary flash card is equal to or smaller than that of the redundant flash card, the router copies all the files from the primary flash card to the redundant flash card. However, if the capacity of the primary flash card exceeds that of the redundant flash card, the router creates a hidden synchronization reserve file on the primary flash card, provided enough space is available for the file.
The purpose of the synchronization file is to prevent the creation of data that cannot fit on the redundant flash card. The file contains no useful data, and does not appear when you view the files in NVS. The size of the file is equal to the difference in capacities of the two flash cards. For example, if the primary flash card has a capacity of 224 MB, and the redundant flash 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 flash card.
If the primary flash card does not have enough space 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 flash card or replace the redundant flash card with a higher-capacity flash card.
If autosynchronization is enabled while you are copying 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:
Refer to the commands and guidelines in the previous section and in the sections that follow.
disable-autosync
- host1(config)#disable-autosync
![]() |
Note: The information in this section does not apply to the ERX-310 router, which does not support SRP module redundancy. |
Even when flash cards on the primary and redundant SRP modules are synchronized, differences can exist in the content of files that reside on the primary flash card and the redundant flash 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 flash card of the primary SRP module with the contents of the same file residing on the flash card of the redundant SRP module.
To validate and recover redundant SRP file integrity:
- 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.
If the flash-disk compare command detects differences in the content of one or more files, the router reports a checksum test failure.
This action ensures that the error-free version of the file will be on the SRP module that takes control after the switch.
- host1#synchronize low-level-check all
- host1#synchronize low-level-check configuration
This action resolves 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
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
You can reformat the primary flash card. To do so:
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.
flash-disk initialize
host1#halt primary-srp 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
host1#no mount disk1 % Device is dismounted host1#flash-disk initialize disk1 WARNING: Execution of this command will cause the contents of disk1 to be erased. Proceed with Flash disk initialization? [confirm] Please wait..............................
![]() |
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 flash card. To do so:
This 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.
flash-disk duplicate
![]() |
Note: This command is available only in Boot mode. |
host1#halt primary-srp 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
You can find both structural errors in the data in NVS and physical errors in the flash card. You can also remove files with errors, and attempt to repair structural or physical errors.
check-disk
:boot## check-disk disk0
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
: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!
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 flash card.
show flash
host1#show flash
Active System Controller:
-------------------------
Device Manufacturer Capacity Status
------ -------------- ---------- -------
disk0 SILICONSYSTEMS 1047126528 mounted
disk1 STI 1024966656 mounted
Standby System Controller:
--------------------------
Device Manufacturer Capacity Status
------------- -------------- ---------- -------
standby-disk0 SILICONSYSTEMS 1047674880 mounted
standby-disk1 SILICONSYSTEMS 1047674880 mounted
show nvs
host1#show nvs total nvs file sizes = 228864 total nvs file errors = 0 nvs flash in use = 1265152 available nvs flash = 35435008