Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions helm/dacs-prereq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):**
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions helm/dacs-prereq/scripts/setup-raid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<unknown>')}"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading