Deploy the full stack: RDMA fabric, Corosync/Pacemaker, OCFS2, Voltron.
End-to-end deployment of a Voltron cluster: the RDMA fabric, the Corosync/Pacemaker stack, a shared OCFS2 filesystem on top of it, and finally the Voltron kernel module + control daemon.
This guide uses a 2-node example; extend the lists for more nodes.
| Role | Hostname | RDMA/cluster IP | NIC |
|---|---|---|---|
| node 1 | vn1 | 10.0.0.1/24 | ConnectX-3/-4 |
| node 2 | vn2 | 10.0.0.2/24 | ConnectX-3/-4 |
Order matters. The layers stack: RDMA + IP → Corosync (membership) → Pacemaker + DLM → OCFS2 → Voltron. Bring them up in that order; tear down in reverse.
Fencing/STONITH: a real shared-disk cluster needs fencing to prevent split-brain corruption. The lab steps below disable it to get going; do not run production OCFS2 without fencing.
On every node:
kernel-src/ (with INFINIBAND, the Mellanox mlx4/mlx5 drivers, OCFS2_FS, CONFIGFS_FS, PSI, DLM, cgroups), installed and booted. See docs/BUILD.md./dev/sdb.Debian/Ubuntu:
sudo apt install corosync pacemaker pcs dlm-controld ocfs2-tools \
rdma-core ibverbs-utils iproute2 libcpg-dev
RHEL/Rocky/Alma:
sudo dnf install corosync pacemaker pcs dlm ocfs2-tools \
rdma-core libibverbs-utils iproute corosynclib-devel
InfiniBand-mode fabric only (adds the subnet manager + IPoIB tools):
sudo apt install opensm infiniband-diags # RHEL: sudo dnf install opensm infiniband-diags
/etc/hosts on all nodes: `` 10.0.0.1 vn1 10.0.0.2 vn2 rdma_cm always resolves peers by IP, so every node needs an IP on an RDMA-capable interface regardless of the link layer. First decide the link layer per port, then follow the matching sub-section. (CX-3 ports can be either; CX-4 is typically Ethernet.)
# CX-3: sudo modprobe mlx4_ib CX-4: sudo modprobe mlx5_ib rdma link show # expect mlx*_0/1 ... state ACTIVE ibv_devinfo | grep -i link_layer # Ethernet => RoCE (1a); InfiniBand => IB (1b)
Assign the cluster IP directly on the Mellanox netdev; no subnet manager needed.
sudo ip addr add 10.0.0.1/24 dev <mlx-netdev> # .2 on vn2 sudo ip link set <mlx-netdev> up ping 10.0.0.2 # basic IP reachability
See docs/TESTING.md for the CX-3 Ethernet/RoCE port-type switch.
A native-IB fabric is dead until a Subnet Manager assigns LIDs and programs the switches. Use a managed switch's built-in SM, or run OpenSM on at least one node (two for redundancy).
sudo apt install opensm # (RHEL: sudo dnf install opensm) # bind OpenSM to the HCA port GUID (from `ibstat`); one line per managed port: sudo sed -i 's/^# guid .*/guid 0x0002c903000xxxxx/' /etc/opensm/opensm.conf 2>/dev/null || true sudo systemctl enable --now opensm sudo ibstat # Port state must become 'Active' (was 'Initializing') sudo sminfo # shows the acting master SM
For two SMs, set different SMPriority (higher wins master; the other stands by).
IP over InfiniBand (IPoIB) gives rdma_cm the IP addresses it resolves:
sudo modprobe ib_ipoib ip link show | grep ib # expect ib0 (and ib1 for the 2nd port) sudo ip link set ib0 mode datagram # or 'connected' for a larger MTU (cluster-wide, consistent) sudo ip addr add 10.0.0.1/24 dev ib0 # .2 on vn2 sudo ip link set ib0 up ping 10.0.0.2
Keep the IPoIB mode (datagram vs connected) and MTU identical on every node. connected mode allows an MTU up to 65520 and usually higher throughput.
ibv_devinfo -v | grep -iE 'GID|link_layer|state' # or: show_gids (rdma-core) rdma link show # all ports ACTIVE
rdma_cm picks the right GID from the source-IP route automatically. Use the IP you assigned above (<mlx-netdev> for RoCE, ib0 for IB) as the node addr everywhere below.
The same 10.0.0.0/24 subnet carries Corosync, OCFS2/DLM, and Voltron's RDMA data plane.
Corosync is the single source of cluster membership — Pacemaker, the DLM, OCFS2, and Voltron all derive from it.
sh sudo corosync-keygen # writes /etc/corosync/authkey sudo scp /etc/corosync/authkey vn2:/etc/corosync/authkey sudo chmod 400 /etc/corosync/authkey /etc/corosync/corosync.conf (identical on all nodes): `` totem { version: 2 cluster_name: voltron transport: knet crypto_cipher: aes256 crypto_hash: sha256 } nodelist { node { ring0_addr: 10.0.0.1 name: vn1 nodeid: 1 } node { ring0_addr: 10.0.0.2 name: vn2 nodeid: 2 } } quorum { provider: corosync_votequorum two_node: 1 # lab: allow quorum with 2 nodes } logging { to_syslog: yes } ` > Use the **Corosync nodeid** as the Voltron local_id` later, so the two > membership views agree.sh sudo systemctl enable --now corosync sudo corosync-cfgtool -s # ring state sudo corosync-quorumtool -l # both nodes present + quorate OCFS2's "pcmk" stack means the kernel DLM (fs/dlm) driven by dlm_controld, managed as a Pacemaker clone so it starts on every node.
sudo systemctl enable --now pacemaker
Lab cluster properties (disable STONITH for testing only):
sudo pcs property set stonith-enabled=false sudo pcs property set no-quorum-policy=freeze # safe for shared storage
Create the DLM clone (runs dlm_controld cluster-wide):
sudo pcs resource create dlm ocf:pacemaker:controld \
op monitor interval=30s on-fail=fence \
clone interleave=true ordered=true
sudo pcs status # dlm clone Started on vn1 and vn2
In production replacestonith-enabled=falsewith a real fence device (fence_ipmilan,fence_scsi, etc.) and keepon-fail=fence.
Create the filesystem with the pacemaker cluster stack stamped into it. Do this once, from a single node, on the shared device:
sudo mkfs.ocfs2 \
--cluster-stack=pcmk \
--cluster-name=voltron \
-N 8 \
--fs-feature-level=max-features \
-L voltron-shared \
/dev/sdb
--cluster-stack=pcmk / --cluster-name=voltron must match the Corosync cluster_name.-N 8 = node slots (set ≥ your max node count).Mount it as a Pacemaker clone so it mounts everywhere and is ordered after DLM:
sudo pcs resource create voltronfs ocf:heartbeat:Filesystem \
device="/dev/sdb" directory="/srv/shared" fstype="ocfs2" \
op monitor interval=20s \
clone interleave=true
# DLM must start before the FS, everywhere:
sudo pcs constraint order start dlm-clone then voltronfs-clone
sudo pcs constraint colocation add voltronfs-clone with dlm-clone
sudo pcs status
Verify on both nodes:
mount | grep ocfs2 # /dev/sdb on /srv/shared type ocfs2 echo hi | sudo tee /srv/shared/test-from-$(hostname) ls -l /srv/shared # each node sees the others' files
Manual alternative (no Pacemaker FS resource): withdlm_controldrunning you cansudo mount -t ocfs2 /dev/sdb /srv/shareddirectly; the kernel uses the pcmk stack recorded in the superblock. The clone is preferred for auto-mount and ordering.
On every node, build against the booted kernel and load:
cd src && make KDIR=/lib/modules/$(uname -r)/build sudo insmod voltron.ko ls /sys/kernel/voltron/ # cluster/ policy/ version default_mode
(Optionally install to /lib/modules/$(uname -r)/extra/ + depmod for modprobe/auto-load.)
The daemon ties Corosync membership + the OCFS2 admission check to the kernel node table. Build with the Corosync provider (requires libcpg-dev, installed above):
cd userspace/voltron-ctld && make # auto-enables corosync if libcpg present
/etc/voltron-ctld.conf on vn1 (mirror on vn2 with its own local_id):
local_id 1 # == Corosync nodeid sysfs_root /sys/kernel/voltron fs_mount /srv/shared # the OCFS2 mountpoint from step 4 provider corosync # learn membership from the CPG
Run as a service on each node:
sudo ./voltron-ctld -c /etc/voltron-ctld.conf
On start it will:
/srv/shared is OCFS2 and writable (admission check); if not, this node is marked not migration-eligible,local_node_id,/sys/kernel/voltron/cluster/nodes/.Verify the node table built itself up:
ls /sys/kernel/voltron/cluster/nodes/ # peer ids appear cat /sys/kernel/voltron/cluster/nodes/2/state # up cat /sys/kernel/voltron/cluster/nodes/2/fs_eligible
The Corosync provider is currently a stub; until it lands, useprovider staticwith an explicitpeerlist (seedocs/USAGE.md§4) — the rest of the setup is identical.
Start the listener on all nodes and connect peers (this becomes automatic once migration is wired; for now it is explicit / driven by ctld):
echo 18515 | sudo tee /sys/kernel/voltron/cluster/rdma_listen # every node echo 18515 | sudo tee /sys/kernel/voltron/cluster/nodes/2/connect # vn1 -> vn2 dmesg | tail # "node 2: connection established"
Opt specific cgroups in (everything is deny by default). Example: pin a batch slice to node 2.
sudo mkdir -p /sys/fs/cgroup/batch.slice CGID=$(stat -c %i /sys/fs/cgroup/batch.slice) echo "$CGID" | sudo tee /sys/kernel/voltron/policy/add_cgroup echo manual | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/mode echo 2 | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/target
See docs/USAGE.md §5 for auto/PSI policy and inheritance.
sudo corosync-quorumtool -l # membership quorate sudo pcs status # dlm + voltronfs clones Started mount | grep ocfs2 # OCFS2 mounted on all nodes ls /sys/kernel/voltron/cluster/nodes/ # Voltron sees peers dmesg | grep voltron # RDMA connects, no errors
Add vn3 (nodeid 3):
/etc/hosts updated everywhere.corosync.conf nodelist on all nodes; corosync-cfgtool -R to reload (or rolling restart).tunefs.ocfs2 -N <bigger> if needed).voltron.ko, start voltron-ctld (local_id 3). The new node appears in every node's cluster/nodes/.Remove a node:
voltron-ctld and rmmod voltron on it (peers drop it from the table).pcs cluster stop on it; remove from corosync.conf nodelist; reload.sudo rmmod voltron # all nodes sudo pcs resource disable voltronfs-clone # unmount OCFS2 sudo pcs resource disable dlm-clone sudo systemctl stop pacemaker corosync
| Symptom | Likely cause / fix |
|---|---|
OCFS2 mount hangs or cluster stack error | dlm_controld not running / stack mismatch. Confirm pcs status shows dlm Started and the FS was made with --cluster-stack=pcmk --cluster-name=voltron. |
Transport endpoint is not connected on FS | lost Corosync membership/quorum; check corosync-quorumtool. |
Voltron nodes/ stays empty | ctld not joining CPG, or provider static with no peers; check ctld logs. |
fs_eligible = 0 | OCFS2 not mounted/writable at fs_mount on that node. |
RDMA connect times out | no ACTIVE rdma link, wrong IP/subnet, or RoCE CM port blocked (UDP 4791). |
IB port stuck Initializing (never Active) | no Subnet Manager on the fabric — start OpenSM (step 1b) or enable the switch SM; check sminfo. |
ib0 interface missing | ib_ipoib not loaded, or the port is in Ethernet mode (then use the RoCE path 1a). |
| Node fenced/rebooted unexpectedly | fencing misconfig; in a lab set stonith-enabled=false (not for production). |
See also docs/USAGE.md (operation), docs/TESTING.md (RDMA bring-up), docs/CLUSTER.md (why membership is aligned with the OCFS2 stack).