QuantaStor Local Update Mirror

Revision as of 15:58, 13 October 2026 by Joshua (talk | contribs) (Rewrite: three mirror options (nginx on port 80, qs_rsync_mirror.sh, removable drive), QuantaStor VM notes, sizes and ports, checks, apt and DNS methods. Verified against QuantaStor 6.8.6.)

This page describes how to upgrade QuantaStor systems that have no internet access, using a local copy of the QuantaStor package repository. It covers where to host the copy, how to download and check it, and how to point the QuantaStor systems at it.

  1. Choose where to host the mirror.
  2. Download the QuantaStor repository with rsync.
  3. Check the mirror holds the release you plan to install.
  4. Make the mirror reachable from the QuantaStor systems.
  5. Point the QuantaStor systems at the mirror and disable the Ubuntu package sources they cannot reach.
  6. Upgrade as normal.

Overview

QuantaStor systems at sites with no public internet access cannot reach packages.osnexus.com, so they need a local mirror of the repository to run upgrades. The mirror is a server or VM that holds a copy of the QuantaStor repository and serves it over HTTP. The QuantaStor systems reach it through their apt configuration, or through your internal DNS resolving packages.osnexus.com to the mirror.

Update the mirror before each upgrade, and check it again before the upgrade window. The mirror holds whichever release is current when you sync it.

Choose where to host the mirror

Pick the option that fits how your site connects to the internet.

Option Where the mirror runs How the QuantaStor systems reach it
Option 1 An Ubuntu server or VM inside your network that can also reach the internet, such as a jump host Port 80, by apt configuration or internal DNS
Option 2 An Ubuntu server or VM inside your network that can also reach the internet, such as a jump host, set up by a script Port 9999, by apt configuration
Option 3 Downloaded on a machine with internet access and carried in on a removable drive, then copied to a mirror server inside your network or served straight from the drive Port 80 or 9999, as for the mirror server, or 9999 from the drive

A QuantaStor VM can also host the mirror. See Hosting the mirror on a QuantaStor VM.

Option 1: Ubuntu server with nginx on port 80

Install nginx and rsync:

apt-get install -y nginx rsync

Create the file /etc/nginx/sites-enabled/osnexus-mirror with the contents below. Replace "yourserver.example.net" with the mirror server's DNS name. The packages.osnexus.com entry lets the mirror answer when your internal DNS points that name at it. The file location may differ with other nginx versions or Linux distributions.

#
# A virtual host entry for an OSNEXUS QuantaStor mirror
#

server {
    listen       80 default_server;
    server_name  yourserver.example.net packages packages.osnexus.com;
    location / {
        root /var/lib/www/packages-root;
        autoindex on;
    }
}

Ubuntu's nginx package enables a default site that answers requests made by IP address or by any name not listed above, so the mirror returns "404 Not Found" until it is removed. Remove it, check the configuration and restart nginx:

rm -f /etc/nginx/sites-enabled/default
nginx -t
systemctl enable nginx
systemctl restart nginx

Then download the repository as described in Download the QuantaStor repository.

Option 2: qs_rsync_mirror.sh

The qs_rsync_mirror.sh script downloads the repository with rsync into /var/lib/www/packages-root and, with the -n option, adds an nginx site on port 9999. By default it skips the RHEL repositories and the older Ubuntu releases.

On the Ubuntu server, install nginx and rsync, download the script and run it. The script checks that nginx is installed before it does anything, including when it only downloads.

apt-get install -y nginx rsync
curl -O http://packages.osnexus.com/packages/quantastor-jammy/scripts/qs_rsync_mirror.sh
bash qs_rsync_mirror.sh -n

Example output

Creating credentials file in /tmp: /tmp/qs_rsync_mirror.credentials
Using existing exclude file: /var/lib/www/packages-root/exclude.list
Exclusions in /var/lib/www/packages-root/exclude.list:
index.html
precise/
trusty/
packages-redhat/
quantastor-rhel/
quantastor-redhat/
quantastor-xenial/
quantastor-bionic/
quantastor-focal-optional/
Bandwidth limit set to 50 Mbps.
Starting rsync process with options: -a --quiet
Mirror sync completed successfully.
Setting up Nginx configuration at /etc/nginx/sites-enabled/osnexus-mirror
Reloading Nginx...
Nginx is running and configuration was successfully reloaded.

Please update your apt configuration on any quantastor systems to point to the new local mirror: http://<ip>:9999/packages
Example: /etc/apt/sources.list.d/osnexus.list with the following content:

deb http://<ip>:9999/packages/ quantastor-focal main

Use -d to download to a different directory, for example on a larger data disk, and -b to change the download bandwidth limit from the default of 50 Mbps. At the default limit the first download takes around two hours. Run the script with -h for all options.

When it finishes, the script prints an example apt line that names the quantastor-focal suite. Use the line for your platform from apt method instead. With this option the QuantaStor systems' apt source is http://yourserver.example.net:9999/packages, and the DNS method does not apply.

