public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-installer: skip inactive/invalid RAID devices in target detection
@ 2025-10-31 10:48 'Kasturi Shekar' via isar-users
  0 siblings, 0 replies; only message in thread
From: 'Kasturi Shekar' via isar-users @ 2025-10-31 10:48 UTC (permalink / raw)
  To: isar-users; +Cc: Kasturi Shekar

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.shekar@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

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251031104826.1711686-1-kasturi.shekar%40siemens.com.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-31 10:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-31 10:48 [PATCH] isar-installer: skip inactive/invalid RAID devices in target detection 'Kasturi Shekar' via isar-users

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox