Skip to content

Deploying BeeGFS for HPC-style workloads on AlmaLinux 9 — management + metadata + storage + client

Stand up a BeeGFS cluster on AlmaLinux 9 — management node, metadata node, two storage nodes, kernel client. Tuned for parallel-IO HPC workloads.

You’re handed a small HPC tier: a dozen compute nodes that run nightly simulation jobs, all of them blocked on I/O against a single NFS server that has stopped scaling. The compute nodes spend more time waiting than computing, the operator inherits an inscrutable script that runs lustre_rsync against a backup tier that nobody can describe, and the upstream team asks for “the same storage but ten times faster.” The honest answer for an HPC-shaped workload is a parallel filesystem — one that stripes a single file across many storage targets so a parallel job reads from N targets at once instead of one. BeeGFS is the cheapest parallel filesystem to stand up correctly on commodity hardware, and unlike Lustre it doesn’t demand a kernel-patched MDS host. This article stands up a 4-role BeeGFS cluster on AlmaLinux 9 with one management, one metadata, two storage targets, and a kernel client.

What’s happening

A BeeGFS cluster has four service types that you almost always run as separate processes (sometimes co-located on small clusters): the management service (beegfs-mgmtd) is a registry — it tells everyone where everyone else is, and it does not sit on the I/O path; the metadata service (beegfs-meta) holds directory entries and file→stripe maps, typically backed by an extended-attribute-aware filesystem (XFS or ext4 with user_xattr); the storage service (beegfs-storage) holds the actual chunks of data on storage targets, usually one target per backing disk; and the client (beegfs-client, a kernel module) maps /mnt/beegfs to the cluster and stripes I/O across the storage targets in parallel. The key BeeGFS concept is stripe pattern: each file is split into chunks (default 512 KB), and consecutive chunks are placed on different storage targets (default numtargets=4) so reading the whole file means parallel pulls from four backends. The mistakes that kill BeeGFS clusters: leaving the metadata service on the same disk as the OS (metadata I/O competes with logs and updates), using a single storage target so the stripe pattern degenerates to a single backend, and skipping the storage-buddy-mirroring config so a single storage-target loss takes that file’s chunk offline. Pro tip: for new clusters, turn on buddy mirroring on the storage targets even if it halves your usable capacity — losing a chunk on an unmirrored target means losing the file.

How to verify

Service registration from the management node:

beegfs-check-servers
# Management
#    mgmt-01 [ID: 1]: reachable at 10.50.0.11:8008 (protocol: TCP)
# Metadata
#    meta-01 [ID: 1]: reachable at 10.50.0.12:8005 (protocol: TCP)
# Storage
#    stor-01 [ID: 1]: reachable at 10.50.0.13:8003 (protocol: TCP)
#    stor-02 [ID: 1]: reachable at 10.50.0.14:8003 (protocol: TCP)

Storage target list — each target should show its capacity, free space, and a healthy state:

beegfs-df
# METADATA SERVERS:
# TargetID   Pool        Total      Free   %Free  ITotal   IFree  %IFree
#        1   normal    100.0GiB   99.8GiB    99%  3.2M     3.2M    99%
# STORAGE TARGETS:
# TargetID   Pool       Total      Free   %Free  ITotal   IFree  %IFree
#       11   normal    4.0TiB   4.0TiB     99%   1.0M     1.0M    99%
#       21   normal    4.0TiB   4.0TiB     99%   1.0M     1.0M    99%

Stripe verification on a real file — should show numtargets > 1 after a write to a striped directory:

beegfs-ctl --getentryinfo /mnt/beegfs/test.bin
# Entry type: file
# EntryID: 1-...
# Metadata node: meta-01
# Stripe pattern details:
#   Type: RAID0
#   Chunksize: 512K
#   Number of storage targets: desired: 4; actual: 2
#   Storage targets: 11, 21

End-to-end performance smoke test (bigger numbers mean BeeGFS is actually striping):

