Disable lz4 compression as the kernel doesnt support it

This commit is contained in:
Audiobuzz
2026-06-14 10:26:23 +00:00
parent 2a09476649
commit 754eced171
2 changed files with 19 additions and 4 deletions
+9
View File
@@ -128,6 +128,15 @@ boot LAN.
- `nvme_tcp`/`nvme_fabrics` must be loaded before `/dev/nvme-fabrics` exists
(dracut's `nvmf` module does this in a normal boot; at `rd.break` modprobe
manually).
- The target Rocky 9 kernel's erofs is built **without
`CONFIG_EROFS_FS_ZIP`** — mounting a compressed image fails `erofs: lz4
algorithm isn't enabled`, which silently blocks the root mount. **Fixed:**
`extract-artifacts.sh` now builds the erofs **uncompressed** (`mkfs.erofs`
without `-z`). Tradeoff: larger rootfs namespace + more NVMe/TCP bandwidth
per read. Re-enable compression only against a kernel verified to have
`EROFS_FS_ZIP` (`grep CONFIG_EROFS /boot/config-$(uname -r)`). This is the
CLAUDE.md bench-verify item ("erofs module availability on the target RHEL
kernel"). Larger image size also feeds the "shrink the rootfs" angle of #7.
- SPDK: add the listener to the discovery subsystem explicitly
(`nqn.2014-08.org.nvmexpress.discovery`) to silence the deprecation warning.
+10 -4
View File
@@ -56,11 +56,17 @@ tar -C "$WORK/root" --numeric-owner -xpf "$WORK/rootfs.tar"
rm -rf "$WORK/root/boot/"* "$WORK/rootfs.tar" # diskless hosts don't need /boot
echo "==> Building reproducible erofs image"
# -T0 + fixed UUID => deterministic output => stable dm-verity root hash
# for identical input trees. lz4hc: good ratio, cheap decompress; saves
# fabric bandwidth (and MACsec cycles) on every read.
# UNCOMPRESSED on purpose: the target Rocky 9 kernel's erofs is built without
# CONFIG_EROFS_FS_ZIP, so mounting a compressed image fails at boot with
# "erofs: lz4 algorithm isn't enabled" (verified on the bench — the root mount
# never completes). An uncompressed image mounts with base CONFIG_EROFS_FS
# alone. Tradeoff: larger namespace + more NVMe/TCP bandwidth per read than the
# old `-z lz4hc`. Re-add compression (`-z lz4hc`, or zstd/deflate) ONLY against
# a kernel you've confirmed has EROFS_FS_ZIP (grep CONFIG_EROFS /boot/config-*).
# -T0 + fixed UUID keep output deterministic => stable dm-verity root hash for
# identical input trees.
FIXED_UUID="6c10a7f0-1d2e-4f5a-9b3c-000000000001"
mkfs.erofs -z lz4hc -T 0 -U "$FIXED_UUID" --all-root \
mkfs.erofs -T 0 -U "$FIXED_UUID" --all-root \
"$WORK/rootfs.erofs" "$WORK/root"
echo "==> Appending dm-verity hash tree (single-file / single-namespace layout)"