TECHNICAL CASE STUDY · Linux · Storage automation

Bare-metal storage tooling

Operational work deserves good tools.

Implemented operations tooling

FROM THE IMPLEMENTATION

Reject critical system mount locations

Bash · SELECTED SOURCE
if [[ "$MOUNT_PATH" == "/" ]]; then
    logerr "Mount path cannot be '/'."
    exit 1
fi

# Refuse to mount over critical system paths
for p in /boot /bin /sbin /lib /lib64 /etc /usr /var /root /home /proc /sys /dev /run; do
    if [[ "$MOUNT_PATH" == "$p" || "$MOUNT_PATH" == "$p/"* ]]; then
        logerr "Refusing to mount over system path: $MOUNT_PATH"
        exit 1
    fi
done
scripts/hetzner/raid0-data-dir.sh

Selected contiguous excerpt from data-array setup. The operator’s mount choice is checked against the filesystem root and protected system locations before the setup proceeds. These are generic Linux paths, with no machine or account identity.

THE ENGINEERING PROBLEM

What needed to work

Large node datasets turn storage administration into application reliability work. A new array is only useful when it mounts correctly after reboot; an expansion is unfinished until the filesystem and boot configuration agree. I built standalone Linux rescue-mode tools that expose the steps and support resuming interrupted work.

Constraints and requirements

  • Servers can have separate operating-system and data arrays, mixed disk vendors and slightly different nominal capacities. Device enumeration and leftover partition tables are poor substitutes for an explicit classification of what may be changed.
  • The operator may lose a remote session during a long reshape. Disk discovery, array changes, filesystem growth, boot metadata and network checks need distinct phases rather than one opaque command that is unsafe to repeat.

ARCHITECTURE & DESIGN

How the system fits together

  1. Read-only device discovery
  2. Explicit targets + root safeguards
  3. Staged RAID / expansion
  4. Resumable phases + filesystem work
  5. Verification + recovery

The setup utility discovers the existing operating-system layout and classifies data disks using filesystem, mount, RAID, logical-volume and swap evidence. It groups eligible devices by nominal capacity before proposing a new data array.

The expansion utility tracks completed phases, recognizes an ongoing reshape and already-added members, and continues through filesystem resizing and boot configuration. A persistent terminal session protects long operations from a routine connection drop when that facility is available.

Decisions and tradeoffs

Keep the operating system separate from the large data workload.

Root and data storage have different lifecycles. Array discovery must avoid treating members of the operating-system array as spare capacity.

Tradeoff Separate layouts require more discovery and mount handling. RAID0 also provides capacity and throughput rather than redundancy, so recovery still depends on a suitable rebuild or backup strategy.

Use persistent phases and explicit target previews.

A resumed operation needs to distinguish completed work from an active reshape, while the operator needs to inspect the proposed devices before changes.

Tradeoff Progress records and interactive checks add complexity and operational steps. They make interruption and destructive intent visible instead of hiding them.

PLANNING & EXECUTION

From requirements to working behavior

  1. I implemented standalone Bash utilities and operator documentation for setup and expansion. The setup path rejects critical system mount locations and uses a filesystem identifier for persistent mounting rather than assuming device names remain stable across rescue and normal boots.
  2. Before partitioning or reshaping, the expansion workflow records array membership, superblocks and partition-layout metadata for diagnosis. This metadata capture is separate from a data backup. After growth, it handles filesystem resizing, array assembly and initramfs configuration, then checks persistent mount references.
  3. Completed phases can be skipped on resume, and cleanup handles temporary mounts. RAID0 remains a capacity/throughput choice without disk-failure redundancy; the tools require deliberate execution against identified hardware.

VALIDATION & RECOVERY

How the behavior is checked

  • The retained source and runbooks expose dependency checks, device classification, an expansion-plan preview, confirmation points and post-operation array, filesystem and mount inspection. I present these as implemented safeguards, not a claim that destructive operations were exercised during portfolio preparation or that every hardware failure mode has a qualification result.

Implementation references

Repository-relative references identify the implementation behind this case study. Selected code excerpts are also available in the portfolio.

  • scripts/hetzner/README.md
  • scripts/hetzner/raid0-data-dir.sh
  • scripts/hetzner/raid0-expand.sh