From 94eee92d36e72aabf62f2cbc64ac56c09646e2d2 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Thu, 21 May 2026 23:44:53 +0200 Subject: [PATCH 1/2] Fix software RAID creation with newer mdadm versions Recent mdadm versions introduced an interactive prompt when creating RAID arrays without an explicit bitmap configuration: "To optimize recovery speed, it is recommended to enable write-intent bitmap, do you want to enable it now? [y/N]?" This behavior was introduced by upstream change: https://github.com/md-raid-utilities/mdadm/commit/e97c4e18c847803016aa60066cb6e57c528d83a6 In non-interactive environments such as Anaconda, this prompt blocks installation and causes RAID creation to hang. Fix this by explicitly enabling the internal bitmap when creating RAID arrays. --- misc/swraid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/swraid b/misc/swraid index 1391d8c8..bb176a3f 100644 --- a/misc/swraid +++ b/misc/swraid @@ -10,7 +10,7 @@ for dev in $DEVICES; do wipefs -a -f $dev done # must use older metadata format to leave disks looking normal for uefi -mdadm -C /dev/md/raid $DEVICES -n $NUMDEVS -e 1.0 -l $RAIDLEVEL +mdadm -C /dev/md/raid $DEVICES -n $NUMDEVS -e 1.0 -l $RAIDLEVEL -b internal # shut and restart array to prime things for anaconda mdadm -S -s mdadm --assemble --scan From 7d7f001826128519010a0c7dfb9207f2167c18ea Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 22 May 2026 02:00:41 +0200 Subject: [PATCH 2/2] Handle hostname-prefixed md device names and clear stale superblocks Newer mdadm versions may load arrays under names like `/dev/md/:raid` after reboot instead of `/dev/md/raid`. Detect both naming schemes when waiting for the array device and use the resolved path consistently when determining the underlying md device name. Also clear existing md superblocks before wiping signatures to avoid stale RAID metadata interfering with array creation or assembly. --- misc/swraid | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/misc/swraid b/misc/swraid index bb176a3f..e7860d47 100644 --- a/misc/swraid +++ b/misc/swraid @@ -7,6 +7,7 @@ NUMDEVS=$(for dev in $DEVICES; do echo wipefs -a -f $dev done|wc -l) for dev in $DEVICES; do + mdadm --zero-superblock $dev wipefs -a -f $dev done # must use older metadata format to leave disks looking normal for uefi @@ -15,9 +16,15 @@ mdadm -C /dev/md/raid $DEVICES -n $NUMDEVS -e 1.0 -l $RAIDLEVEL -b internal mdadm -S -s mdadm --assemble --scan ) -while [ ! -e /dev/md/raid ]; do +while :; do + # newer mdraid verions might have : + TARGET_RAID=$(ls /dev/md/raid /dev/md/*:raid 2>/dev/null | head -n 1) + + [ -n "$TARGET_RAID" ] && break + echo 'Waiting on array to be linked...' sleep 0.5 done -readlink /dev/md/raid|sed -e 's/.*\///' > /tmp/installdisk +# Extract the underlying block device name (e.g., md127) using the captured path +readlink "$TARGET_RAID" | sed -e 's/.*\///' > /tmp/installdisk