dd if=/dev/zero of=/mnt/beegfs/test.bin bs=1M count=4096 oflag=direct status=progress
# 4294967296 bytes (4.3 GB) copied, 8.2 s, 524 MB/s  <- parallel writes to 2 targets

If beegfs-check-servers reports any node unreachable, fix the network or firewall before adding more nodes; if beegfs-df reports %Free 0% on one target and 99% on another, the metadata service is steering all new files to the same target — the stripe pattern is misconfigured.

The fix

Save the script as /root/setup-beegfs-node.sh and run it on each node with NODE_ROLE set to management, metadata, storage, or client. The script does a full AlmaLinux 9 install: base hardening (SELinux enforcing — BeeGFS works correctly with it on as of 7.4, firewalld with role-specific ports, fail2ban, dnf-automatic, SSH key-only), kernel/sysctl tuning for parallel I/O, the BeeGFS YUM repo, role-specific packages and configuration, an XFS backing store for the metadata and storage targets on a dedicated device, and the kernel client built via DKMS on the client role.

#!/usr/bin/env bash
set -euo pipefail

### AlmaLinux 9 BeeGFS 7.4 installer
### Role per node: management, metadata, storage, or client

if [[ "$(id -u)" -ne 0 ]]; then
  echo "Run as root."
  exit 1
fi

# === EDIT PER NODE ===
NODE_NAME="bee-mgmt"            # bee-mgmt / bee-meta / bee-stor-01 / bee-stor-02 / bee-client
NODE_IP="10.50.0.11"
NODE_ROLE="management"          # management | metadata | storage | client
MGMT_HOSTNAME="bee-mgmt"
MGMT_IP="10.50.0.11"
META_DEV="/dev/sdb"             # only on metadata role
STORAGE_DEV="/dev/sdb"          # only on storage role
META_MOUNT="/data/beegfs/meta"
STORAGE_MOUNT="/data/beegfs/storage"
CLIENT_SUBNET="10.50.0.0/16"
# =====================

echo
echo "========================================"
echo "BeeGFS ${NODE_ROLE} node ${NODE_NAME} (${NODE_IP})"
echo "========================================"
echo

echo "==> Hosts file"
if ! grep -q "${MGMT_HOSTNAME}" /etc/hosts; then
  echo "${MGMT_IP} ${MGMT_HOSTNAME}" >> /etc/hosts
fi
hostnamectl set-hostname "${NODE_NAME}"

echo "==> Updating base OS"
dnf -y update
dnf -y install epel-release
dnf -y install vim curl wget chrony fail2ban dnf-automatic \
  policycoreutils-python-utils lsof tcpdump bind-utils tar gzip \
  iproute net-tools jq socat python3 lvm2 xfsprogs \
  kernel-devel-$(uname -r) kernel-headers-$(uname -r) gcc make perl

systemctl enable --now chronyd

echo "==> SELinux"
sed -i 's/^SELINUX=.*/SELINUX=enforcing/' /etc/selinux/config
setenforce 1 || true

echo "==> Sysctl tuning for parallel I/O"
cat > /etc/sysctl.d/99-beegfs.conf <<'SYSCTL'
vm.swappiness = 10
vm.dirty_background_ratio = 5
vm.dirty_ratio = 15
vm.min_free_kbytes = 524288
fs.file-max = 4194304
fs.aio-max-nr = 1048576
net.core.somaxconn = 4096
net.core.rmem_max = 268435456
net.core.wmem_max = 268435456
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.ipv4.tcp_rmem = 4096 87380 268435456
net.ipv4.tcp_wmem = 4096 87380 268435456
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_window_scaling = 1
SYSCTL
sysctl --system

cat > /etc/security/limits.d/99-beegfs.conf <<'LIMITS'
root soft nofile 1048576
root hard nofile 1048576
* soft nofile 1048576
* hard nofile 1048576
LIMITS

echo "==> SSH hardening"
sed -i 's|^[#[:space:]]*PermitRootLogin.*|PermitRootLogin prohibit-password|' /etc/ssh/sshd_config
sed -i 's|^[#[:space:]]*PasswordAuthentication.*|PasswordAuthentication no|' /etc/ssh/sshd_config
sshd -t && systemctl restart sshd

