linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* race condition in md creation?
@ 2011-05-27 13:20 Stijn Hoop
  2011-05-27 21:24 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Stijn Hoop @ 2011-05-27 13:20 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

Hello,

while creating a test suite for internal purposes I ran into a race
condition where a (very small) raid array that was just created cannot
be stopped.

mdadm --create succeeds, but the subsequent mdadm --stop reports
'Device or resource busy'.

Please see the attached script for reproduction purposes, partial output
from a run on my system (Fedora 14, kernel 2.6.35.13-91.fc14.x86_64,
mdadm-3.1.3-0.git20100804.2.fc14.x86_64):


5+0 records in
5+0 records out
5242880 bytes (5.2 MB) copied, 0.0166663 s, 315 MB/s
5+0 records in
5+0 records out
5242880 bytes (5.2 MB) copied, 0.0197533 s, 265 MB/s
mdadm: array /dev/md0 started.
mdadm: failed to stop array /dev/md0: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
failed to stop /dev/md0, sleep 1 sec then retrying one more time
mdadm: stopped /dev/md0


I know that this might be an artificial bug, for with real raid arrays
people will not stop their just-created raid systems, but I figured
somebody might be interested to find out what was actually going on. As
I have no kernel expertise (yet! :) and I need to move on, I am only
posting my results...

BTW, I'm posting here only because I failed to google a bug tracker for
linux-raid. If there is one, my apologies, I will gladly create a bug
instead.

HTH,

--Stijn

[-- Attachment #2: mdadm-bug.sh --]
[-- Type: application/x-shellscript, Size: 500 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-28 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 13:20 race condition in md creation? Stijn Hoop
2011-05-27 21:24 ` NeilBrown
2011-05-28 11:19   ` Stijn Hoop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).