I have a pair of Juniper SRX 240 H running in company network environment. Recently it has to be upgraded to JunOS 11.4R5.5 which is latest recommended version. First thing I checked is the available space on those two devices. It seems node0 used 130m more space to storage files based on following command:
show system storageÂ
node0:
--------------------------------------------------------------------------
Filesystem        Size    Used    Avail  Capacity  Mounted on
/dev/da0s2a       293M    214M     56M    79%  /
devfs          1.0K    1.0K     0B    100%  /dev
/dev/md0 Â Â Â Â Â Â Â Â 599M Â Â Â 599M Â Â Â Â 0B Â Â Â 100% Â /junos
/cf           293M    214M     56M    79%  /junos/cf
devfs          1.0K    1.0K     0B    100%  /junos/dev/
procfs          4.0K    4.0K     0B    100%  /proc
/dev/bo0s3e        24M     88K     22M     0%  /config
/dev/bo0s3f       342M    215M    100M    68%  /cf/var
/dev/md1 Â Â Â Â Â Â Â Â 168M Â Â Â Â 16M Â Â Â 139M Â Â Â 10% Â /mfs
/cf/var/jail       342M    215M    100M    68%  /jail/var
/cf/var/log       342M    215M    100M    68%  /jail/var/log
devfs          1.0K    1.0K     0B    100%  /jail/dev
/dev/md2 Â Â Â Â Â Â Â Â 39M Â Â Â 4.0K Â Â Â Â 36M Â Â Â Â 0% Â /mfs/var/run/utm
/dev/md3 Â Â Â Â Â Â Â Â 1.8M Â Â Â 196K Â Â Â 1.5M Â Â Â 11% Â /jail/mfs
node1:
--------------------------------------------------------------------------
Filesystem        Size    Used    Avail  Capacity  Mounted on
/dev/da0s2a       293M    214M     56M    79%  /
devfs          1.0K    1.0K     0B    100%  /dev
/dev/md0 Â Â Â Â Â Â Â Â 599M Â Â Â 599M Â Â Â Â 0B Â Â Â 100% Â /junos
/cf           293M    214M     56M    79%  /junos/cf
devfs          1.0K    1.0K     0B    100%  /junos/dev/
procfs          4.0K    4.0K     0B    100%  /proc
/dev/bo0s3e        24M     86K     22M     0%  /config
/dev/bo0s3f       342M     84M    231M    27%  /cf/var
/dev/md1 Â Â Â Â Â Â Â Â 168M Â Â Â Â 16M Â Â Â 139M Â Â Â 10% Â /mfs
/cf/var/jail       342M     84M    231M    27%  /jail/var
/cf/var/log       342M     84M    231M    27%  /jail/var/log
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
test@test> request system storage cleanup Â
List of files to delete:
     Size Date     Name
 13.5K Jan 24 19:28 /cf/var/log/default-log-messages.0.gz
 33.7K Jan 24 19:27 /cf/var/log/default-log-messages.1.gz
  147B Jan 24 19:28 /cf/var/log/interactive-commands.0.gz
  358B Jan 24 19:28 /cf/var/log/messages.0.gz
 36.7K Jan 24 19:27 /cf/var/log/rtlogd.0.gz
 34.9K Jan 24 19:26 /cf/var/log/rtlogd.1.gz
 19.5K Jan 24 19:28 /cf/var/log/traffic-create.0.gz
 12.2K Jan 24 19:28 /cf/var/log/traffic-deny.0.gz
 20.8K Jan 24 19:24 /cf/var/log/traffic-deny.1.gz
  152B Jan 24 19:16 /cf/var/log/wtmp.0.gz
  27B Jan 24 18:38 /cf/var/log/wtmp.1.gz
Delete these files ? [yes,no] (no)
But still not too much space freed up.
Followed these steps from
"
After the cleanup, if there is still not enough space for the upgrade, perform the following procedure:
- Start the shell by using start shell command on the CLI.
- Issue the following command on the shell:
find -x /cf/var -type f -exec du -k {} \; | sort –n
- Delete the files at the end of the above generated output. Here is an example:
18256 /cf/var/lost+found/#11136/flowd_octeon.core.1.gz 19600 /cf/var/lost+found/#11136/flowd_octeon.core.0.gz
The first column displays the file size in kilobytes and the second column displays the file location. - You can also find files, which are greater in than the specific value. For example, the following command will show files whose size will be more than 10MB:
sh -c 'find / -size +10485760c 2> /dev/null' | xargs du -h | sort -nr
"
% sh -c 'find / -size +10485760c 2> /dev/null' | xargs du -h | sort -nr 210M /cf/packages/junos-10.4R8.5-domestic 32M /cf/var/db/idpd/db/secdb.d02 27M /usr/sbin/flowd_octeon_hm 24M /usr/sbin/flowd_octeon 20M /cf/var/db/idpd/nsm-download/SignatureUpdate.xml 16M /usr/sbin/rpd 12M /cf/var/db/ai_cache/dfa_group_cache.d02 11M /mfs/var/run/db/schema.db 10M /usr/sbin/authd
Another interesting thing is software backup can not be deleted for somehow even we requested to do system software delete-backup.
# run show system software backup Â
Backup JUNOS package information:
File name: /altroot/cf/packages/junos-11.2R2.4-domestic
File size: 145507179
> request system software delete-backupÂ
Delete backup system software package [yes,no] (no) yes
Well the topic you have choose is really unique and information is ultimate you gave us. I completely enjoyed the post and hoping more post from you soon.
ReplyDeletejuniper srx
I was searching on Google with the Keywords "How to Clean-up Space on Juniper SRX Devices" and found your blog. Its providing complete information. Much thanks to Admin.
ReplyDeleteGlad it helps. Thanks for your comments.
Deletevery very helpful information!!! you're awesome!!!
ReplyDelete