System information
Operation ACTIVATE FLASH COMPACTION 1-43
Software Release 2.0.1
C613-03018-00 REV A
Command Reference
This section describes the commands available on the router to support day-to-
day operational and management activities.
See “Conventions” on page lxxi of Preface for details of the conventions used to
describe command syntax. See Appendix B, Messages for a complete list of
messages and their meanings.
ACTIVATE FLASH COMPACTION
Syntax
ACTIVATE FLASH COMPACTION
Description
This command activates the FLASH compaction process. Compaction is the
process of cleaning up garbage (deleted files) by searching through FLASH
memory copying valid files to a new block and erasing the old blocks. The
compaction process normally occurs automatically when the amount of
garbage reaches a preset limit, so manual compaction is not required for
normal operation. This command can be used to recover garbage space before
the automatic compaction threshold is reached.
Compaction is required because the FLASH memory has a granular erase
structure which requires data to be erased in large blocks rather than as
individual bytes. To allow files to be mapped onto this structure the FFS keeps
track of the status of each file — whether it is being written, is complete or is
deleted. When the total amount of FLASH memory used for deleted files
reaches a preset limit a compaction process is initiated. Compaction searches
through the FLASH memory copying good files to a new location. As soon as
all the good files within an erase block have been copied the block is cleared.
This results in any deleted files present in the block being cleared, freeing up
space for new files. If there is a large amount of FLASH memory in use then the
compaction process can take several seconds to complete. However, FLASH
memory operations continue to operate without being affected by the
compaction process.
While FLASH is compacting, do not restart the switch or use any commands
that affect the FLASH file subsystem. Do not restart the switch, or create, edit,
load, rename or delete any files until a message confirms that FLASH file
compaction is completed. Interrupting flash compaction may result in damage
to files.
While compaction is underway the command:
SHOW FLASH
will indicate an FFS global operation of “compacting”. When compaction is
complete the global operation will return to “none”.
See Also
SHOW FLASH