From: Anuj Goel <agoel@cs.stonybrook.edu>
To: Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: [Doubt] how is a disk marked faulty in RAID5
Date: Fri, 27 Apr 2012 16:32:13 -0400 [thread overview]
Message-ID: <CANSbrroXvVJjYCkdYD2XF-XAoxnd9Jte5yJxSVcsakF65DCYPw@mail.gmail.com> (raw)
In-Reply-To: <CANSbrrpBAPdKgJYJGtpRs0DcwTs_1BEOEaxf3y4fVcO6M+0H1w@mail.gmail.com>
Hi folks,
Can someone please help me with below doubts.
Thanks in advance !!
On Tue, Apr 24, 2012 at 7:36 PM, Anuj Goel <agoel@cs.stonybrook.edu> wrote:
> Hi,
>
> I have been looking into the RAID5 code, but unable to find how a disk
> is marked faulty in a RAID5 array.
> I consider the case when we try to read, say 2 sectors within a chunk
> and the read fails. My understanding so far is as below:
>
> The status of the read operation is returned in the call back function
> "raid5_align_endio" registered in chunk-aligned_read().
> If there was an error in the read, it LIFO adds the original bio to
> the retry list and wakes up the raid5d thread.
> This thread will remove the bio from the retry list and send it to
> retry_aligned_read().
>
> In retry_aligned_read(), we first compute the disk number and sector
> offset within the disk using raid5_compute_sector().
>
> 1. Then we do some stripe operations, but I cannot see where the
> actual read from the disk is scheduled.
> 2. Also, if the sector on the disk is found unreadable, according to
> the RAID5 design, it should be recomputed using parity and the disk
> marked FAULTY. Can you please point me to the code/functions I should
> look into to understand how this is being done.
> 3. After one disk failure, if another disk fails, I think the RAID5
> array cannot be used anymore. How is the second disk failure reported
> ?
>
> This is my first tryst with Linux code, (specifically software RAID),
> so I am not sure how to debug and understand the code flow.
> Is code reading the only way to understand the flow, or is there some
> documentation giving a high level overview of the implementation of
> software RAID ?
>
> Any suggestions will be highly appreciated !!
>
> --
> Best Regards,
> Anuj Goel
> Experimental Computer Science Lab
> Stony Brook University.
--
Best Regards,
Anuj Goel
Experimental Computer Science Lab
Stony Brook University.
next prev parent reply other threads:[~2012-04-27 20:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 23:36 [Doubt] how is a disk marked faulty in RAID5 Anuj Goel
2012-04-27 20:32 ` Anuj Goel [this message]
2012-04-27 22:20 ` NeilBrown
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=CANSbrroXvVJjYCkdYD2XF-XAoxnd9Jte5yJxSVcsakF65DCYPw@mail.gmail.com \
--to=agoel@cs.stonybrook.edu \
--cc=linux-raid@vger.kernel.org \
/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).