forked from pool/mdadm
- 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
This commit is contained in:
parent
e99df50458
commit
0927375b35
2
boot.md
2
boot.md
@ -23,7 +23,7 @@
|
|||||||
# Provides: boot.md
|
# Provides: boot.md
|
||||||
# Required-Start: boot.udev boot.rootfsck
|
# Required-Start: boot.udev boot.rootfsck
|
||||||
# Required-Stop: $null
|
# Required-Stop: $null
|
||||||
# Should-Start: boot.scsidev boot.multipath
|
# Should-Start: boot.scsidev boot.multipath udev-trigger
|
||||||
# Should-Stop: boot.scsidev boot.multipath
|
# Should-Stop: boot.scsidev boot.multipath
|
||||||
# Default-Start: B
|
# Default-Start: B
|
||||||
# Default-Stop:
|
# Default-Stop:
|
||||||
|
@ -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
|
Mon Aug 20 06:53:24 UTC 2012 - nfbrown@suse.com
|
||||||
|
|
||||||
|
@ -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 755 %{S:7} $RPM_BUILD_ROOT/etc/cron.daily/mdadm
|
||||||
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
|
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
|
||||||
ln -sf ../../etc/init.d/mdadmd $RPM_BUILD_ROOT/%{_sbindir}/rcmdadmd
|
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 -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 -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
|
install -d $RPM_BUILD_ROOT/lib/systemd/system-shutdown
|
||||||
@ -98,9 +96,6 @@ elif [ -x /sbin/mkinitrd ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%{fillup_and_insserv -y boot.md}
|
%{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
|
%postun
|
||||||
%restart_on_update mdadmd
|
%restart_on_update mdadmd
|
||||||
@ -131,7 +126,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%dir /lib/udev/devices
|
%dir /lib/udev/devices
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
||||||
%ghost /run/mdadm
|
|
||||||
%dir /lib/mkinitrd
|
%dir /lib/mkinitrd
|
||||||
%dir /lib/mkinitrd/scripts
|
%dir /lib/mkinitrd/scripts
|
||||||
/lib/mkinitrd/scripts/setup-md.sh
|
/lib/mkinitrd/scripts/setup-md.sh
|
||||||
|
@ -11,6 +11,7 @@ mdadm_conf=
|
|||||||
cont_list=
|
cont_list=
|
||||||
md_devs=
|
md_devs=
|
||||||
|
|
||||||
|
declare -A md_conf
|
||||||
# blockdev contains real devices (/dev/X) for root, resume, journal, dumb
|
# blockdev contains real devices (/dev/X) for root, resume, journal, dumb
|
||||||
for bd in $blockdev ; do
|
for bd in $blockdev ; do
|
||||||
is_part_dev=false
|
is_part_dev=false
|
||||||
@ -67,20 +68,20 @@ for bd in $blockdev ; do
|
|||||||
;;
|
;;
|
||||||
/dev/*)
|
/dev/*)
|
||||||
mdconf="$(mdadm -Db "$container")\\n$mdconf"
|
mdconf="$(mdadm -Db "$container")\\n$mdconf"
|
||||||
cont_list="$cont_list $container"
|
cont_list="$cont_list $container"
|
||||||
;;
|
;;
|
||||||
[0-9a-f]*[0-9a-f])
|
[0-9a-f]*[0-9a-f])
|
||||||
if test -z "$mdadm_conf"; then
|
if test -z "$mdadm_conf"; then
|
||||||
mdadm_conf=$(mdadm --examine --brief --scan)
|
mdadm_conf=$(mdadm --examine --brief --scan)
|
||||||
fi
|
fi
|
||||||
mdconf="$(echo "$mdadm_conf" | grep "UUID=$container")\\n$mdconf"
|
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"
|
echo "unrecognized container for $md_dev: $container"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
eval md_conf_${md_dev}=\"$mdconf\"
|
md_conf["$md_dev"]="$mdconf"
|
||||||
root_md=1
|
root_md=1
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ if [ -n "$root_md" ] ; then
|
|||||||
need_mdadm=1
|
need_mdadm=1
|
||||||
echo "AUTO -all" > $tmp_mnt/etc/mdadm.conf
|
echo "AUTO -all" > $tmp_mnt/etc/mdadm.conf
|
||||||
for md in $md_devs; do
|
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
|
done
|
||||||
fi
|
fi
|
||||||
# Remember which arrays are needed for the root or swap device and assemble
|
# Remember which arrays are needed for the root or swap device and assemble
|
||||||
|
Loading…
Reference in New Issue
Block a user