echo "==> fail2ban + dnf-automatic"
cat > /etc/fail2ban/jail.d/sshd.local <<'F2B'
[sshd]
enabled = true
port = ssh
backend = systemd
maxretry = 4
findtime = 10m
bantime = 1h
F2B
systemctl enable --now fail2ban

cat > /etc/dnf/automatic.conf <<'DNFAUTO'
[commands]
upgrade_type = security
random_sleep = 900
download_updates = yes
apply_updates = yes
[emitters]
emit_via = stdio
DNFAUTO
systemctl enable --now dnf-automatic.timer

echo "==> firewalld per role"
dnf -y install firewalld
systemctl enable --now firewalld
firewall-cmd --permanent --add-service=ssh

case "${NODE_ROLE}" in
  management)
    firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=${CLIENT_SUBNET} port port=8008 protocol=tcp accept"
    firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=${CLIENT_SUBNET} port port=8008 protocol=udp accept"
    ;;
  metadata)
    firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=${CLIENT_SUBNET} port port=8005 protocol=tcp accept"
    firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=${CLIENT_SUBNET} port port=8005 protocol=udp accept"
    ;;
  storage)
    firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=${CLIENT_SUBNET} port port=8003 protocol=tcp accept"
    firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=${CLIENT_SUBNET} port port=8003 protocol=udp accept"
    ;;
  client)
    # No inbound — clients only initiate.
    :
    ;;
esac
firewall-cmd --reload

echo "==> Adding BeeGFS YUM repo"
curl -fsSL https://www.beegfs.io/release/beegfs_7.4/dists/beegfs-rhel9.repo \
  -o /etc/yum.repos d/beegfs.repo 2>/dev/null || \
curl -fsSL https://www.beegfs.io/release/beegfs_7.4/dists/beegfs-rhel9.repo \
  -o /etc/yum.repos.d/beegfs.repo
rpm --import https://www.beegfs.io/release/beegfs_7.4/gpg/GPG-KEY-beegfs
dnf -y makecache

prepare_backing_xfs() {
  local dev="$1" mnt="$2"
  if [[ ! -b "${dev}" ]]; then
    echo "ERROR: ${dev} not present. Edit the device variable and rerun."
    exit 1
  fi
  if ! blkid "${dev}" | grep -q xfs; then
    wipefs -a "${dev}"
    mkfs.xfs -i size=512 -L "beegfs-$(basename ${mnt})" "${dev}"
  fi
  mkdir -p "${mnt}"
  UUID=$(blkid -s UUID -o value "${dev}")
  if ! grep -q "${UUID}" /etc/fstab; then
    echo "UUID=${UUID} ${mnt} xfs defaults,noatime,nodiratime,inode64 0 2" >> /etc/fstab
  fi
  mount -a
}

case "${NODE_ROLE}" in
  management)
    echo "==> Installing beegfs-mgmtd"
    dnf -y install beegfs-mgmtd beegfs-utils beegfs-helperd

    /opt/beegfs/sbin/beegfs-setup-mgmtd -p /var/lib/beegfs/mgmtd -C -S "${NODE_NAME}"
    systemctl enable --now beegfs-mgmtd
    ;;

  metadata)
    echo "==> Installing beegfs-meta on dedicated backing store"
    dnf -y install beegfs-meta beegfs-utils beegfs-helperd

    prepare_backing_xfs "${META_DEV}" "${META_MOUNT}"

    /opt/beegfs/sbin/beegfs-setup-meta -p "${META_MOUNT}" -s 1 -m "${MGMT_HOSTNAME}"
    systemctl enable --now beegfs-meta
    ;;

  storage)
    echo "==> Installing beegfs-storage with one target"
    dnf -y install beegfs-storage beegfs-utils beegfs-helperd

    prepare_backing_xfs "${STORAGE_DEV}" "${STORAGE_MOUNT}"

    # storage server id from hostname suffix
    STOR_ID="${NODE_NAME##*-}"
    STOR_ID="${STOR_ID#0}"
    [[ -z "${STOR_ID}" ]] && STOR_ID=1
    TARGET_ID=$((STOR_ID * 10 + 1))

    /opt/beegfs/sbin/beegfs-setup-storage -p "${STORAGE_MOUNT}" \
      -s "${STOR_ID}" -i "${TARGET_ID}" -m "${MGMT_HOSTNAME}"
    systemctl enable --now beegfs-storage
    ;;

  client)
    echo "==> Installing beegfs-client (DKMS) + helperd + utils"
    dnf -y install beegfs-client beegfs-helperd beegfs-utils

    /opt/beegfs/sbin/beegfs-setup-client -m "${MGMT_HOSTNAME}"

    cat > /etc/beegfs/beegfs-mounts.conf <<EOF
