Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
 

Introduction

...

NOTE

  • This document only applies to PICOS upgrade from version 3.0 or later version using command upgrade2. If you want to upgrade PICOS from the version before 3.0, use ONIE installation process described in Installing PICOS on Bare Metal Switches.
  • If you want to upgrade PICOS from version 3.X to 4.X, read the following precautions carefully:
    • When executing the upgrade2 command, no other option is supported except the option image_name.
    • Backup the configuration file before upgrading.
    • Due to configuration compatibility issues, the 4.X configuration file pica_startup.boot needs to be generated in advance and copied to the following new folder: /pica/config-4.x/. If this operation is not performed before the upgrade, the system will load the default configuration file of 4.X and the original 3.X configuration will not be loaded after the upgrade. (However, if you have saved some backup config files on some other server in your network, you can use the load command to load the 4.X configuration you have saved after upgrade.)
    •  The OVS configuration for crossflow before the upgrade will be saved and restored automatically after the upgrade.

PICOS 4.0.0 and later versions have multiple system partitions including PicOS (partition size: 2G), PicOS2(partition size: 2G) and User-Data partitions. Among them, PicOS and PicOS2 are two independent system boot partitions. One of them is the active partition on which the running system resides, and the other is the inactive partition. The two-system-boot-partition feature allows the system to revert to a previous version of the installed software package when it fails to upgrade PICOS by using upgrade2 command.

User-Data partition is a reserved partition which is not affected by ONIE installer and upgrade unless user manually removes it. User-Data partition uses all the available space left on the disk. Users can use this partition to store files and data.

When running upgrade2, the new version PICOS image will be installed and boot onto the inactive partition automatically. Afterwards, the inactive partition will switch to active partition automatically when the switch boots up normally after the upgrading is finished, while the other partition where the old version resides will become the inactive partition.

Upgrade2 method supports system rollback function. The "nos-rollback" command can be used to revert to a previous version of the installed software package. Moreover, if it fails to upgrade, the system can automatically rollback to the old system. This can reduce the network interruption risk due to the failure of system upgrade process and ensure the systems’ continuous availability. You can refer to section Rollback Procedure in this page for details.

The system also supports the upgrade method for PICOS version upgrade, the usage is the same as before, you can refer to the document Upgrading PICOS from Version 4.0.0 or Later Using Upgrade Command for details of upgrade method. We recommend using upgrade2 method to upgrade the NOS as it includes system backup and rollback features.

Preparation before Upgrading

Table 1. Checklist before Upgrading

...

No.

...

Checking Items

...

Checking Standard

...

Results

...

1

...

Checking the Running PICOS Version

 

...

The currently running system software version is lower than the software version to be installed.

...

2

...

Building Upgrade Environment

...

Build an upgrade environment according to the need.

...

3

...

Getting the Required Upgrade Software

...

Obtain the required supported upgrade software.

...

4

...

Backing up Important Data in Flash

...

All the important data in Flash was backed up.

...

5

...

Checking if PicOS2 Partition Exist

...

The PicOS2 Partition exists.

...

6

...

Checking the Partition Type

...

The type of partition is GPT.

Checking the Running PICOS Version

Use the version command to check the version of the running system software.

Code Block
admin@Xorplus:~$ version
Copyright (C) 2009-2021 Pica8, Inc.
===================================
Hardware Model                : as7312_54x
Linux System Version/Revision : 4.0.0/4b5f523
Linux System Released Date    : 4/27/2021
L2/L3 Version/Revision        : 4.0.0/4b5f523
L2/L3 Released Date           : 4/27/2021
OVS/OF Version/Revision       : 4.0.0/4b5f523
OVS/OF Released Date          : 4/27/2021

Building Upgrade Environment

Please make sure that you have set up an HTTP, TFTP or FTP protocol upgrading environment, the basic requirements are as follows:

  •    PC can log in to the device through serial or SSH.
  •    The communication between the server and the device works well.
  •    The upgrading file used by the device has already been stored on the server.

Getting the Required Upgrade Software

Please contact Pica8 technical support engineers at the following webpage for the latest version of upgrade software.

https://www.pica8.com/support/

Backing up Important Data in Flash

Before upgrading, save the important data in Flash to the local PC through FTP or TFTP, and then upload it to the switch after the upgrade is completed.

Checking if PicOS2 Partition Exists

Use the blkid command to check if the “PicOS2” partition exists. To use upgrade2 command to upgrade NOS, you should make sure there is a “PicOS2” partition.

