Pages

Monday, May 20, 2013

Squeeze the Cisco flash to reclaim space

While working to test out some configuration with a Cisco 2600, had to upgrade/downgrade it to match the production device. During deletion of the IOS to make space for the new IOS, notice "delete" command does not remove the file from flash until I perform the "squeeze" the flash.
"On Class A Flash file systems, you can delete individual files using the delete EXEC command and later recover these files with the undelete EXEC command. The delete command marks the files as "deleted," but the files still take up space in Flash memory. To permanently delete the files, use the squeeze EXEC command. The squeeze command removes all of the files marked "deleted" from the specified Flash memory device. These files can no longer be recovered. To erase all of the files on a Flash device, use the format EXEC command."
Router#sh flash:

System flash directory:
File  Length   Name/status
  1   19223864  c2600-ik9s-mz.123-17b.bin
  2   4941492  c2600-d-mz.121-3a.bin [deleted]
[24165484 bytes used, 8864656 available, 33030140 total]
32768K bytes of processor board System flash (Read/Write)

Router#squeeze ?
  /quiet  Squeeze without progress update
  flash:  Filesystem to be squeezed

Router#squeeze flash:
Squeeze operation may take a while. Continue? [confirm]
squeeze in progress... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Rebuild file system directory...
Squeeze of flash complete

Router#sh flash

System flash directory:
File  Length   Name/status
  1   19223864  c2600-ik9s-mz.123-17b.bin
[19223928 bytes used, 13806212 available, 33030140 total]
32768K bytes of processor board System flash (Read/Write)

No comments:

Post a Comment