OBS User unknown 2009-02-17 22:07:01 +00:00 committed by Git OBS Bridge
parent b3c8ec682c
commit 443f9b87af
4 changed files with 24 additions and 49 deletions

35
boot.md
View File

@ -118,9 +118,8 @@ case "$1" in
/sbin/udevadm settle --timeout="$MDADM_DEVICE_TIMEOUT"
fi
if test "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -e "$mdadm_CONFIG"; then
if ! grep -q '^[^#]*[^[:blank:]#]' $mdadm_CONFIG; then
# empty /etc/mdadm.conf, "unused"
if ! grep -qs '^[^#]*[^[:blank:]#]' $mdadm_CONFIG; then
# empty or missing /etc/mdadm.conf, "unused"
rc_status -u
else
$mdadm_BIN -A -s -c $mdadm_CONFIG
@ -128,36 +127,6 @@ case "$1" in
test $? -eq 0 -o $? -eq 2
rc_status -v
fi
else
# do auto-assemly only if /etc/mdadm.conf is missing
# run at boot-time, so a fixed tmp name is safe
rm -rf /tmp/mdadm.conf
if test "$BOOT_MD_USE_MDADM_CONFIG" = "part"; then
echo CREATE auto=part > /tmp/mdadm.conf
fi
if ! mdadm --examine --scan --config=partitions >>/tmp/mdadm.conf
then
echo "mdadm --examine --scan failed:"
cat /tmp/mdadm.conf
rm -f /tmp/mdadm.conf
rc_failed 1
rc_status -v
rc_exit
fi
chmod 0600 /tmp/mdadm.conf
if test -s /tmp/mdadm.conf; then
mdadm --assemble --scan --config=/tmp/mdadm.conf
# a status of 2 is not an error
test $? -eq 0 -o $? -eq 2
rc_status -v
else
# no partitions found, "unused"
rc_status -u
fi
rm -f /tmp/mdadm.conf
fi
;;
stop)
echo -n "Shutting down MD Raid "

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Feb 17 17:01:23 CET 2009 - mmarek@suse.cz
- disable auto-assemly in boot.md completely as it can collide with
dmraid (bnc#474652). If someone wants to auto-assemble md arrays
in the rescue system, they can run
'mdadm -Es -c partitions >mdadm.conf && mdadm -As -c mdadm.conf'
manually.
-------------------------------------------------------------------
Mon Feb 16 16:00:11 CET 2009 - mmarek@suse.cz

View File

@ -20,7 +20,7 @@
Name: mdadm
Version: 3.0
Release: 14
Release: 17
%define ver 3.0-devel2
BuildRequires: sgmltool
PreReq: %fillup_prereq %insserv_prereq
@ -162,6 +162,12 @@ rm -rf $RPM_BUILD_ROOT
/lib/mkinitrd/scripts/boot-md.sh
%changelog
* Tue Feb 17 2009 mmarek@suse.cz
- disable auto-assemly in boot.md completely as it can collide with
dmraid (bnc#474652). If someone wants to auto-assemble md arrays
in the rescue system, they can run
'mdadm -Es -c partitions >mdadm.conf && mdadm -As -c mdadm.conf'
manually.
* Mon Feb 16 2009 mmarek@suse.cz
- fix segfault when stopping imsm arrays
(bnc#473947, patch by Dan Williams)

View File

@ -51,16 +51,6 @@ MDADM_CONFIG="/etc/mdadm.conf"
#
MDADM_SEND_MAIL_ON_START=no
## Type: list(yes,no,part)
## Default: no
#
# "yes" for mdadm.conf to be used for array assembly on boot
# "no" for arrays to be automatically detected and assembled
# "part" is like "no" except that arrays with 1.x metadate
# will be assembled as partitionable arrays.
#
BOOT_MD_USE_MDADM_CONFIG=yes
## Type: integer
## Default: 60
#