[Bug 1320402] Re: mdadm resyncs imsm raid in "Normal" state

ChrisMN 1320402 at bugs.launchpad.net
Sat Nov 8 16:29:00 UTC 2014


I also experienced the same problem with a IMSM RAID 1.  I believe that
the problem is essentially identical to the gentoo problem which was
noted earlier.  I put in the following workaround which seems to work
(on a clean install of Ubuntu 14.04.1 with mdadm version 3.2.5).  At
least, I have not seen a resync on boot since putting this in this fix.

1.  Edit /etc/init.d/sendsigs (to prevent mdmon from being killed on shutdown):
	OMITPIDS=`pidof mdmon | sed -e 's/ /,/g' -e 's/./-o \0'`

2.  Edit /etc/init.d/umountroot (to force the system to wait for the
RAID to be clean before shutdown):

##########################
#FIRST:  Add the following function:
check_raid() {
	log_action_begin_msg “Checking RAIDs ”
	if mdadm --wait-clean --scan ; then
		log_action_end_msg 0
	else
		log_action_end_msg 1
	fi
}

#SECOND: change the call to do_stop:
#stop)
#	do_stop
#	;;

stop)
	check_raid
	do_stop
	check_raid
	;;
##########################

It isn't clear that check_raid has to be called both before and after
do_stop (probably after will work fine, but I didn't test it).

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1320402

Title:
   mdadm resyncs imsm raid in "Normal" state

Status in “mdadm” package in Ubuntu:
  Confirmed

Bug description:
  Got an imsm raid1 which I don't boot from. Whenever bios reports the
  raid as being in "Normal" state, mdadm starts a resync of it after
  boot. If a resync already is underway (bios reports it as being in
  "Verify" state), it continues where it left off.

  This appears to be very similar to a problem in Fedora:
  https://bugzilla.redhat.com/show_bug.cgi?id=753335 It's apparently
  fixed there for some time now. (The workaround mentioned in comment 41
  in that ticket doesn't work in Ubuntu, but I guess that's due to
  distro differences in initramfs and systemd.)

  Using mdadm 3.2.5-5ubuntu4 in a fresh Trusty install.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1320402/+subscriptions



More information about the foundations-bugs mailing list