On 7/10/26 11:29 PM, David C Rankin wrote:

  Now if there is just some way to get a message to that effect, that would solve the box appearing frozen issue. (I'd even take a "WAIT Dummy, / is resyncing...")

..


If you use dracut to build the initrd, then you can make a "pre-mount" script to do what you want.

Rough outline would be :

(1) make sure grep / sleep are included in the initrd:

  Create /etc/dracut.conf.d/99-mdadm-check.conf
  Or any other ".conf" file in that directory.

  And add this line to it:

  install_items+=" /usr/bin/grep /usr/bin/sleep "

(2) Add a pre-mount script to check on mdadm state:

    mkdir -p /usr/lib/dracut/hooks/pre-mount/

    Add the script: /usr/lib/dracut/hooks/pre-mount/99-check-mdadm.sh

#!/bin/sh
# /usr/lib/dracut/hooks/pre-mount/99-check-mdadm.sh
# Check if mdadm is resyncing
#
if grep -qE "resync|recovery|check" /proc/mdstat; then
    echo "*** >>> RAID Array is Resyncing / Rebuilding <<<"
    cat /proc/mdstat
    sleep 10
fi

Untested but should work okay.


--
Gene

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to