Option 3: Removable drive

In an air-gapped environment, stage the repository with a removable drive. Download it to the drive on a machine with internet access, carry the drive in, and copy the repository onto a mirror server inside your network, which then serves it like any other mirror.

Format the drive as ext4. The download keeps Linux ownership and permissions on every file, which filesystems such as exFAT and NTFS cannot store. The examples below mount the drive at /mnt/qsmirror.

On the machine with internet access, with the drive mounted, install nginx and rsync, download the script and run it with -d pointing at the drive. The script needs nginx installed even though it does not serve anything here.

apt-get install -y nginx rsync
curl -O http://packages.osnexus.com/packages/quantastor-jammy/scripts/qs_rsync_mirror.sh
bash qs_rsync_mirror.sh -d /mnt/qsmirror/packages-root

Stage the repository on a mirror server

Unmount the drive, carry it in, and mount it at /mnt/qsmirror on the mirror server inside your network. Copy the repository to the directory the mirror serves:

rsync -a /mnt/qsmirror/packages-root/ /var/lib/www/packages-root/

Then serve it on port 80 with the Option 1 nginx configuration, or on port 9999 with qs_rsync_mirror.sh, skipping the download:

bash qs_rsync_mirror.sh -s -n

As in Option 2, the script ends with an example apt line for quantastor-focal. Use the line for your platform from apt method instead.

To refresh the mirror before a later upgrade, sync the drive again on the machine with internet access and repeat the copy. rsync copies only what has changed.

Serve directly from the drive

You can also serve the repository straight from the drive, without a mirror server, using the web server built into Python. It needs nothing installed and runs as an ordinary user:

cd /mnt/qsmirror/packages-root
python3 -m http.server 9999

The Python web server runs only while the command runs, and stops when you press Ctrl+C. Leave it running until the upgrade is complete on every QuantaStor system, including any later Ceph cluster upgrade. The QuantaStor systems' apt source is http://yourserver.example.net:9999/packages.

The same Python command can serve a repository downloaded by any of the other options, from the top level of the download, /var/lib/www/packages-root by default.

Hosting the mirror on a QuantaStor VM

A QuantaStor VM can host the mirror, using qs_rsync_mirror.sh, which ships on QuantaStor systems. On a QuantaStor VM:

  • A QuantaStor VM used as the mirror needs its own license key. See License Management.
  • The script serves the mirror on port 9999 and leaves the web interface on ports 80 and 443 as it is.
  • Do not use the Option 1 configuration. nginx on a QuantaStor system already serves the web interface on ports 80 and 443, so the DNS method is not available either.
  • Check the free space before the first download. The repository needs about 48 GB, which can be more than the root volume of a QuantaStor VM has free. Add -d followed by a directory on a larger disk to put it there.
  • Keep the mirror off the QuantaStor systems you are upgrading. Each one restarts its services and reboots during its upgrade, and the mirror would be unavailable to the others while it does.

To download the repository and serve it on port 9999:

/opt/osnexus/quantastor/bin/qs_rsync_mirror.sh -n

To serve a repository staged from a removable drive as in Option 3, copy it into place and run the script without the download:

rsync -a /mnt/qsmirror/packages-root/ /var/lib/www/packages-root/
/opt/osnexus/quantastor/bin/qs_rsync_mirror.sh -s -n

Download the QuantaStor repository

OSNEXUS provides an rsync copy of the QuantaStor repository at pkgmirror.osnexus.com, and rsync is the supported way to download it. After the first download, rsync only fetches what has changed. The online repository at packages.osnexus.com does not allow directory listing, so recursive download tools such as wget cannot mirror it.

The full repository is about 84 GB. Excluding the RHEL repositories and the older Ubuntu releases brings it to about 48 GB. Both grow with each release. qs_rsync_mirror.sh applies similar exclusions by default, and so does the command below. Remove its --exclude options to download everything.

Run an initial rsync

mkdir -p /var/lib/www/packages-root/
RSYNC_PASSWORD=guest rsync -aPv --exclude=packages-redhat/ --exclude=quantastor-rhel/ --exclude=quantastor-xenial/ --exclude=quantastor-bionic/ --exclude=precise/ --exclude=trusty/ rsync://guest@pkgmirror.osnexus.com/packages /var/lib/www/packages-root/

Update an existing mirror

To update the mirror on a schedule, create the file /etc/cron.d/osnexus-mirror-sync with the line below, which runs daily at 02:00. Running the rsync command on its own does a one-time update.

0 02 * * * root RSYNC_PASSWORD=guest /usr/bin/rsync -aPv --exclude=packages-redhat/ --exclude=quantastor-rhel/ --exclude=quantastor-xenial/ --exclude=quantastor-bionic/ --exclude=precise/ --exclude=trusty/ rsync://guest@pkgmirror.osnexus.com/packages /var/lib/www/packages-root/

