Upgrading Juniper devices with small flashdrives

Upgrading an EX2200-CO or a SRX100 with small flash drives can be a bit tricky since the upgrade itself may make the device itself run out of flash drive space. So here is a few tricks to get around some of the hurdles.

First issue is that the flash drive itself might have log files, old JUNOS version rollback saves etc. To make sure the flash drive is properly cleaned up, run:
MyDevice> request system storage cleanup

Answer the question with “yes”. Now the flash drive is properly cleaned up.

There are few options when you perform an upgrade which can be omitted if you are certain what you are doing and accept a failure and rather do a system restore with a USB boot flash drive. The following options can be set when doing the upgrade to save flash drive space:
– no-validate
– no-copy
– unlink
– reboot

no-validate means that it wont check the config file vs. new JUNOS version. This wont save you and drive space, but is generally harmless to skip. It also avoids interrupted upgrades due to config file incompatibilities that might result in junk saved on your flash drive.

reboot means that the system should reboot if the system perform a successful upgrade. This can be omitted if the reboot itself needs to be controlled. This option don’t save any drive space.

no-copy means don’t save any copies of the upgrade package (JUNOS install package) while doing the upgrade. Useful both if upgrading from a JUNOS install package from local flash drive or via ftp/http. The upgrade function otherwise actually do copy the install package no matter the method of access. This option really is a flash drive space saver.

unlink means that the upgrade process shouldn’t save any rollback data. When omitted, a rollback to the old JUNOS version cant be done. If a downgrade is desired, it needs to be performed like a normal upgrade. This option also save flash drive space.

A final word is that performing the upgrade via ftp/http saves drive space since a local copy of the install package don’t have to be done.

So best upgrade scenario out of a drive space point of view is:
MyDevice> request system software add ftp://someuser:somepass@ftp.server-somehere.com/jinstall-somepackage.tar.gz unlink no-copy no-validate reboot

Second best scenario is that the JUNOS install package was uploaded to your directory on the router:
MyDevice> request system software add jinstall-somepackage.tar.gz unlink no-copy no-validate reboot

So a command summary:
MyDevice> request system storage cleanup
MyDevice> request system software add ftp://someuser:somepass@ftp.server-somehere.com/jinstall-somepackage.tar.gz unlink no-copy no-validate reboot

Happy upgrading!

This entry was posted in Device Management, Managing Juniper devices. Bookmark the permalink.

Leave a Reply