Difference between revisions of "Upgrade Commands"

From OSNEXUS Online Documentation Site
Jump to: navigation, search
m (Offline Upgrade from Xenial 5.x)
m (QuantaStor CLI Upgrade Commands)
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== QuantaStor CLI Upgrade Commands ==  
 
== QuantaStor CLI Upgrade Commands ==  
  
=== CLI Upgrade Commands ===
+
'''--repoUrl''' is an optional command that is Used to specify the package repository URL to use for the upgrade. If not specified, the package repository URL will be autodetected from the system’s /etc/apt/sources.list.d/osnexus.list file.
 +
During an offline upgrade, this flag need not be used and is auto set to the location of the ISO image.
 +
<pre>
 +
--repoUrl
 +
</pre>
 +
'''--includeKernel''' Performs a ‘Full Upgrade’ of the kernel and drivers.
 +
If the kernel or any drivers are upgraded during this process then a reboot is required for the upgrades to take effect.
 +
<pre>
 +
--includeKernel
 +
</pre>
 +
'''--distroUpgrade''' distribution upgrades from Trusty to Xenial are the only distro upgrades currently supported. If the distribution is upgraded during this process, then a reboot is required for all the upgrades to take effect.
 +
The ‘includeKernel’ command need not be supplied in addition to this flag, as the kernel and drivers will all be upgraded as a part of the distribution upgrade.
 +
<pre>
 +
--distroUpgrade
 +
</pre>
 +
'''--install''' should be used when performing a fresh install on Xenial (16.04) Ubuntu. It can also be used to fix broken installations.
 +
<pre>
 +
--install
 +
</pre>
 +
'''--skipInstall''' can be used with an upgrade when QuantaStor is present but not all Xenial QuantaStor packages are installed.
 +
<pre>
 +
--skipInstall
 +
</pre>
 +
'''--offline''' is used to perform an offline upgrade. Users must copy the desired ISO image into the /mnt/qs-isos directory.
 +
<pre>
 +
--offline
 +
</pre>
 +
'''--allowReboot''' automatically reboots the system when one is required (after the kernel, driver, and/or distribution upgrades).
 +
<pre>
 +
--allowReboot
 +
</pre>
 +
'''--coreOnly''' upgrades only the core QuantaStor packages.
 +
<pre>
 +
--coreOnly
 +
</pre>
  
=== Upgrade Manager Use Cases ===
+
== Upgrade Manager Use Cases ==
  
 
==== Upgrade from Trusty 4.x to Xenial 5.x ====
 
==== Upgrade from Trusty 4.x to Xenial 5.x ====
 +
Prepare for your upgrade by downloading the latest upgrade manager script:
 +
<pre>
 +
curl -o /opt/osnexus/quantastor/bin/qs_upgrade.py
 +
</pre>
 +
Run the upgrade script:
 +
<pre>
 +
/opt/osnexus/quantastor/bin/qs_upgrade.py --distroUpgrade=True --targetDist=trusty --includeKernel=True --allowReboot=True
 +
</pre>
  
 
==== Offline Upgrade from Xenial 5.x ====
 
==== Offline Upgrade from Xenial 5.x ====
Line 16: Line 58:
 
/mnt/qs-isos
 
/mnt/qs-isos
 
</pre>
 
</pre>
 +
Next, find and mount the ISO image:
 
<pre>
 
<pre>
Next, find:
+
mount -o loop 'find /mnt/qs-isos -name "*.iso"' /mnt/qs-isomount
os -name “*.iso”` /mnt/qs-isomount
+
</pre>
+
Mount the ISO:
+
<pre>
+
mount -o loop `find /mnt/qs-is
+
 
</pre>
 
</pre>
  
Line 30: Line 68:
 
</pre>
 
</pre>
  
