> Documentation index for agents: /hcp/3.3/en/llms.txt

# Update nodes to 3.2.6

This page is for a cluster where all nodes run vStack OS 3.2.4 or 3.2.5. Only the node base system changes — [What's new, 3.2.6](/hcp/3.3/en/platform/changelog/index.md#v3-2-6) and [3.2.5](/hcp/3.3/en/platform/changelog/index.md#v3-2-5). You do not need to upgrade Center.

The update script on the node updates the OS and the node components. You update nodes one at a time: you prepare a node in advance, without downtime, and then drain it — move its pools and virtual machines (VMs) to other nodes — update it, reboot it, check it and return it to service.

Nodes 3.0, 3.1 and 3.2.0 move to 3.2.6 using a different page — [Choose a path to 3.2](/hcp/3.3/en/upgrade/from-earlier/choose-path/index.md) tells you which one.

## Before you begin

- You have SSH access with `root` privileges to each node and access to the console of each node over IPMI or BMC, in case a node does not come back on the network.
- The addresses that the nodes use to connect to the outside are on the allowlist of the vStack release repository. vStack support requests that they be added; without this, the script exits with code `2`.
- The previously updated node has returned to service, and data recovery has finished on all pools.
- An upgrade between major versions of vStack OS is done only together with vStack support.

## How to read the steps

- **Where** — the machine to run the step on:

  - **workstation** — your computer with `sh` and `ssh`. Run the commands in `sh` or `bash`, not in `zsh`. You start a `ssh root@<node> 'sh -s' <<'EOF'` … `EOF` block on the workstation, and it runs on the node;
  - **node** — the node over SSH. After you log in to the node, type `sh` first.

- A comment after `#` shows what the command must print.

- **Expected result** — the result if everything is fine.

- **If not** — what to do. **Stop** — do not go on: record the step number and the output, and contact vStack support — [Collect data for support](/hcp/3.3/en/troubleshooting/collect-for-support/index.md). If the result is different and the step has no "If not", that is also a stop.

| Notation | What it is |
| - | - |
| `<node>` | the management address of the node that you use for SSH |
| `<N>` | the node number in the cluster — `Node ID` in the `ccrd_cli` output |

## Check that the nodes are on 3.2.4 or 3.2.5

- **Where:** each node.

```sh
freebsd-version -k                            # 14.2-RELEASE-vstack-3.2.4-… or 3.2.5-…
pkg query '%v' FreeBSD-runtime                # 14.2…
```

**Expected result:** the nodes show `…-vstack-3.2.4-…` or `…-vstack-3.2.5-…`, and `FreeBSD-runtime` is `14.2…`.

**If not:**

- The `FreeBSD-runtime` line is empty — the node was installed from installation media, and the update script will not update it. Stop: contact vStack support.
- Some nodes are already on `…-vstack-3.2.6-…` — update the rest.
- Another version — this page is not for your cluster: [Choose a path to 3.2](/hcp/3.3/en/upgrade/from-earlier/choose-path/index.md).

## Preparation — in advance, without downtime

Steps 1–5 do not stop VMs. Perform them on each node before the update starts.

### 1. Record the state of the NVMe-oF target

- **Where:** node.

```sh
pgrep -lf '^/usr/local/bin/(spdk|nvmf)_tgt'   # NVMe-oF target
```

**Expected result:** you have recorded whether `spdk_tgt` is running on the node. You check the node against this record after the update — step 11.

### 2. Check access to the release repository

- **Where:** node.

```sh
fetch -T 10 -qo /dev/null https://repo.vstack.com/os/3.2.6/update.sh && echo os-OK
```

**Expected result:** `os-OK`.

**If not:** open outgoing HTTPS from the node to `repo.vstack.com`. The node addresses must be on the allowlist — see "Before you begin".

### 3. Download and verify the update script

- **Where:** workstation.

Take the script from the release that you update to: it is signed with the same key as the packages. The block downloads the `update.sh` script, its signature and the public key to `/root/upgrade-326` on the node, and checks the key fingerprint and the script signature. If the key is not yet at the standard path `/usr/share/keys/vstack/vstackos.pub`, the block puts it there.

```sh
ssh root@<node> 'sh -s' <<'EOF'
D=/root/upgrade-326; K=/usr/share/keys/vstack/vstackos.pub
mkdir -p $D; cd $D || exit 1
for f in update.sh update.sh.sig poudriere.pub; do
  fetch -q -o $f https://repo.vstack.com/os/3.2.6/$f || { echo "FETCH-FAIL $f"; exit 1; }
done
echo "key $(sha256 -q poudriere.pub)"
[ "$(sha256 -q poudriere.pub)" = ddf6ca993798a1120f8f5febdab293b9b2a279a888172422fbe510ccb0d82bb4 ] || { echo KEY-MISMATCH; exit 1; }
openssl dgst -sha256 -verify poudriere.pub -signature update.sh.sig update.sh || exit 1
if [ -e $K ]; then echo "pinned $(sha256 -q $K)"
else mkdir -p /usr/share/keys/vstack && install -m 0644 poudriere.pub $K && echo "pinned installed"; fi
EOF
```

**Expected result:** `key ddf6ca993798a1120f8f5febdab293b9b2a279a888172422fbe510ccb0d82bb4`, `Verified OK`, and `pinned installed` or `pinned` with the same fingerprint `ddf6ca99…82bb4`.

**If not:** `FETCH-FAIL` — go back to step 2. `KEY-MISMATCH` or no `Verified OK` — stop: do not run the script. `pinned` with a different fingerprint — stop: a different key is at the standard path.

The script, its signature and the key are published in the vStack release repository: <https://repo.vstack.com/>.

### 4. Do a dry run

- **Where:** workstation.

The block changes nothing on the node: it checks the time and shows the package installation plan.

```sh
ssh root@<node> 'sh -s' <<'EOF'
cd /root/upgrade-326 || exit 1
ntpq -pn | grep '^\*' || echo 'NTP: not synchronized'
rc=0; sh update.sh --controllers --base --source release --version 3.2.6 --dry-run > dry.out 2>&1 || rc=$?
echo dry-rc=$rc
grep -m1 -E 'using pinned pubkey|pubkey missing' dry.out
grep -E 'upgraded|reinstalled|to be installed|REMOVED|ERROR|would switch' dry.out | tail -20
EOF
```

**Expected result:** an NTP line with `*`, `dry-rc=0`, the `using pinned pubkey /usr/share/keys/vstack/vstackos.pub` line. The plan is the same as on the other nodes of the cluster. The `swap would switch to geli onetime` line is expected.

**If not:** `pubkey missing, fetching` — go back to step 3. `NTP: not synchronized` — fix the time on the node before the update starts. `dry-rc` is not `0` — see the meaning of the code in [Update script exit codes](#exit-codes). The plan differs between nodes — stop: sort it out with support before the update starts.

### 5. Back up the node configuration

- **Where:** workstation. The `vstackos.config-backup.sh` collection script is in the current directory: copy it there from the `tools/` directory of the script kit. How to download the kit — [Back up the node configuration](/hcp/3.3/en/upgrade/config-backup/index.md).

The block collects the configuration on the node, fetches the latest collection archive, unpacks it and verifies it against the manifest. Unpack it where the file system is case-sensitive — [Back up the node configuration](/hcp/3.3/en/upgrade/config-backup/index.md#case-sensitive).

```sh
ssh root@<node> 'sh -s -- --tag to-3.2.6 --tar' < vstackos.config-backup.sh
ssh root@<node> 'sh -s' <<'EOF' > vstackos-config-backup-<node>.tar.gz
cat $(ls -t /root/vstackos-config-backup/*/*/vstackos-config-backup-$(hostname -s)-*.tar.gz | head -1)
EOF
mkdir -p check-<node> && tar xzf vstackos-config-backup-<node>.tar.gz -C check-<node>
sh vstackos.config-backup.sh --verify check-<node>/<node name>
```

`<node name>` is what `hostname -s` prints on the node.

**Expected result:** `mismatched 0`.

**If not:** `FAIL` in the collection output or `MISMATCH` in the verification — stop.

## Update — one node at a time

Steps 6–12 are done one node at a time: drain the node — move its pools with **Hard Transfer** and its VMs to other nodes — update and reboot it, check the kernel, the version and the services, and return the pools and VMs to the node. Start the next node only when you have finished with this one.

Update last the node that runs the pool of the management VM — the VM that runs Center. This is the node where `zfs list | grep '/.vm_V4/000000000$'` prints something.

### 6. Drain the node

First make sure that no VM runs on two nodes — [View the cluster state on a node](/hcp/3.3/en/os-cluster/cluster-state/index.md), step 4. A VM number on two nodes means stop.

Move the pools and the running VMs off the node to other nodes — [Drain a node before maintenance](/hcp/3.3/en/guides/drain-node/index.md).

- Transfer pools only with the **Transfer pool** action in the **Hard Transfer** mode. **Soft transfer** suspends the VMs of the pool, and on nodes before 3.2.5, suspending a pool with several VMs can crash the node — this is fixed in 3.2.5. A pool transfer with VM suspension is done only with vStack support.
- If the cluster moved to 3.2 from 3.0 or 3.1 and Internal Fabric is not enabled on it yet (the web interface has no **Start at node** button), start the VMs that the transfer powered off not as in steps 2–3 of the page "Drain a node before maintenance" but with the `vms-start` API method, with the `node_id` of the node where the VM pool currently is — the "Until the fabric is enabled" callout at the top of [Enable Internal Fabric](/hcp/3.3/en/upgrade/from-earlier/internal-fabric/index.md).

Then check the node and the cluster:

1. On the node, `vstack-cluster status` shows no `zpool_…` services under the line of this node. The `cluster-management` service can remain: it moves to another node by itself.
2. No VM is running on the node: `ls /dev/vmm` returns `No such file or directory` or an empty list.
3. On each node that holds pools, `zpool status | grep -E 'pool:|state:|scan:'` shows `state: ONLINE` for all pools, and the `scan:` lines do not show `resilver in progress`.

To learn how to read the output of these commands, see [View the cluster state on a node](/hcp/3.3/en/os-cluster/cluster-state/index.md).

### 7. Start the update

- **Where:** workstation. The reboot comes later, in step 9.

The block starts the update script on the node in the background. `--controllers` updates the vStack packages, `--base` updates the base system and the kernel, and `--no-restart` does not restart the services, because a reboot follows. The script writes the exit code to `update.rc` and the log to `update.log`.

```sh
ssh root@<node> 'sh -s' <<'EOF'
cd /root/upgrade-326 || exit 1
cat > run.sh <<'S'
#!/bin/sh
cd /root/upgrade-326
sh update.sh --controllers --base --source release --version 3.2.6 --no-restart --log /root/upgrade-326/update.log > update.out 2>&1
echo $? > update.rc
S
chmod 700 run.sh; rm -f update.rc; daemon -f /root/upgrade-326/run.sh; echo started
EOF
```

Wait until `update.rc` appears:

```sh
until ssh -n root@<node> 'test -f /root/upgrade-326/update.rc'; do sleep 10; done; echo done
```

**Expected result:** `started`, then `done`.

**If not:** no `started` — stop. If the wait takes longer than 15 minutes, check the progress: `ssh root@<node> 'tail /root/upgrade-326/update.log'`.

Before the update, the script saves `/etc`, `/usr/local/etc`, the boot files and `vstack-env.conf` to `/var/backups/etc-<time>`; after the update, it restores the accounts and the SSH, NTP and boot settings. The run summary is in `/var/backups/update-summary-<time>.txt`.

You set your own update mirror with the `--repo-url` option, only as instructed by vStack support — [Node utilities](/hcp/3.3/en/os-cli/cli/index.md).

### 8. Check before the reboot

- **Where:** workstation.

```sh
ssh root@<node> 'cat /root/upgrade-326/update.rc; grep -c ERROR /root/upgrade-326/update.log'
```

**Expected result:** `0` and `0`. For the meaning of the codes, see [Update script exit codes](#exit-codes).

**If not:** stop, and do not reboot the node.

### 9. Reboot the node

> **Caution**
>
> Reboot the node only if it has no pools and no running VMs — step 6. Otherwise, the reboot works like a node failure: the pools fail over to other nodes, the VMs power off, and Center brings them up again with downtime — [Planned reboot and return of a node](/hcp/3.3/en/mechanics/node-reboot-return/index.md).

- **Where:** workstation; keep the BMC console of the node in front of you.

```sh
ssh root@<node> 'sync; shutdown -r now'
```

While the node reboots, each pool of the cluster runs without one disk.

**Expected result:** after a few minutes, the node accepts SSH connections.

**If not:** the node hangs at the boot loader prompt — reset it from the BMC console. The next boot goes to the previous kernel — after it, stop.

### 10. Check the kernel first

- **Where:** node.

```sh
sysctl -n kern.bootfile                               # /boot/kernel.GENERIC_PROD/kernel
grep "$(hostname -s) vstack_boot_marker" /var/log/messages | tail -2   # … boot on kernel.GENERIC_PROD confirmed, temporary fallback default removed
```

Check the kernel only this way: `uname -r` and `/etc/os-release` do not show the previous kernel.

**Expected result:** a path without `_prev`; the `boot on … confirmed` line.

**If not:** a path with `_prev`, the `NODE IS RUNNING THE FALLBACK KERNEL` line, or no `confirmed` line — stop, and do not return the node to service — [Troubleshooting](#troubleshooting).

### 11. Check the version and services

- **Where:** node.

```sh
freebsd-version -kru                         # 14.2-RELEASE-vstack-3.2.6-… three times
ccrd_cli | grep 'Node ID: *<N>;'             # ONLINE
for s in vStackNodeside vStackVMctrl vStackStorageCtrl vstack_net_daemon; do
  service $s status >/dev/null && echo "$s up" || echo "$s DOWN"
done
pgrep -lf '^/usr/local/bin/(spdk|nvmf)_tgt'  # NVMe-oF target
```

**Expected result:** three `…-vstack-3.2.6-…` lines, `ONLINE`, four `up`. `spdk_tgt` is running if it was running before the update — step 1.

**If not:** the version is not 3.2.6 — stop. A service is `DOWN` — stop. `spdk_tgt` must be running but is not — the cause is in `/var/log/spdk_tgt.log`; stop.

### 12. Return the workload

1. Wait until data recovery finishes on all pools: on each node with pools, `zpool status | grep -E 'pool:|state:|scan:'` shows `state: ONLINE` and no `resilver in progress`.

2. Return the pools to the node — only with **Hard Transfer**, as in step 6 — and then the VMs — [Planned reboot and return of a node](/hcp/3.3/en/mechanics/node-reboot-return/index.md), the "How to bring the workload back" section. Until Internal Fabric is enabled, start the VMs that the transfer powered off as in step 6.

   Pools do not return by themselves to a node that came back. vStack support opens a node that is closed to VM placement.

Only after that, move on to the next node.

## If a step says stop

The node stays drained, and its pools stay on other nodes. Do not return the node to service, and do not start the next node. After a stop in steps 7–8, do not reboot the node. Give vStack support the step number, the check output and the `/root/upgrade-326/update.log` log from the node — [Collect data for support](/hcp/3.3/en/troubleshooting/collect-for-support/index.md).

## Troubleshooting

| What you see | What to do |
| - | - |
| The node booted on `kernel.GENERIC_PROD_prev`, and `/var/log/messages` shows `NODE IS RUNNING THE FALLBACK KERNEL` | Do not return the node to service. With the BMC console in front of you, run `nextboot -k kernel.GENERIC_PROD; shutdown -r now` and watch where the boot stops. If the node boots, the fallback kernel is removed by itself. If not, reset the node (the previous kernel comes back) and send a screenshot to support |
| After the boot, `/var/log/messages` has no `vstack_boot_marker … confirmed` line | Do not return the node to service; contact support with `update.log` |
| `service spdk_tgt status` reports success, but there is no `spdk_tgt` process | Check the process: `pgrep -lf '^/usr/local/bin/spdk_tgt'`; the cause is in `/var/log/spdk_tgt.log` |
| The script on the node prints its help (usage), and an empty file with a name like `3.2.6` appears in `/root`; or you get the `Illegal variable name` or `Ambiguous output redirect` errors | Run the scripts only this way: `ssh root@<node> 'sh -s -- <arguments>' < <script>` or `ssh root@<node> 'sh -s' <<'EOF'`. Delete the extra file |

## Update script exit codes

The script writes the code to `update.rc` (step 7), and the cause to the `ERROR` lines of the `update.log` log. In this procedure, you may reboot the node only with code `0` — step 8.

| Code | What it means |
| - | - |
| `0` | the update completed |
| `1` | an error in the arguments |
| `2` | the repository or the version is unavailable, the signing key was not obtained, or an upgrade between major versions was requested without `--allow-major-upgrade` |
| `3` | a package installation error or a new kernel check error; there will be no reboot |
| `4` | the configuration could not be saved or restored: `/etc`, `/usr/local/etc`, `vstack-env.conf`, the boot files in `/boot` |
| `5` | an installed service did not restart |
| `6` | the update completed, but the `root` shell is not executable: without a fix, `root` cannot log in over SSH after the reboot |
| `7` | the update completed, but the write to `/boot` is not confirmed: **do not reboot** until you sort it out with support |
| `8` | the update completed, but the swap partition stays disabled until the reboot |

## Rollback

If the node does not boot on the new kernel, it comes up on the previous one, but do not return it to service: restore it together with vStack support, from the configuration copy of step 5.

The script does not roll back packages. The previous kernel remains in the boot loader menu, and configuration copies remain in `/var/backups`; the last five are kept. You can restore the whole node by reinstalling it from installation media and restoring it from the configuration copy. Rollback is done together with vStack support.

## What not to do

- **Do not update two nodes at once.** A pool that is still recovering data loses a second disk; with redundancy 1, it does not survive this.
- **Do not run `zpool upgrade`** during the update or after it.
- **Do not return a pool from an updated node to a node that is not updated** until you update all nodes.
- **Do not use the `--no-fallback`, `--no-esp`, `--no-kernel-backup` and `--allow-major-upgrade` options** unless support instructs you to.

## Next

- The cluster moved to 3.2 from 3.0 or 3.1 and all nodes are on 3.2.6 — check whether Internal Fabric is enabled on it: [Choose a path to 3.2, check 3](/hcp/3.3/en/upgrade/from-earlier/choose-path/index.md#fabric). On a cluster installed on 3.2, VM disk access over the network is enabled at installation.
- [Back up the node configuration](/hcp/3.3/en/upgrade/config-backup/index.md)
- [Planned reboot and return of a node](/hcp/3.3/en/mechanics/node-reboot-return/index.md)
- [Node utilities](/hcp/3.3/en/os-cli/cli/index.md) — update script options.
- [View the cluster state on a node](/hcp/3.3/en/os-cluster/cluster-state/index.md)
