Saturday, May 26, 2012

Juniper SRX- identifying files to be deleted


Juniper SRX- identifying files to be deleted

Juniper SRX is notorious for not providing you enough disk space to use all software blades and hold multiple images for upgrades. As a result, you will find yourself on a mission to locate files to be deleted.


First identify disk space needs:
root@hasrx1> show system storage
node0:
--------------------------------------------------------------------------
Filesystem              Size       Used      Avail  Capacity   Mounted on
/dev/da0s1a             293M       203M        67M       75%  /
devfs                   1.0K       1.0K         0B      100%  /dev
/dev/md0                566M       566M         0B      100%  /junos
/cf                     293M       203M        67M       75%  /junos/cf
devfs                   1.0K       1.0K         0B      100%  /junos/dev/
procfs                  4.0K       4.0K         0B      100%  /proc
/dev/bo0s3e              24M       176K        22M        1%  /config
/dev/bo0s3f             342M       138M       177M       44%  /cf/var
/dev/md1                168M        18M       136M       12%  /mfs
/cf/var/jail            342M       138M       177M       44%  /jail/var
/cf/var/log             342M       138M       177M       44%  /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
/dev/altroot            293M       203M        67M       75%  /altroot



Next run a query to identify the largest files:
find -x /cf/var -type f -exec du -k {} \; | sort -n  


Files can be removed using the RM command from the shell.  

some other command


df


cli commands:
show system storage
request system storage cleanup
request system software delete-backup



No comments:

YouTube Channel