Perform a dryrun:
+
Perform a dry run test using:
/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True --dryrun=True`
+
<pre>
 +
/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True --dryrun=True
 +
</pre>
  
If the dryrun looks good, run the upgrade script:
+
If the test works, run the upgrade script:
 
<pre>
 
<pre>
 
/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True
 
/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True
Line 51: Line 91:
  
 
==== Service Upgrade from 5.x  ====
 
==== Service Upgrade from 5.x  ====
 
 
Run the upgrade script:
 
Run the upgrade script:
 
<pre>
 
<pre>
 
 
/opt/osnexus/quantastor/bin/qs_upgrade.py --coreOnly=True
 
/opt/osnexus/quantastor/bin/qs_upgrade.py --coreOnly=True
 
 
</pre>
 
</pre>
  

Latest revision as of 13:59, 23 August 2019

QuantaStor CLI Upgrade Commands

--repoUrl is an optional command that is Used to specify the package repository URL to use for the upgrade. If not specified, the package repository URL will be autodetected from the system’s /etc/apt/sources.list.d/osnexus.list file. During an offline upgrade, this flag need not be used and is auto set to the location of the ISO image.

--repoUrl

--includeKernel Performs a ‘Full Upgrade’ of the kernel and drivers. If the kernel or any drivers are upgraded during this process then a reboot is required for the upgrades to take effect.

--includeKernel

--distroUpgrade distribution upgrades from Trusty to Xenial are the only distro upgrades currently supported. If the distribution is upgraded during this process, then a reboot is required for all the upgrades to take effect. The ‘includeKernel’ command need not be supplied in addition to this flag, as the kernel and drivers will all be upgraded as a part of the distribution upgrade.

--distroUpgrade

--install should be used when performing a fresh install on Xenial (16.04) Ubuntu. It can also be used to fix broken installations.

--install

--skipInstall can be used with an upgrade when QuantaStor is present but not all Xenial QuantaStor packages are installed.

--skipInstall

--offline is used to perform an offline upgrade. Users must copy the desired ISO image into the /mnt/qs-isos directory.

--offline

--allowReboot automatically reboots the system when one is required (after the kernel, driver, and/or distribution upgrades).

--allowReboot

--coreOnly upgrades only the core QuantaStor packages.

--coreOnly

Upgrade Manager Use Cases

Upgrade from Trusty 4.x to Xenial 5.x

Prepare for your upgrade by downloading the latest upgrade manager script:

curl -o /opt/osnexus/quantastor/bin/qs_upgrade.py

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --distroUpgrade=True --targetDist=trusty --includeKernel=True --allowReboot=True

Offline Upgrade from Xenial 5.x

First, prepare for your offline upgrade by making directories with the following command:

/mnt/qs-isos and /mnt/qs-isomount

Put the latest QuantaStor ISO into the folowing directory:

/mnt/qs-isos

Next, find and mount the ISO image:

mount -o loop 'find /mnt/qs-isos -name "*.iso"' /mnt/qs-isomount

Copy the upgrade script to a known location with:

cp /mnt/qs-isomount/pool/scripts/qs_upgrade.py /opt/osnexus/quantastor/bin/qs_upgrade.py

Perform a dry run test using:

/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True --dryrun=True

If the test works, run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True

This will take the QuantaStor ISO that is in /mnt/qs-isos and mount it to /mnt/cd-test, then configure the apt preference file to use the ISO files for the upgrades. The script then calls itself, specifying repoUrl as the location of the mounted ISO.

Kernel Upgrade on Xenial 5.x

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --includeKernel=True

This command will upgrade all QuantaStor core packages as well as the kernel. After the kernel upgrade is finished, the script stops and prints the message stdout advising the user to reboot the system. After the system reboot, the script will run again and verify the latest QuantaStor version.

If --allowReboot is supplied as true, then the script will reboot automatically instead of stopping and printing a message to stdout.

Service Upgrade from 5.x

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --coreOnly=True

Core Service Upgrade only on 5.x

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py

This will upgrade the QuantaStor core packages and perform an apt-get upgrade.