Knowledge Center Search


 

[SRX] Common and safe files to remove in order to increase available system storage

  [KB19466] Show KB Properties

  [KB19466] Hide KB Properties

Categories:
Knowledge Base ID: KB19466
Last Updated: 29 Jan 2014
Version: 5.0

Summary:

SRX systems may sometimes run out of system storage capacity, commonly while performing a software upgrade of the device. This article lists the files that can be safely removed from the device in order to increase the storage capacity of the file system.

Problem or Goal:

What are the common and safe files that can be removed in order to increase system storage capacity?

Below is a typical show system storage command output, showing flash usage and available space.

root@srx> show system storage
Filesystem     Size    Used    Avail   Capacity   Mounted on
/dev/da0s1a    293M    179M    91M      66%       /
devfs          1.0K    1.0K    0B      100%       /dev
devfs          1.0K    1.0K    0B      100%       /dev/
/dev/md0       494M    494M    0B      100%       /junos
/cf            293M    179M    91M      66%       /junos/cf
devfs          1.0K    1.0K    0B      100%       /junos/dev/
procfs         4.0K    4.0K    0B      100%       /proc
/dev/bo0s3e    24M     108K    22M       0%       /config
/dev/bo0s3f    342M    110M    205M     35%       /cf/var
/dev/md1       168M    14M     141M      9%       /mfs
/cf/var/jail   342M    110M    205M     35%       /jail/var
devfs          1.0K    1.0K    0B      100%       /jail/dev
/dev/md2       39M     4.0K    36M       0%       /mfs/var/run/utm
/dev/md3       1.8M    4.0K    1.7M      0%       /jail/mfs


Cause:

Solution:

The following options are available to remove unwanted files on an SRX system:

  1. The operational mode command request system storage cleanup should be the first command to try in order to reduce the storage on the system. Follow the prompts to complete the storage cleanup operation. You can also execute the command request system storage dry-run to see the files that would be deleted. If there are some you want to save (such as configurations), you can manually delete the appropriate files. Refer to http://www.juniper.net/techpubs/en_US/junos/topics/reference/command-summary/file-delete.html

  2. Another command to delete the backup system software is request system software delete-backup. Note that this command does not perform any function on SRX Branch series devices with dual-root partitioning scheme (units that shipped with Junos OS 10.0 version or later).

  3. Various directories on Junos systems can be opened, deleted, or modified, but it should be done with caution. Go to the shell prompt and navigate to the directory to delete unwanted files. Some files that can be safely removed are described below:
    /var directory contains directories and sub directories such as /var/log and /var/tmp which essentially can be cleaned up.
  4. Run the command “file list /var/log” to see the log files created by the system. It is safe to delete the log files with a numeric extension to their names as they are the archives that are stored after the logs are rotated. Eg… “messages.0.gz” or “jsrpd.1.gz”.

  5. Some of the older files sometimes contain the date on which they were created. Eg. “idpd_err.20091105” which means the file was created sometime on the 5th of November 2009. If you are not interested in storing such files you can safely delete them.

  6. It is important that active logs that the system is using or working on are not deleted or hampered with at any time, as it could cause unexpected behaviors.

  7. At times, a reboot of the device should be able to delete unwanted tmp files and it should also help in reducing some of the same on the device.

Purpose:
Implementation
Installation
Specifications
Troubleshooting

Related Links:

 

 

ASK THE KB

Question or KB ID:


 


 

 
Copyright© 1999-2012 Juniper Networks, Inc. All rights reserved.