From c43e63ddb3f6e24996f63e07873bac423f22a612 Mon Sep 17 00:00:00 2001 From: Joshua Long <44989821+jmclong@users.noreply.github.com> Date: Mon, 26 Oct 2026 16:11:29 +0000 Subject: [PATCH] fix(helm): keep NVMe filesystems compatible with Ubuntu 22.04 Disable newer ext4 features for freshly formatted NVMe devices and RAID arrays while preserving existing filesystem labels and data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e7adc4d-b2ae-4e92-9e76-2d857187198d --- helm/dacs-prereq/README.md | 12 ++++++++++++ helm/dacs-prereq/scripts/setup-raid.sh | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/helm/dacs-prereq/README.md b/helm/dacs-prereq/README.md index 6e26d00a..d3d19035 100644 --- a/helm/dacs-prereq/README.md +++ b/helm/dacs-prereq/README.md @@ -81,6 +81,11 @@ operations while retaining the image's tools. The script explicitly targets the host mount namespace and writes host configuration through `/proc/1/root`. Host `update-initramfs`, when available, runs in the host mount namespace. +Both single-disk and RAID0 formatting explicitly disable `orphan_file` and +`metadata_csum_seed`. This keeps the image-created ext4 filesystems compatible +with Ubuntu 22.04's e2fsck 1.46.5. The host `fstab` entry uses fsck pass `2`, so +the host can check the cache filesystem at boot. + ### Reboot Behavior **Managed OS (persistent root filesystem):** @@ -101,6 +106,13 @@ When the NVMe disks and their metadata are retained, the next setup run: Recovery depends on retention of the local disks and a successful setup run; this chart does not guarantee local-disk retention across node lifecycle events. +### Upgrade Compatibility + +Existing cache filesystems are reused without changing their features. +Upgrading the chart does not repair filesystems created with `orphan_file` +enabled. On Ubuntu 22.04, those filesystems need separate remediation before +the next node reboot to avoid a boot-time fsck failure. + ### Filesystem Label The script labels all ext4 filesystems it creates with `dacs`. This diff --git a/helm/dacs-prereq/scripts/setup-raid.sh b/helm/dacs-prereq/scripts/setup-raid.sh index d4dac85c..1e630ba6 100644 --- a/helm/dacs-prereq/scripts/setup-raid.sh +++ b/helm/dacs-prereq/scripts/setup-raid.sh @@ -20,6 +20,8 @@ set -euo pipefail readonly RAID_NAME="dacs" readonly FS_LABEL="dacs" +# Keep image-created filesystems compatible with Ubuntu 22.04's e2fsck. +readonly EXT4_FEATURES="^orphan_file,^metadata_csum_seed" readonly HOST_ROOT="/proc/1/root" MOUNT_POINT="${MOUNT_POINT:-/var/lib/ssd/cacheserver}" readonly NODE_HOSTNAME="${NODE_NAME:-$(uname -n 2>/dev/null || echo '')}" @@ -126,7 +128,7 @@ log "Found ${#UNUSED_DEVICES[@]} unused NVMe device(s): ${UNUSED_DEVICES[*]}" if [[ ${#UNUSED_DEVICES[@]} -eq 1 ]]; then DEVICE="${UNUSED_DEVICES[0]}" log "Formatting ${DEVICE} as ext4 (label '${FS_LABEL}')" - if ! mkfs.ext4 -F -L "${FS_LABEL}" "${DEVICE}"; then + if ! mkfs.ext4 -F -O "${EXT4_FEATURES}" -L "${FS_LABEL}" "${DEVICE}"; then log "ERROR: mkfs failed on ${DEVICE}." dump_diag exit 1 @@ -160,7 +162,7 @@ log "Waiting for RAID device..." sleep 5 log "Formatting ${RAID_DEVICE} as ext4 (label '${FS_LABEL}')" -if ! mkfs.ext4 -F -L "${FS_LABEL}" "${RAID_DEVICE}"; then +if ! mkfs.ext4 -F -O "${EXT4_FEATURES}" -L "${FS_LABEL}" "${RAID_DEVICE}"; then log "ERROR: mkfs failed." dump_diag exit 1