/mnt/beegfs /etc/beegfs/beegfs-client.conf
EOF

    mkdir -p /mnt/beegfs
    systemctl enable --now beegfs-helperd
    systemctl enable --now beegfs-client

    echo "==> Waiting for mount"
    for i in {1..30}; do
      if mountpoint -q /mnt/beegfs; then
        break
      fi
      sleep 2
    done
    ;;

  *)
    echo "ERROR: NODE_ROLE must be management, metadata, storage, or client. Got: ${NODE_ROLE}"
    exit 1
    ;;
esac

echo
echo "========================================"
echo "DONE on ${NODE_NAME} (${NODE_ROLE})"
echo "========================================"
echo

case "${NODE_ROLE}" in
  management)
    sleep 5
    beegfs-check-servers || true
    echo
    echo "After metadata + storage are up, set a stripe pattern from this node:"
    echo "  beegfs-ctl --setpattern --chunksize=512k --numtargets=4 /mnt/beegfs"
    ;;
  metadata)
    sleep 5
    systemctl status beegfs-meta --no-pager | head -15
    ;;
  storage)
    sleep 5
    systemctl status beegfs-storage --no-pager | head -15
    ;;
  client)
    sleep 5
    mount | grep beegfs || true
    df -h /mnt/beegfs || true
    echo
    echo "From the management node:"
    echo "  beegfs-ctl --setpattern --chunksize=512k --numtargets=4 /mnt/beegfs"
    ;;
esac

echo
echo "Repeat on the other nodes with their NODE_NAME / NODE_IP / NODE_ROLE."

Run on the management node first, then metadata, then both storage targets, then the client. After the client mounts /mnt/beegfs, run beegfs-ctl --setpattern --chunksize=512k --numtargets=4 /mnt/beegfs from any node — without this, new files default to whatever the metadata node serves and you can find yourself with single-target placement. With two storage nodes the stripe will fall back to two targets (since actual is bounded by what’s available), and as you add storage nodes the stripe widens automatically.

The single-stripe-target failure scenario is the one to drill. Write a 4 GB file to a directory configured --numtargets=2, find which two targets it landed on (beegfs-ctl --getentryinfo), simulate a target loss by stopping beegfs-storage on one of them, and confirm that read attempts hang waiting for the missing target. This is the expected behaviour without buddy mirroring, and it’s why production-grade BeeGFS clusters enable storage-buddy-mirroring (beegfs-ctl --addmirrorgroup --primary=11 --secondary=21) — it doubles your target count but converts target loss from “missing file” to “I/O continues on the survivor.”

A note on RDMA: BeeGFS supports RoCE and IB out of the box; if your cluster has 25 GbE+ or InfiniBand, enable connTcpOnlyFilter in the configs and watch BeeGFS auto-negotiate RDMA to halve the read/write latency. On commodity 10 GbE, TCP is fine and the tunings above (TCP window scaling, large rmem/wmem) are what you actually need.

For an HPC parallel-filesystem tier you don’t have to operate yourself, our team designs and runs BeeGFS and Lustre clusters under environment management on top of cloud compute — book a scoping call if you’d like us to take the storage tier off your plate.