From: Zhihang Wei <wzh@ilbers.de>
To: Kasturi Shekar <kasturi.shekar@siemens.com>, isar-users@googlegroups.com
Subject: Re: [PATCH] isar-installer: add mdadm support and filter out RAID member disks
Date: Fri, 24 Oct 2025 17:57:00 +0200 [thread overview]
Message-ID: <a29ef5e5-064a-49bf-acbd-4628ad88665a@ilbers.de> (raw)
In-Reply-To: <20251016033421.1172746-1-kasturi.shekar@siemens.com>
Applied to next, thanks.
Best regards,
Zhihang
On 10/16/25 05:34, 'Kasturi Shekar' via isar-users wrote:
> The installer now conditionally includes the `mdadm` package,
> based on the presence of the `raid` feature in `MACHINE_FEATURES`
> Additionally, the device selection dialog is updated to exclude
> physical disks that are members of a RAID volume.
>
> Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com>
> ---
> .../images/isar-image-installer.bb | 2 ++
> .../files/usr/bin/deploy-image-wic.sh | 18 ++++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/meta-isar/recipes-core/images/isar-image-installer.bb b/meta-isar/recipes-core/images/isar-image-installer.bb
> index db379f5d..300591ab 100644
> --- a/meta-isar/recipes-core/images/isar-image-installer.bb
> +++ b/meta-isar/recipes-core/images/isar-image-installer.bb
> @@ -26,3 +26,5 @@ IMAGER_INSTALL:wic:append = " ${SYSTEMD_BOOTLOADER_INSTALL}"
> IMAGE_INSTALL += "deploy-image-service"
>
> IMAGE_INSTALL:remove = "expand-on-first-boot"
> +
> +IMAGE_PREINSTALL:append = "${@ bb.utils.contains('MACHINE_FEATURES', 'raid', ' mdadm', '', d) }"
> 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 333762f1..778370b1 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
> @@ -60,6 +60,24 @@ if ! $installer_unattended; then
> devices="$devices $mmc_devices"
>
> for device in $devices; do
> + is_raid_member=0
> +
> + if [ -d "/sys/block/$device/holders" ] && [ ! -d "/sys/block/$device/md" ]; then
> + for holder_path in /sys/block/$device/holders/*; do
> + holder_name=$(basename "$holder_path")
> + case "$holder_name" in
> + md[0-9]*)
> + is_raid_member=1
> + break
> + ;;
> + esac
> + done
> + fi
> +
> + if [ "$is_raid_member" -eq 1 ]; then
> + continue # Skip RAID member disks
> + fi
> +
> case $device in
> loop*)
> # skip loop device
--
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/a29ef5e5-064a-49bf-acbd-4628ad88665a%40ilbers.de.
prev parent reply other threads:[~2025-10-24 15:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 3:34 'Kasturi Shekar' via isar-users
2025-10-24 15:57 ` Zhihang Wei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a29ef5e5-064a-49bf-acbd-4628ad88665a@ilbers.de \
--to=wzh@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=kasturi.shekar@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox