From: "Michael Schwarz" <mschwarz@multitool.net>
To: Bill Davidsen <davidsen@tmr.com>
Cc: Neil Brown <neilb@suse.de>,
linux-raid@vger.kernel.org,
linux-usb-users@lists.sourceforge.net
Subject: Re: Failed reads from RAID-0 array; still no joy in Mudville.
Date: Sat, 17 Mar 2007 13:13:11 -0600 (CST) [thread overview]
Message-ID: <2745.72.21.237.163.1174158791.squirrel@www.multitool.net> (raw)
In-Reply-To: <45FC33A4.2090408@tmr.com>
I'll try playing around with IO sizes with dd.
What I'm finding so far is ABSOLUTE consistency on where it locks. If it
were a race condition with kernel locks I guess I would expect it to be
more indeterminate (in my limited experience) unless it is due to specific
"deadly embrace" condition between the usb drivers(s) and the raid
subsystem.
I must admit that I'm not familiar enough with either one. I will also
mention that I experienced this lockup phenomenon with both a stock Fedora
Core 6 i686 kernel and with a stock Ubuntu kernel, so the behavior isn't
terribly kernel compile/module mix sensetive.
I've downloaded the kernel-devel package for my Fedora kernel and I'm
going to start working backwards from the stack trace I've captured to see
where I'm hanging and why. strace wasn't particularly helpful since the
write to file was buffered and so I can't be sure I have the call that
failed. (I'll take a look and see if there's an 'unbuffered write' switch
on strace -- there probably is).
Anyways, I'm still hoping someone who knows a lot will see this and say
"oh, yeah! That's because of BLAH." I don't mind becoming more
knowledgeable about the 2.6.x kernel, but this wasn't how I wanted to go
about it! ;-)
Thanks again, all...
What I find odd is that it seems to be a "per-process" problem. I can
still access the md drive from other processes when the copy is hung. I'm
going to see if it is "positional" by copying the file that is "hung"
alone and see if it hangs in the same place on the same file, or if it
hangs later or what,,, There will be more posts from me. (Fair warning to
all!)
--
Michael Schwarz
> Neil Brown wrote:
>> On Friday March 16, mschwarz@multitool.net wrote:
>>
>>> I'm not a Linux newbie (I've even written a couple of books and done
>>> some
>>> very light device driver work), but I'm completely new to the software
>>> raid subsystem.
>>>
>>> I'm doing something rather oddball. I'm making an array of USB flash
>>> drives and comparing read and write rates.
>>>
>>> Well, I've had great success writing. I've got seven flash drives on a
>>> hub. I've joined them up both linear and raid0 and written large
>>> amounts
>>> of data to them. But come time to read from them, linear works, but
>>> raid0
>>> hangs after transferring just shy of 2G of data. It doesn't matter if
>>> it
>>> reading from one file or from many files whose cumulative size is just
>>> shy
>>> of 2G. It doesn't matter if I'm using "dd" or "cp" to read the file or
>>> files.
>>>
>>> The process doing the transfer is unkillable. Not with a kill -15 or a
>>> kill -9. It won't die, but it also won't make progress.
>>>
>>> "Linear" always works. Raid-0 always hangs.
>>>
>>
>> My guess would be a locking bug in the usb storage driver or some
>> lower level USB driver..
>> A significant difference between raid0 and linear is that a largish IO
>> will touch all drives for raid-0, but only one or two for linear.
>> That gives much more opportunity for locking bugs to hit.
>>
>> When it is in the hanging state, do
>> echo t > /proc/sysrq-trigger
>>
>> and look in the kernel logs for the stack trace of all processes.
>> Hopefully the stack trace for the processes in 'D' state will be
>> informative.
>>
>> NeilBrown
>>
>>
>>
>>> Here are my mdadm commands to create the array:
>>>
>>> mdadm --create /dev/md0 --level=linear --auto=md --chunk=32
>>> --raid-devices=7 /dev/sd?
>>>
>>> (The wildcard works because the seven flash drives are the only scsi
>>> devices on the system).
>>>
>>> The command for the raid-0 array is the same as above except for the
>>> "--level=0" it takes to make a raid 0 array.
>>>
>>> I then use "mkfs" to make the filesystem and mount the resulting array
>>> at
>>> "/mnt"
>>>
>>> Can anyone give a raid newbiw some tips? Is there something obvious I'm
>>> missing? Would it help to provide strace/ltrace/ptrace of the hanging
>>> copy
>>> command?
>>>
>>> Any help (including URLs of manuals I should RTFM) would be most
>>> welcome.
>>>
>>> Thanks!
>>>
>>>
>>> --
>>> Michael Schwarz
>>>
>
> Neil, would retrying this with small i/o show anything, assuming your
> thought is the cause? Also, would it give useful information to usee dd
> with direct i/o on read:
> dd if=/dev/md0 iflag=direct bs=1024k of=/dev/null
> and see if large buffer with O_DIRECT works?
>
> These are suggestions on getting more info, if the trace doesn't clarify
> the problem.
>
> --
> bill davidsen <davidsen@tmr.com>
> CTO TMR Associates, Inc
> Doing interesting things with small computers since 1979
>
>
next prev parent reply other threads:[~2007-03-17 19:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-17 2:20 Failed reads from RAID-0 array (from newbie who has read the FAQ) Michael Schwarz
2007-03-17 5:31 ` Neil Brown
2007-03-17 18:01 ` Michael Schwarz
2007-03-17 20:49 ` Alan Stern
2007-03-17 21:35 ` Michael Schwarz
2007-03-18 2:06 ` [Linux-usb-users] " Alan Stern
2007-03-18 2:12 ` Alan Stern
2007-03-18 4:42 ` Michael Schwarz
2007-03-18 16:56 ` [Linux-usb-users] " Michael Schwarz
2007-03-18 17:44 ` Michael Schwarz
2007-03-18 21:55 ` Michael Schwarz
2007-03-18 21:57 ` Neil Brown
2007-03-19 3:27 ` Michael Schwarz
2007-03-19 14:29 ` Bill Davidsen
2007-03-19 14:54 ` [Linux-usb-users] " Michael Schwarz
2007-03-19 15:31 ` Alan Stern
2007-03-19 16:58 ` Michael Schwarz
2007-03-19 18:17 ` Alan Stern
[not found] ` <45FC33A4.2090408@tmr.com>
2007-03-17 19:13 ` Michael Schwarz [this message]
2007-03-17 19:21 ` Failed reads from RAID-0 array; still no joy in Mudville Michael Schwarz
2007-03-18 17:22 ` Bill Davidsen
2007-03-18 17:39 ` Michael Schwarz
2007-03-18 18:21 ` Bill Davidsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2745.72.21.237.163.1174158791.squirrel@www.multitool.net \
--to=mschwarz@multitool.net \
--cc=davidsen@tmr.com \
--cc=linux-raid@vger.kernel.org \
--cc=linux-usb-users@lists.sourceforge.net \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).