When trying to upgrade from Junos OS version 12.1X46-D10 to a subsequent release of 12.1X46 (i.e. 12.1X46-D25), the upgrade fails due to a lack of disk space on SRX5k RE-13-20.
Sample output of a device running Junos 12.1X46-D20. The goal is to upgrade to 12.1X46-D25, but the installation fails with a "low on free disk space" error. root> ... add no-copy /var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz NOTICE: Validating configuration against junos-srx5000-12.1X46-D25.7-domestic.tgz. NOTICE: Use the 'no-validate' option to skip this if desired. Checking compatibility with configuration Initializing... Verified manifest signed by PackageProduction_12_1_0 Verified junos-12.1X46-D20.5-domestic signed by PackageProduction_12_1_0 Using /var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz Checking junos requirements on / Available space: 20438 require: 9648 Saving boot file package in /var/sw/pkg/junos-boot-srx5000-12.1X46-D25.7.tgz Verified manifest signed by PackageProduction_12_1_0 Hardware Database regeneration succeeded Validating against /config/juniper.conf.gz mgd: commit complete Validation succeeded Installing package '/var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz' ... Verified junos-boot-srx5000-12.1X46-D25.7.tgz signed by PackageProduction_12_1_0 Verified junos-srx5000-12.1X46-D25.7-domestic signed by PackageProduction_12_1_0 Available space: 20438 require: 404752 WARNING: The /cf filesystem is low on free disk space. WARNING: This package requires 404752k free, but there WARNING: is only 20438k available. WARNING: This installation attempt will be aborted. WARNING: If you wish to force the installation despite these warnings WARNING: you may use the 'force' option on the command line. ERROR: junos-12.1X46-D25.7-domestic fails requirements check Installation failed for package '/var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz'
root> ... add no-copy /var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz NOTICE: Validating configuration against junos-srx5000-12.1X46-D25.7-domestic.tgz. NOTICE: Use the 'no-validate' option to skip this if desired. Checking compatibility with configuration Initializing... Verified manifest signed by PackageProduction_12_1_0 Verified junos-12.1X46-D20.5-domestic signed by PackageProduction_12_1_0 Using /var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz Checking junos requirements on / Available space: 20438 require: 9648 Saving boot file package in /var/sw/pkg/junos-boot-srx5000-12.1X46-D25.7.tgz Verified manifest signed by PackageProduction_12_1_0 Hardware Database regeneration succeeded Validating against /config/juniper.conf.gz mgd: commit complete Validation succeeded Installing package '/var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz' ... Verified junos-boot-srx5000-12.1X46-D25.7.tgz signed by PackageProduction_12_1_0 Verified junos-srx5000-12.1X46-D25.7-domestic signed by PackageProduction_12_1_0 Available space: 20438 require: 404752
WARNING: The /cf filesystem is low on free disk space. WARNING: This package requires 404752k free, but there WARNING: is only 20438k available. WARNING: This installation attempt will be aborted. WARNING: If you wish to force the installation despite these warnings WARNING: you may use the 'force' option on the command line. ERROR: junos-12.1X46-D25.7-domestic fails requirements check Installation failed for package '/var/tmp/junos-srx5000-12.1X46-D25.7-domestic.tgz'
On SRX5k RE-13-20 the size of the root (/) partition is limited to 864MB. When this partition holds the currently running Junos image and backup image in /cf/packages directory, it occupies 760MB (the size of Junos OS 12.1X46 is more than 380MB). Therefore, upgrading to the new version of Junos OS may fail unless disk space is cleared on the /cf/packages directory due to "The /cf filesystem is low on free disk space" on the Compact Flash (CF).
Before upgrading, it is always best practice to check the amount of disk space available on the /cf partition. Use the " show system storage " command to display the current capacity.
/cf
show system storage
root@> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 864M 776M 20M 98% / <<< Only 20M available devfs 1.0K 1.0K 0B 100% /dev /dev/md0 794M 794M 0B 100% /junos /cf 864M 776M 20M 98% /junos/cf devfs 1.0K 1.0K 0B 100% /junos/dev/ procfs 4.0K 4.0K 0B 100% /proc /dev/ad0s1e 96M 26K 88M 0% /config /dev/ad2s1f 34G 922M 30G 3% /var /dev/md1 1007M 1.0M 925M 0% /mfs /var/jail 34G 922M 30G 3% /jail/var /var/log 34G 922M 30G 3% /jail/var/log devfs 1.0K 1.0K 0B 100% /jail/dev
shell
du -hs *"
root@> start shell root@% cd /cf root@% du -hs * 3.2M boot 2.0K dev 456K etc 0B kernel 0B kernel.old 18K opt 772M packages 12K root 134K sbin 14K usr 40K var
/cf/packages
root@% ls -l total 791160 lrwxr-xr-x 1 root wheel 28 Nov 14 19:52 junos -> junos-12.1X46-D20.6-domestic -rw-r--r-- 1 930 wheel 404496540 Feb 26 2014 junos-12.1X46-D15.3-domestic -rw-r--r-- 1 930 wheel 7153 Feb 25 2014 junos-12.1X46-D15.3-domestic.certs -rw-r--r-- 1 930 wheel 41 Feb 26 2014 junos-12.1X46-D15.3-domestic.sha1 -rw-r--r-- 1 930 wheel 525 Feb 26 2014 junos-12.1X46-D15.3-domestic.sig -rw-r--r-- 1 930 wheel 404914400 Jul 28 22:28 junos-12.1X46-D20.6-domestic -rw-r--r-- 1 930 wheel 7153 Jul 28 17:30 junos-12.1X46-D20.6-domestic.certs -rw-r--r-- 1 930 wheel 41 Jul 28 22:30 junos-12.1X46-D20.6-domestic.sha1 -rw-r--r-- 1 930 wheel 525 Jul 28 22:31 junos-12.1X46-D20.6-domestic.sig
request system software delete-backup
root@> request system software delete-backup Delete backup system software package [yes,no] (no) yes root@> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 864M 390M 405M 49% / <<< 405MB available devfs 1.0K 1.0K 0B 100% /dev /dev/md0 794M 794M 0B 100% /junos /cf 864M 390M 405M 49% /junos/cf devfs 1.0K 1.0K 0B 100% /junos/dev/ procfs 4.0K 4.0K 0B 100% /proc /dev/ad0s1e 96M 26K 88M 0% /config /dev/ad2s1f 34G 922M 30G 3% /var /dev/md1 1007M 1.0M 925M 0% /mfs /var/jail 34G 922M 30G 3% /jail/var /var/log 34G 922M 30G 3% /jail/var/log devfs 1.0K 1.0K 0B 100% /jail/dev