Code Block
admin@Xorplus:~$ sudo blkid
/dev/sdb2: LABEL="ONIE-BOOT" UUID="5c078d7e-03e8-49d7-a8ba-30107705c6b8" TYPE="ext4" PTTYPE="dos" PARTLABEL="ONIE-BOOT" PARTUUID="2be1af76-4ac4-43a6-ac60-6ac329772e74"
/dev/sdb3: LABEL="ACCTON-DIAG" UUID="d396322d-cfe9-4237-b21c-c1f12bc8cd1c" TYPE="ext4" PARTLABEL="ACCTON-DIAG" PARTUUID="57cb55ac-6f75-4732-aef0-867321a1c543"
/dev/sdb4: LABEL="PICOS-GRUB" UUID="680755b3-1847-47c0-85e8-20a11f230566" SEC_TYPE="ext2" TYPE="ext3" PARTLABEL="PICOS" PARTUUID="42ecb9ab-cbf9-49e1-b270-02f79670cb14"
/dev/sdb5: LABEL="PicOS" UUID="fae08336-9fa7-44ce-a5f4-ce546827ba11" TYPE="ext3" PARTLABEL="PICOS" PARTUUID="c9de9dac-4f8d-4517-8693-341431791009"
/dev/sdb6: LABEL="PicOS2" UUID="2e895a40-26c0-45d8-a343-e1154a63bdac" SEC_TYPE="ext2" TYPE="ext3" PARTLABEL="PICOS" PARTUUID="58731f03-936c-474e-bbcb-19448916f668"
/dev/sdb7: LABEL="User-Data" UUID="cf0db736-6bbd-464a-90f2-2cd1f7a4aa5e" TYPE="ext3" PARTLABEL="Linux filesystem" PARTUUID="73d48df0-9448-4dfe-b393-1369593fc686"
/dev/sdb1: PARTLABEL="GRUB-BOOT" PARTUUID="505671c7-6204-4c11-8c55-b5e3568ba4bf"

Checking the Partition Type

Use the gdisk command to check the partition type. When using upgrade2 to upgrade the switch, you should make sure the type of partition is GPT.

...

Table of Contents
 

Introduction

NOTE

  • This document only applies to PICOS upgrade from version 3.0 or later version using command upgrade2. If you want to upgrade PICOS from the version before 3.0, use ONIE installation process described in Installing PICOS on Bare Metal Switches.
  • You cannot do a standard upgrade from 3.x to 4.x. This is because 3.x config and 4.x config are not compatible, and PICOS 4.x will not be able to boot with 3.x config after the upgrade. In order to upgrade from 3.x to 4.x, you MUST convert the configuration to 4.x before upgrade, see section Converting Configuration to 4.x before Upgrade (when Upgrade from Version 3.x to 4.x) in this guide for details.

PICOS 4.0.0 and later versions have multiple system partitions including PicOS (partition size: 2G), PicOS2(partition size: 2G) and User-Data partitions. Among them, PicOS and PicOS2 are two independent system boot partitions. One of them is the active partition on which the running system resides, and the other is the inactive partition. The two-system-boot-partition feature allows the system to revert to a previous version of the installed software package when it fails to upgrade PICOS by using upgrade2 command.

User-Data partition is a reserved partition which is not affected by ONIE installer and upgrade unless user manually removes it. User-Data partition uses all the available space left on the disk. Users can use this partition to store files and data.

When running upgrade2, the new version PICOS image will be installed and boot onto the inactive partition automatically. Afterwards, the inactive partition will switch to active partition automatically when the switch boots up normally after the upgrading is finished, while the other partition where the old version resides will become the inactive partition.

Upgrade2 method supports system rollback function. The "nos-rollback" command can be used to revert to a previous version of the installed software package. Moreover, if it fails to upgrade, the system can automatically rollback to the old system. This can reduce the network interruption risk due to the failure of system upgrade process and ensure the systems’ continuous availability. You can refer to section Rollback Procedure in this page for details.

The system also supports the upgrade method for PICOS version upgrade, the usage is the same as before, you can refer to the document Upgrading PICOS from Version 4.0.0 or Later Using Upgrade Command for details of upgrade method. We recommend using upgrade2 method to upgrade the NOS as it includes system backup and rollback features.

Preparation before Upgrading

Table 1. Checklist before Upgrading

No.

Checking Items

Checking Standard

Results

1

Checking the Running PICOS Version

 

The currently running system software version is lower than the software version to be installed.


2

Building Upgrade Environment

Build an upgrade environment according to the need.


3

Getting the Required Upgrade Software

Obtain the required supported upgrade software.


4

Backing up Important Data

All the important data was backed up.


5

Converting Configuration to 4.x before Upgrade (when Upgrade from Version 3.x to 4.x)

4.x configuration is generated from 3.x configuration file.

Checking the Running PICOS Version

Use the version command to check the version of the running system software.

Code Block
admin@Xorplus:~$ version
Copyright (C) 2009-2021 Pica8, Inc.
===================================
Hardware Model                : as7312_54x
Linux System Version/Revision : 4.0.0/4b5f523
Linux System Released Date    : 4/27/2021
L2/L3 Version/Revision        : 4.0.0/4b5f523
L2/L3 Released Date           : 4/27/2021
OVS/OF Version/Revision       : 4.0.0/4b5f523
OVS/OF Released Date          : 4/27/2021

Building Upgrade Environment

Please make sure that you have set up an HTTP, TFTP or FTP protocol upgrading environment, the basic requirements are as follows:

  •    PC can log in to the device through serial or SSH.
  •    The communication between the server and the device works well.
  •    The upgrading file used by the device has already been stored on the server.

Getting the Required Upgrade Software

