Raspberry Pi OS Bookworm Witness Node for StorMagic NSH
Configure a Raspberry Pi running Raspberry Pi OS Bookworm (Debian 12) as a StorMagic NSH witness service node. Includes OS install, NetworkManager networking, optional VNC, NSH installation, ELF interpreter patching, and service startup/verification.
0Background (Bookworm changes that matter)
Raspberry Pi OS and Debian changes in the Bullseye → Bookworm timeline can impact older binaries and headless networking.
Raspberry Pi OS timeline summary
- Before 2020: 32-bit kernel + 32-bit userland (armhf)
- 2020–2021: hybrid build (64-bit kernel + 32-bit userland)
- 2022 onward: full 64-bit available (kernel + userland 64-bit), but hybrid images remain common
Debian 12 (Bookworm) interpreter path change
Legacy 32-bit ARM binaries compiled with the interpreter path /lib/ld-linux.so.3 may fail on Bookworm because the legacy path was removed.
Common fixes include rebuilding, adding a symlink, or updating the ELF interpreter with patchelf.
Networking stack change
Bookworm images commonly use NetworkManager rather than dhcpcd.
If you previously relied on /etc/dhcpcd.conf for static IPs, you may need to migrate to NM profiles.
1Install Raspberry Pi OS (Bookworm)
Use Raspberry Pi Imager to write the OS to a microSD card.
- Raspberry Pi Imager: https://www.raspberrypi.com/software/
- Select Raspberry Pi OS Lite (32-bit) (from “Other”)
Screenshot: Raspberry Pi Imager selection
Screenshot: OS options
Screenshot: Storage selection
- Option 1 (full 64-bit kernel + 64-bit userland) may not work with 32-bit-only applications.
- Option 3 is legacy but still viable. For Bullseye guidance see: Installing an SvSAN witness on Raspberry Pi (Raspbian 32bit) – StorMagic
Screenshot: OS Lite (32-bit) selection
Imager advanced options
- Set hostname (e.g.
smwitness.yourdomain) - Enable SSH
- Set username and password
- Optionally configure Wi-Fi credentials
2Configure hostname and DNS
Set a unique hostname and ensure it resolves properly.
sudo hostnamectl set-hostname smwitness.yourdomain
- Add it to
/etc/hosts - Example mapping:
10.x.x.x hostname.FQDN hostname - This ensures local resolution for services that rely on FQDN
3Configure networking with NetworkManager
- Bookworm uses NetworkManager by default instead of dhcpcd.
- Enable and start NetworkManager (if required):
sudo systemctl enable NetworkManager
sudo systemctl start NetworkManager
Set a static IP address:
nmcli connection modify eth0 ipv4.addresses 10.10.10.100/24
nmcli connection modify eth0 ipv4.gateway 10.10.10.1
nmcli connection modify eth0 ipv4.dns "10.10.10.5"
nmcli connection modify eth0 ipv4.method manual
nmcli connection up eth0
/etc/dhcpcd.conf for static IP/DNS.
4Enable VNC (optional)
If you want GUI access over VNC, see: Raspberry Pi VNC: how to set up a remote desktop | RealVNC
Screenshot: Optional VNC setup
Install UI components and VNC server:
sudo apt update
sudo apt install raspberrypi-ui-mods realvnc-vnc-server
Enable VNC via raspi-config:
sudo raspi-config
Navigate to: Interface Options → VNC → Enable
Screenshot: raspi-config (VNC)
Screenshot: VNC enabled
You can now connect using a VNC viewer to the Pi’s IP address.
5Install the StorMagic Witness Service (NSH)
- Download package: https://nextcloud.stormagic.com/index.php/s/tfokcfHLtKNW7yi
- Transfer to the device (download/unzip via GUI, or SCP if headless)
Screenshot: Download/transfer option
If using the automation toolkit, extract the bundle:
mkdir ~/svsan
cd ~/svsan
unzip ~/Downloads/SvSAN_Automation_Toolkit.zip
cd SvSAN-Automation-Toolkit
python3 nsh_gui_installer.py
Screenshot: Toolkit installer
6Patch the ELF interpreter paths (Bookworm)
Install patchelf:
sudo apt install patchelf
Patch the binaries:
sudo patchelf --set-interpreter /lib/ld-linux-armhf.so.3 /opt/stormagic/bin/smdiscod
sudo patchelf --set-interpreter /lib/ld-linux-armhf.so.3 /opt/stormagic/bin/smclusterd
sudo patchelf --set-interpreter /lib/ld-linux-armhf.so.3 /opt/stormagic/bin/exlog
sudo patchelf --set-interpreter /lib/ld-linux-armhf.so.3 /opt/stormagic/bin/smc_state
Alternatively, use the provided script in the toolkit:
sudo bash scripts/fix_interpreter.sh
7Start and enable the service
Start/restart and enable the witness service:
sudo systemctl restart StorMagicNSH
Check the service status:
sudo systemctl status StorMagicNSH
You should now see smdisco and smclusterd running.
Screenshot: Service running
8Verify service
Check that the service is listening on UDP ports:
sudo ss -ulpn | grep smdisc
Expected output includes lines like:
Screenshot: Expected ss output
9Utilize the witness (SvHCI)
In SvHCI, confirm the witness appears under the Discovery tab or add it manually by IP/FQDN. If it is not already discovered, add it as an entry on both hosts.
Screenshot: Add discovery entry
Screenshot: Witness appears in discovery
On the Discovery tab, edit the cluster, select the new witness, and apply.
Screenshot: Select witness for cluster
Verify the cluster witness is the Raspberry Pi.
Screenshot: Cluster witness updated
In the Targets tab, confirm targets are monitored by this witness.
Screenshot: Targets monitored
- If DNS resolution is unavailable, use static IP discovery.
- Ensure firewalls/VLANs do not block UDP traffic to/from the witness: SvSAN 6.3.x - Port Numbers – StorMagic
- If interpreter patching is skipped, daemons may fail with “cannot execute: required file not found”.
Screenshot: Example troubleshooting view
For further information, contact support@stormagic.com.
Comments
0 comments
Article is closed for comments.