From f879bcf219ff454d36d2cbbef7d285f23e0adc95 Mon Sep 17 00:00:00 2001 From: Blake Ridgway Date: Fri, 21 Aug 2026 21:10:47 -0500 Subject: [PATCH] fix: btrfs/init.sh blkid probe (blkid -O is --offset, not "on device") The deploy failed with: blkid: invalid offset argument '/dev/vda2': invalid argument error: /dev/vda2 is not a btrfs filesystem `blkid -p -O "$DEV"` passed the device path to --offset, so the probe always failed. Use a proper TYPE tag probe: blkid -p -s TYPE -o value "$DEV" # -> "btrfs" The guard now triggers only when the filesystem type is genuinely not btrfs. The UUID lookups in deploy-disk.sh (-s UUID -o value) were already correct. --- btrfs/init.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/btrfs/init.sh b/btrfs/init.sh index e133874..a6d0fa7 100755 --- a/btrfs/init.sh +++ b/btrfs/init.sh @@ -31,7 +31,8 @@ require_root "$0" "$@" command -v btrfs >/dev/null || { echo "error: btrfs-progs not installed" >&2; exit 1; } -if ! blkid -p -O "$DEV" | grep -q btrfs 2>/dev/null; then +# Note: `blkid -O` is --offset, not "on device". Use a TYPE tag probe. +if [[ "$(blkid -p -s TYPE -o value "$DEV" 2>/dev/null)" != "btrfs" ]]; then echo "error: $DEV is not a btrfs filesystem" >&2 exit 1 fi