| Message ID | 20251031104826.1711686-1-kasturi.shekar@siemens.com |
|---|---|
| State | Accepted, archived |
| Headers | show |
| Series | isar-installer: skip inactive/invalid RAID devices in target detection | expand |
Applied to next, thanks. Best regards, Zhihang On 10/31/25 11:48, 'Kasturi Shekar' via isar-users wrote: > 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
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
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(+)