Please contact Pica8 technical support engineers at the following webpage for the latest version of upgrade software.

https://www.pica8.com/support/

Backing up Important Data

Before upgrading, save the important data, e.g. the configuration file, to the local PC through FTP or TFTP, and then upload it to the switch after the upgrade is completed if needed.

Anchor
convert config
convert config
Converting Configuration to 4.x before Upgrade (when Upgrade from Version 3.x to 4.x)

Info
titleNOTE:

When upgrade PICOS from version 3.x to 4.x:

  • When executing the upgrade2 command, no other option is supported except the option image_name.
  • Backup the configuration file before upgrading.
  • The OVS configuration for crossflow before the upgrade will be saved and restored automatically after the upgrade.

You cannot do a standard upgrade from 3.x to 4.x. This is because 3.x configuration and 4.x configuration are not compatible, and PICOS 4.x will not be able to boot with 3.x configuration after the upgrade.

In order to upgrade from 3.x to 4.x, follow the procedure below to prepare the 4.x configuration file before upgrade:

  1. Create directory /pica/config-4.x/.
  2. Contact Pica8 support to convert the 3.x configuration to 4.x configuration in configuration file pica_startup.boot.
  3. Copy the 4.x configuration file (converted from 3.x configuration file in step 2) into the directory /pica/config-4.x just created. After upgrading from 3.x to 4.x and after rebooting, PICOS 4.x will look for the 4.x configuration in /pica/config-4.x.

After completing these steps, the 4.x configuration file is ready and you can continue with the upgrade process.

If these steps are not performed before upgrade, the system will load the default configuration file of 4.x and the 3.x configuration will not be loaded after upgrade. However, if this happens unexpectly, you can also remedy by loading the 4. x configuration file after upgrade, follow the steps below:

  1. Copy the 4.x configuration file pica_startup.boot (already converted from 3.x configuration file) into the directory /pica/config/.
  2. Run the load override command to load 4. x configuration.
Code Block
admin@PICOS# load override /pica/config/pica_startup.boot
admin@PICOS# Loading config file...
Config file was loaded successfully.

Upgrading Notes

  •    This upgrade2 guide only applies to PICOS upgrade from version 4.0.0 or the later versions.

...

admin@Xorplus:~$ sudo upgrade2                            

USAGE

Upgrade system with local new image

SYNOPSIS

upgrade2 [image_name] [factory-default] [use-prev-config] [backup-file=(*.lst)]

DESCRIPTION

image_name - Image with bin format file(*.bin)

factory-default - Recovery configuration to factory default

use-prev-config - Use previous config, and syslog trace

backup-file=(*.lst) - Specify a user defined backup list

For PICOS go2cli version, users can run the upgrade2 command under CLI operational mode or configuration mode:

Code Block
admin@Xorplus> upgrade2 image-file xx.bin 
Possible completions:
  <[Enter]>                       Execute this command
  backup-file                     Specify a user defined backup list(*.lst)
  factory-default                 Recovery configuration to factory default
  use-prev-config                 Use previous configuration, and syslog trace

admin@Xorplus# run upgrade2 image-file xx.bin 
Possible completions:
  <[Enter]>                       Execute this command
  backup-file                     Specify a user defined backup list(*.lst)
  factory-default                 Recovery configuration to factory default
  use-prev-config                 Use previous configuration, and syslog trace

...

Info
titleNOTE:
  • If management VRF is enabled, and the FTP/TFTP/HTTP/SCP server is connected via the Eth0/1 port, you need to add the string sudo ip vrf exec mgmt-vrf before the SCP command when executing the scp operation. The format is as follows:

admin@Xorplus:~$ sudo ip vrf exec mgmt-vrf scp pica8@10.10.50.22:/tftp/build/4.0.1/as7312_54x/onie-installer-picos-as7312_54x-4.0.1-cc8d268.bin /cftmp

admin@Xorplus:~$sudo ip vrf exec mgmt-vrf scp pica8@10.10.50.22:/tftp/build/4.0.1/as7312_54x/onie-installer-picos-as7312_54x-4.0.1-cc8d268.bin.md5 /cftmp

If sudo ip vrf exec mgmt-vrf is not added, find the next hop routing information from the default VRF. For the usage of VRF, refer to the VRF Configuration Guide.

  • For PICOS go2cli version, users can run the scp command under CLI operational mode or configuration mode:

Φ  Download a file:

 file scp get remote-file <remote-file-path> [local-file local-file-path] ip-address <ip-address>:<port> [vrf <mgmt-vrf | vrf-name>]

               Φ  Upload a file:

file scp put local-file <local-file-path> [remote-file <remote-file-path>] ip-address <ip-address>:<port> [vrf <mgmt-vrf | vrf-name>]

...

                  After finishing upgrade, the switch will reboot automatically, the system will come up running the new network operating system.

NOTE

  • For PICOS go2cli version, users can run the upgrade2 command under CLI operational mode or configuration mode.
  • It will take 20 - 30 minutes to finish upgrading PICOS. During the upgrade process, please be patient and do not perform any operation until the upgrade is complete, otherwise, the upgrade may be interrupted.

...