root MD array is still in use upon shutdown possible fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



When my root filesystem is on an MD (RAID5) array, I can't cleanly shut down (trying to change the array ro, even when nothing else than the kernel threads and init and one bash are running, and the root fs is ro remounted), because I've got "md: md0 still in use" kernel messages. Usually it doesn't cause any problems, but it possibly could leave the array in an inconsistent state (resync required after reboot).
I made a patch for md.c, based on the thread on "Can't get md array to
shut down cleanly" started at 2006-07-06 on [email protected]
The problem is reproducible on kernel v. and, this
patch is made for the latter.
Please check this patch, for me it does work, but I'm not sure, that it
doesn't break something else. I'm not on the list, please CC me.
Here is the diff for drivers/md/md.c:

< 		if (atomic_read(&mddev->active)>2) {
		if (atomic_read(&mddev->active)>2 && !ro) {
Czigola, Gabor
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at
Please read the FAQ at

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux