Sometimes the “request system storage cleanup” command will still not free enough disk space. This article will show an administrator how to maximize the free space on SRX.
The SRX does not have enough free space to finish a task, be it IDP update, or Junos upgrade. Even after running “request system storage cleanup” the SRX admin notices that there is not enough free space. In this case, more drastic disk freeing space tactics must be used.
Cores, logs, multi OS versions, etc may sometime not get cleared.
The following is a secure crt cleanup script, or the commands can be ran manually.
Things to be aware of:
- It will nuke all directories for all login accounts to the SRX… if certificates are used for ssh logins or other data is stored in those directories it will be lost.
- It will nuke the /var/db/idpd/* contents & sub-directories. If you get commit errors and IDP cores after the cleanup, you’ll need to kill -9 the pid for any idpd processes and temporarily configure “set system processes idp disable” ### NOTE THAT WE RECOMMEND DELETING /VAR/DB/IDPD AS A LAST RESORT IF YOU ARE DOING THIS FOR IDP DOWNLOAD/INSTALL/COMPILATION ISSUES###
start shell\r\p\p cd /root/\r\p\p rm -rf ./*\r\p\p cd /var/tmp/\r\p\p rm -rf ./*\r\p\p cd /var/home/\r\p\p rm -rf ./*\r\p\p cd /var/db/idpd/\r\p\p rm -rf ./*\r\p\p cd /var/log/\r\p\p rm ./*.gz\r\p\p exit\r\p\p request system software delete-backup\r\p\p\p\p yes\r request system storage cleanup | no-more\r\p\p\p\p\p\p\p\p\p\p\p\p\p\p\p\p\p yes\r