A Junos upgrade on EX4300 switches might fail due to storage issue on /var/tmp directory. The below error message will be seen at the time of issue:
The /var/tmp filesystem on Junos is low on free disk space.
This package requires 8MB more space free.
ERROR: Please use the request system storage cleanup command to delete old files from /var/tmp
While it is good practice to do a 'request system storage cleanup' before the upgrade, if we still get this error, it most likely means that the /var/tmp/.schema-cache directory is taking up too much space. The workaround is to remove it before the upgrade as it will be recreated afterwards and only serves during boot-up.
On EX4300 switches, while upgrading or installing Junos, there might be space crunch on the /var/tmp partition, resulting in upgrade failure. This is due to the '.schema-cache' directory consuming the available space on /var/tmp. The minimum required free space under /var/tmp is roughly 500 MB for successful installation.
Remove the offending directoy before attempting the upgrade (it will be recreated after).
From the shell and as root:
rm -rf /var/tmp/.schema-cache
Resolved-In
junos:19.1R3-S4 junos:19.2R3 junos:19.3R3 junos:19.4R3 junos:20.1R2 junos:20.2R1 junos:20.3R1 junos:20.4R3-S3
Link for the related PR:
On EX4300 switches, Junos upgrade may fail due to a storage issue in the /var/tmp directory
https://prsearch.juniper.net/problemreport/PR1494963