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

45
boot.md
View File

@ -118,45 +118,14 @@ case "$1" in
/sbin/udevadm settle --timeout="$MDADM_DEVICE_TIMEOUT" /sbin/udevadm settle --timeout="$MDADM_DEVICE_TIMEOUT"
fi fi
if test "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -e "$mdadm_CONFIG"; then if ! grep -qs '^[^#]*[^[:blank:]#]' $mdadm_CONFIG; then
if ! grep -q '^[^#]*[^[:blank:]#]' $mdadm_CONFIG; then # empty or missing /etc/mdadm.conf, "unused"
# empty /etc/mdadm.conf, "unused" rc_status -u
rc_status -u
else
$mdadm_BIN -A -s -c $mdadm_CONFIG
# a status of 2 is not an error
test $? -eq 0 -o $? -eq 2
rc_status -v
fi
else else
# do auto-assemly only if /etc/mdadm.conf is missing $mdadm_BIN -A -s -c $mdadm_CONFIG
# run at boot-time, so a fixed tmp name is safe # a status of 2 is not an error
rm -rf /tmp/mdadm.conf test $? -eq 0 -o $? -eq 2
rc_status -v
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 fi
;; ;;
stop) stop)

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 Mon Feb 16 16:00:11 CET 2009 - mmarek@suse.cz

View File

@ -20,7 +20,7 @@
Name: mdadm Name: mdadm
Version: 3.0 Version: 3.0
Release: 14 Release: 17
%define ver 3.0-devel2 %define ver 3.0-devel2
BuildRequires: sgmltool BuildRequires: sgmltool
PreReq: %fillup_prereq %insserv_prereq PreReq: %fillup_prereq %insserv_prereq
@ -162,6 +162,12 @@ rm -rf $RPM_BUILD_ROOT
/lib/mkinitrd/scripts/boot-md.sh /lib/mkinitrd/scripts/boot-md.sh
%changelog %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 * Mon Feb 16 2009 mmarek@suse.cz
- fix segfault when stopping imsm arrays - fix segfault when stopping imsm arrays
(bnc#473947, patch by Dan Williams) (bnc#473947, patch by Dan Williams)

View File

@ -51,16 +51,6 @@ MDADM_CONFIG="/etc/mdadm.conf"
# #
MDADM_SEND_MAIL_ON_START=no 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 ## Type: integer
## Default: 60 ## Default: 60
# #