Note. The mirror decides which versions an upgrade installs. The QuantaStor upgrade installs the newest QuantaStor packages on the mirror, and the Ceph cluster upgrade targets the Ceph version named in the mirror's upgrade.conf. If you plan to upgrade QuantaStor first and Ceph in a later maintenance window, disable the scheduled sync between the two unless you intend to move to a newer release.

Check the mirror before an upgrade

On the mirror server, after the sync, compare the mirror's release date and newest QuantaStor version with the online repository. This example is for QuantaStor systems based on Ubuntu 22.04, jammy. Replace quantastor-jammy with quantastor-focal or quantastor-noble for those platforms, and /var/lib/www/packages-root with the download directory if you changed it.

grep '^Date:' /var/lib/www/packages-root/packages/dists/quantastor-jammy/Release
zcat /var/lib/www/packages-root/packages/dists/quantastor-jammy/main/binary-amd64/Packages.gz | awk '/^Package: qstorservice$/{p=1} p && /^Version:/{print $2; p=0}' | sort -V | tail -1
curl -s http://packages.osnexus.com/packages/dists/quantastor-jammy/Release | grep '^Date:'

Example output

Date: Mon, 14 Sep 2026 12:08:50 GMT
6.8.6.015+454592a831-1
Date: Mon, 14 Sep 2026 12:08:50 GMT

The first and third dates should match, and the version should be the release you plan to install. See the QuantaStor Version ChangeLog for the current release. If the mirror is behind the online repository, contact OSNEXUS Support before the upgrade window.

After you point a QuantaStor system at the mirror as described below, you can confirm on that system which QuantaStor version the upgrade will install and which Ceph version a Ceph cluster upgrade will target:

apt-get update
apt-cache policy qstorservice
curl -s http://yourserver.example.net/packages/quantastor-jammy/scripts/upgrade.conf | grep CEPH_VER

Example output

qstorservice:
  Installed: 6.7.2.003+ad12621f62-1
  Candidate: 6.8.6.015+454592a831-1
  Version table:
(version table omitted)
CEPH_VER=20.2.2

The "Candidate" line shows the QuantaStor version. With a mirror on port 9999, add :9999 after the server name in the curl command.

Allow the QuantaStor systems to reach the mirror

The machine that downloads the repository needs outbound access to pkgmirror.osnexus.com on TCP port 873 for rsync. The QuantaStor systems need to reach the mirror on TCP port 80 or 9999, depending on how it is served.

Each site has different requirements beyond that. In some cases the mirror server sits behind a firewall that is opened to the internet for the download, then closed to the internet and opened to the internal QuantaStor systems. In others the repository is downloaded, scanned, and carried in as in Option 3. Site policies determine how you handle this step.

Point the QuantaStor systems at the mirror

On the QuantaStor systems, /etc/apt/sources.list.d/osnexus.list points at packages.osnexus.com, which they cannot reach. Use one of the two methods below.

DNS method

Point packages.osnexus.com at the mirror server in your internal DNS. The Option 1 nginx configuration answers for that name. This method does not work with a mirror on port 9999.

apt method

Replace the contents of /etc/apt/sources.list.d/osnexus.list on each QuantaStor system with a single line for your platform. Replace "yourserver.example.net" with the mirror server's DNS name or IP address, and add :9999 after it for a mirror on port 9999.

# focal, Ubuntu 20.04 based QuantaStor systems
echo 'deb http://yourserver.example.net/packages quantastor-focal main' > /etc/apt/sources.list.d/osnexus.list

# jammy, Ubuntu 22.04 based QuantaStor systems
echo 'deb http://yourserver.example.net/packages quantastor-jammy main' > /etc/apt/sources.list.d/osnexus.list

# noble, Ubuntu 24.04 based QuantaStor systems
echo 'deb http://yourserver.example.net/packages quantastor-noble main' > /etc/apt/sources.list.d/osnexus.list

Keep osnexus.list to a single deb line in this form. The Ceph cluster upgrade reads the repository address and suite from this file.

Disable the Ubuntu package sources

The upgrade runs apt-get update and apt-get upgrade, which read every package source on the system, including the Ubuntu sources in /etc/apt/sources.list. An unreachable source does not stop the upgrade, but it slows down every apt-get update while the lookups fail. Disable these sources on each QuantaStor system before the upgrade:

sed -i -E 's/^(deb(-src)? .*ubuntu\.com.*)/# \1/' /etc/apt/sources.list /etc/apt/sources.list.d/*.list

If the system has /etc/apt/sources.list.d/ubuntu.sources, which uses the deb822 format, disable it as well:

sed -i '/^Types:/i Enabled: no' /etc/apt/sources.list.d/ubuntu.sources

The Ubuntu packages that OSNEXUS publishes in the QuantaStor repository, such as security updates, still install from the mirror.

Upgrade as normal

Upgrade the QuantaStor systems with the Upgrade Manager in the web interface or with the CLI, as you would with internet access.

OSNEXUS Support supports this process for licensed QuantaStor deployments. For further assistance, see https://www.osnexus.com for support options.

Related pages


Verified against QuantaStor 6.8.6.