This article provides information on how to safely free up disk space on the MX80 platform.
During a Junos upgrade on the MX80 platform, the following warning message may be generated:
WARNING: The /var filesystem is low on free disk space. WARNING: This package requires 557888k free, but there WARNING: is only 158640k available.
By checking the file system, you might notice that the /var file system lacks free space:
lab@MX80-a> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 885M 122M 692M 15% / devfs 1.0K 1.0K 0B 100% /dev /dev/md0 41M 41M 0B 100% /packages/mnt/jbase /dev/md1 178M 178M 0B 100% /packages/mnt/jkernel-ppc-12.2R1.8 /dev/md2 34M 34M 0B 100% /packages/mnt/jpfe-MX80-12.2R1.8 /dev/md3 6.5M 6.5M 0B 100% /packages/mnt/jdocs-12.2R1.8 /dev/md4 54M 54M 0B 100% /packages/mnt/jroute-ppc-12.2R1.8 /dev/md5 12M 12M 0B 100% /packages/mnt/jcrypto-ppc-12.2R1.8 /dev/md6 2.8G 10.0K 2.6G 0% /tmp /dev/md7 2.8G 11M 2.6G 0% /mfs /dev/da0s1e 98M 272K 90M 0% /config procfs 4.0K 4.0K 0B 100% /proc /dev/da1s1f 2.8G 2.1G 445M 83% /var
There is only 445M free space on the /var file system.
You can use the following CLI command to clean up the hard disk:
request system storage cleanup dry-run
By using the dry-run statement, Junos will list (but not delete) all the large files on the hard disk:
lab@MX80-a> request system storage cleanup dry-run List of files to delete: Size Date Name 63.1K Jul 22 04:40 /var/log/authd_sdb.log.0.gz 248.5K Nov 22 12:17 /var/log/chassisd.0.gz 60.2K Dec 18 11:31 /var/log/clicommand.0.gz 277.5K Oct 23 16:15 /var/log/clicommand.1.gz <snipped>
You can find many large files, especially under the /var/sw/pkg folder. During the Junos upgrade, the system will place a backup copy of the installation package under the /var/sw/pkg folder:
lab@MX80-a> file list /var/sw/pkg detail /var/sw/pkg: total blocks: 1617740 -rw-r--r-- 1 root wheel 138921158 Sep 14 14:09 jbundle-ppc-10.3R1.9.tgz -rw-r--r-- 1 root wheel 137224120 Sep 14 14:43 jbundle-ppc-10.3R4.4.tgz -rw-r--r-- 1 root wheel 127618347 Sep 21 11:16 jbundle-ppc-12.2R1.8.tgz -rw-r--r-- 1 root wheel 145973437 Sep 14 14:01 jinstall-ppc-10.3R1.9-domestic-signed.tgz -rw-r--r-- 1 root wheel 144286989 Sep 14 14:37 jinstall-ppc-10.3R4.4-domestic-signed.tgz -rw-r--r-- 1 root wheel 133832306 Sep 21 11:08 jinstall-ppc-12.2R1.8-domestic-signed.tgz -rw-r--r-- 1 root wheel 109 Sep 21 11:16 rollback total files: 7
Usually, this will not be a issue, when the system storage has enough space. But, for the MX80 platform, the /var file system has only about 3GB of total space. When there are a lot of backup installation packages, the free space will be relatively low. As these are only backup package files, you can delete these files to free up more disk space:
lab@MX80-a> file delete /var/sw/pkg/j* lab@MX80-a> file list /var/sw/pkg /var/sw/pkg: rollback
Now you will have enough free disk space:
lab@MX80-a> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 885M 122M 692M 15% / devfs 1.0K 1.0K 0B 100% /dev /dev/md0 41M 41M 0B 100% /packages/mnt/jbase /dev/md1 178M 178M 0B 100% /packages/mnt/jkernel-ppc-12.2R1.8 /dev/md2 34M 34M 0B 100% /packages/mnt/jpfe-MX80-12.2R1.8 /dev/md3 6.5M 6.5M 0B 100% /packages/mnt/jdocs-12.2R1.8 /dev/md4 54M 54M 0B 100% /packages/mnt/jroute-ppc-12.2R1.8 /dev/md5 12M 12M 0B 100% /packages/mnt/jcrypto-ppc-12.2R1.8 /dev/md6 2.8G 10.0K 2.6G 0% /tmp /dev/md7 2.8G 11M 2.6G 0% /mfs /dev/da0s1e 98M 272K 90M 0% /config procfs 4.0K 4.0K 0B 100% /proc /dev/da1s1f 2.8G 1.4G 1.2G 53% /var