Bug#652548: mdadm-raid startup script (and hence postinst) spurious failure
Ian Jackson
ijackson at chiark.greenend.org.uk
Sun Dec 18 13:54:27 UTC 2011
Package: mdadm
Version: 3.1.4-1+8efb9d1
Tags: patch
I found that during my lenny->squeeze upgrade, I was not able to
configure mdadm. See the transcript below.
The problem seems to be that:
* My md devices were all already set up
* Therefore madm --assemble --auto does nothing and exits 2
* Therefore /etc/init.d/mdadm-raid also exits 2
I was able to fix this with the patch below.
Thanks,
Ian.
# dpkg --configure mdadm
Setting up mdadm (3.1.4-1+8efb9d1) ...
Generating array device nodes... done.
update-initramfs: deferring update (trigger activated)
Starting MD monitoring service: mdadm --monitor.
invoke-rc.d: initscript mdadm-raid, action "start" failed.
dpkg: error processing mdadm (--configure):
subprocess installed post-installation script returned error exit status 2
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686-bigmem
W: Busybox is required for successful boot!
Errors were encountered while processing:
mdadm
# /etc/init.d/mdadm-raid stop
mdadm: failed to stop array /dev/md125: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
mdadm: failed to stop array /dev/md126: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
mdadm: failed to stop array /dev/md127: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
# /etc/init.d/mdadm-raid start
# /etc/init.d/mdadm-raid stop
mdadm: failed to stop array /dev/md125: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
mdadm: failed to stop array /dev/md126: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
mdadm: failed to stop array /dev/md127: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
# /etc/init.d/mdadm-raid start
# invoke-rc.d mdadm-raid start
invoke-rc.d: initscript mdadm-raid, action "start" failed.
# /etc/init.d/mdadm-raid start
# echo $?
2
# mdadm --assemble --no-degraded --auto=md --scan
# echo $?
2
--- /etc/init.d/mdadm-raid~ 2010-04-11 20:19:51.000000000 +0100
+++ /etc/init.d/mdadm-raid 2011-12-18 13:41:39.000000000 +0000
@@ -90,7 +90,7 @@
case "${1:-}" in
start)
- mdadm --assemble --no-degraded --auto=md --scan
+ mdadm --assemble --no-degraded --auto=md --scan || test $? = 2
;;
stop)
More information about the pkg-mdadm-devel
mailing list