From 0927375b35af5a787183efadcd105386f32ee5de6afb16620ae0e27618a11a2a Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 24 Sep 2012 05:24:58 +0000 Subject: [PATCH] - mdmon-takeover.fix find-free-devnum.fix mapfile-rebuild.fix udev-offroot Fix various issues will installation on IMSM RAID arrays, booting from those arrays, and clean shutdown when such an array is used for '/'. (bnc#752107 bnc#732294 bnc#770351) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=73 --- boot.md | 2 +- mdadm.changes | 18 ++++++++++++++++++ mdadm.spec | 6 ------ mkinitrd-setup.sh | 9 +++++---- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/boot.md b/boot.md index 79cf8bc..23a8948 100644 --- a/boot.md +++ b/boot.md @@ -23,7 +23,7 @@ # Provides: boot.md # Required-Start: boot.udev boot.rootfsck # Required-Stop: $null -# Should-Start: boot.scsidev boot.multipath +# Should-Start: boot.scsidev boot.multipath udev-trigger # Should-Stop: boot.scsidev boot.multipath # Default-Start: B # Default-Stop: diff --git a/mdadm.changes b/mdadm.changes index 16b7419..09f51dd 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Sep 20 06:03:45 UTC 2012 - nfbrown@suse.com + +- mdmon-takeover.fix + find-free-devnum.fix + mapfile-rebuild.fix + udev-offroot + Fix various issues will installation on IMSM + RAID arrays, booting from those arrays, and + clean shutdown when such an array is used for '/'. + (bnc#752107 bnc#732294 bnc#770351) + +- mkinitrd-setup.sh: allow use stable md device name + and allow it to have a ':' in it. (bnc#779087) + +- boot.md: make sure udev-trigger runs before + boot.md. (bnc#772286) + ------------------------------------------------------------------- Mon Aug 20 06:53:24 UTC 2012 - nfbrown@suse.com diff --git a/mdadm.spec b/mdadm.spec index 6b4ea5b..1f4b852 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -81,8 +81,6 @@ install -d $RPM_BUILD_ROOT/etc/cron.daily install -m 755 %{S:7} $RPM_BUILD_ROOT/etc/cron.daily/mdadm install -m 644 %{S:2} $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/ ln -sf ../../etc/init.d/mdadmd $RPM_BUILD_ROOT/%{_sbindir}/rcmdadmd -rm -rf $RPM_BUILD_ROOT/run/mdadm -mkdir -p $RPM_BUILD_ROOT/run/mdadm install -d $RPM_BUILD_ROOT/lib/udev/rules.d install -m 644 udev-md-raid.rules $RPM_BUILD_ROOT/lib/udev/rules.d/64-md-raid.rules install -d $RPM_BUILD_ROOT/lib/systemd/system-shutdown @@ -98,9 +96,6 @@ elif [ -x /sbin/mkinitrd ]; then fi %{fillup_and_insserv -y boot.md} -# If /run/mdadm is already a symlink, this will fail and will have -# to wait for next boot. -mkdir -p /run/mdadm || true %postun %restart_on_update mdadmd @@ -131,7 +126,6 @@ rm -rf $RPM_BUILD_ROOT %dir /lib/udev/devices %{_sbindir}/* %{_var}/adm/fillup-templates/sysconfig.mdadm -%ghost /run/mdadm %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-md.sh diff --git a/mkinitrd-setup.sh b/mkinitrd-setup.sh index 39bd043..1d4ba33 100644 --- a/mkinitrd-setup.sh +++ b/mkinitrd-setup.sh @@ -11,6 +11,7 @@ mdadm_conf= cont_list= md_devs= +declare -A md_conf # blockdev contains real devices (/dev/X) for root, resume, journal, dumb for bd in $blockdev ; do is_part_dev=false @@ -67,20 +68,20 @@ for bd in $blockdev ; do ;; /dev/*) mdconf="$(mdadm -Db "$container")\\n$mdconf" - cont_list="$cont_list $container" + cont_list="$cont_list $container" ;; [0-9a-f]*[0-9a-f]) if test -z "$mdadm_conf"; then mdadm_conf=$(mdadm --examine --brief --scan) fi mdconf="$(echo "$mdadm_conf" | grep "UUID=$container")\\n$mdconf" - cont_list="$cont_list $container" + cont_list="$cont_list $container" ;; *) echo "unrecognized container for $md_dev: $container" ;; esac - eval md_conf_${md_dev}=\"$mdconf\" + md_conf["$md_dev"]="$mdconf" root_md=1 done @@ -91,7 +92,7 @@ if [ -n "$root_md" ] ; then need_mdadm=1 echo "AUTO -all" > $tmp_mnt/etc/mdadm.conf for md in $md_devs; do - eval echo -e \"\$md_conf_$md\" >> $tmp_mnt/etc/mdadm.conf + echo "${md_conf["$md"]}" >> $tmp_mnt/etc/mdadm.conf done fi # Remember which arrays are needed for the root or swap device and assemble