Prevent inactive RAID devices from appearing in the installation target menu.
Eliminate user confusion previously caused by listing inactive devices,
even after RAID member disks were filtered.
Update logic to check the RAID array_state. Ensure only 'active' or 'clean'
RAID devices are listed; skip all inactive ones.
Signed-off-by: Kasturi Shekar <
kasturi...@siemens.com>
---
.../deploy-image/files/usr/bin/deploy-image-wic.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
index a5d171a2..b5ea8119 100755
--- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
+++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
@@ -78,6 +78,17 @@ if ! $installer_unattended; then
continue # Skip RAID member disks
fi
+ if [[ "$device" == md* ]]; then
+ if [ -f "/sys/block/$device/md/array_state" ]; then
+ state=$(cat /sys/block/$device/md/array_state)
+ if [ "$state" != "active" ] && [ "$state" != "clean" ]; then
+ continue
+ fi
+ else
+ continue
+ fi
+ fi
+
case $device in
loop*)
# skip loop device
--
2.39.5