From: NeilBrown <neilb@suse.de>
To: Tomas M <tomas@slax.org>
Cc: stan@hardwarefreak.com, linux-raid@vger.kernel.org
Subject: Re: How to prefer some devices over others in raid
Date: Wed, 1 Jan 2014 18:05:17 +1100 [thread overview]
Message-ID: <20140101180517.1367bc05@notabene.brown> (raw)
In-Reply-To: <CAL1oBhrVUTK5ayU=sgmVgP0Xu5eh1nGcfRjQSYALXXJMVE03+w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3298 bytes --]
On Wed, 1 Jan 2014 07:50:24 +0100 Tomas M <tomas@slax.org> wrote:
> My main concern is that I'm not always 100% sure if a certain drive is
> the root cause of slow read performance, so failing a wrong one would
> have terrible consequences. On the other hand, if it was possible to
> say "read the data with pretending one drive has failed, but write to
> the array as if all drives are ok", then I could actually find out if
> copying speed reverts to normal.
>
> Maybe I should write a kernel patch to try this out. Any suggestions
> where to start?
raid1.c already has functionality like this, referred to as "Write-mostly".
To add it to raid5.c you would need to modify fetch_block().
It sets Wantread or Wantcompute to indicate the the block should be read, or
computed from others (which is only allows of all the others are valid
already).
So in the case where one device is write-mostly and no other devices are
faulty, it should set Wantread on all those other devices.
Once they have been read, fetch_block will be called again and the current
code will notice that setting Wantcompute is sufficient.
NeilBrown
>
> Tomas M
>
> On Tue, Dec 31, 2013 at 4:17 PM, Stan Hoeppner <stan@hardwarefreak.com> wrote:
> >
> >
> > On 12/31/2013 8:42 AM, Tomas M wrote:
> >> I'm using software raid 5 (stripe with one parity drive).
> >>
> >> Is there a way to force the raid array to MOSTLY ignore one of the drives?
> >>
> >> Let me explain. If a drive is failing (is very slow, has errors, etc),
> >> then I still prefer to keep it in the array and simply COPY all data
> >> from the array somewhere else, instead of risking that the array gets
> >> degraded if I remove the failing drive and another one dies at the
> >> same time.
> >>
> >> Example:
> >> - 4 drives in raid5
> >> - one drive is slow, lets call the drive DISK1
> >> - copying all data from the array is very slow because it still uses
> >> DISK1 to read data from it, even if it could IGNORE it and COMPUTE the
> >> data from the other three drives
> >>
> >> The filesystem on the array needs to be still mounted rw, though,
> >> since there may be some changes.
> >>
> >> Is there any mdadm parameter or option which would make the array
> >> IGNORE any given disk on reads (since those can be computed from other
> >> drives), while still NOT IGNORING the disk in writes?
> >>
> >> Because if I set it to ignore that failing slow drive, I will copy out
> >> the data 100 times faster while still keeping the array in sync.
> >> Because for me if ANOTHER drive dies, it will still be better to have
> >> the data 100 times slower than nothing. I hope you understand me :)
> >
> > The option you request is not available TTBOMK. So...
> >
> > Fail the drive. Copy all the data off the array. Zero the drive and
> > add it back. Resync.
> >
> > But while you're at it, why not simply replace the flaky drive before
> > the resync? Why would you intentionally keep a known-to-be-failing
> > drive in the array?
> >
> > --
> > Stan
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-01-01 7:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 14:42 How to prefer some devices over others in raid Tomas M
2013-12-31 15:17 ` Stan Hoeppner
2014-01-01 6:50 ` Tomas M
2014-01-01 7:05 ` NeilBrown [this message]
2014-01-01 16:49 ` Stan Hoeppner
2014-01-01 18:00 ` Tomas M
2014-01-01 20:21 ` Phil Turmel
2014-01-02 14:30 ` Stan Hoeppner
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=20140101180517.1367bc05@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=stan@hardwarefreak.com \
--cc=tomas@slax.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).