All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
To: Adam Goryachev <mailinglists@websitemanagers.com.au>
Cc: "David C. Rankin" <drankinatty@suddenlinkmail.com>,
	Linux Raid <linux-raid@vger.kernel.org>
Subject: Re: Feature request: Remove the badblocks list
Date: Wed, 2 Sep 2020 16:50:37 +0200 (CEST)	[thread overview]
Message-ID: <1375662956.965590.1599058237477.JavaMail.zimbra@karlsbakk.net> (raw)
In-Reply-To: <8dce17fb-13df-b273-cc3d-b3f71d180354@websitemanagers.com.au>

> I'm no MD expert, but I there are a couple of things to consider...
> 
> 1) MD doesn't mark the sector as bad unless we try to write to it, AND
> the drive replies to say it could not be written. So, in your case, the
> drive is saying that it doesn't have any "spare" sectors left to
> re-allocate, we are already passed that point.
> 
> 2) When MD tries to read, it gets an error, so read from the other
> mirror, or re-construct from parity/etc, and automatically attempt to
> write to the sector, see point 1 above for the failure case.
> 
> So by the time MD gets a write error for a sector, the drive really is
> bad, and MD can no longer ensure that *this* sector will be able to
> properly store data again (whatever level of RAID we asked for, that
> level can't be achieved with one drive faulty). So MD marks it bad, and
> won't store any user data in that sector in future. As other drives are
> replaced, we mark the corresponding sector on those drives as also bad,
> so they also know that no user data should be stored there.
> 
> Eventually, we replace the faulty disk, and it would probably be safe to
> store user data in the marked sector (assuming the new drive is not
> faulty on the same sector, and all other member drives are not faulty on
> the same sector).
> 
> So, to "fix" this, we just need a way to tell MD to try and write to all
> member drives, on all faulty sectors, and if any drive returns fails to
> write, then keep the sector as marked bad, if *ALL* drives succeed, then
> remove from the bad blocks list on all members.
> 
> So why not add this feature to fix the problem, instead of throwing away
> something that is potentially useful? Perhaps this could be done as part
> of the "repair" mode, or done during a replace/add (when we reach the
> "bad" sector, test the new drive, test all existing drives, and then
> continue with the repair/add.
> 
> Would that solve the "bug"?

I'd better want md to stop fixing "somebody else's problem", that is, the disk, and rather just do its job. As for the case, I have tried to manually read those sectors named in the badblocks list and they all work. All of them. But then, there's no fixing, since they are proclaimed dead. So are their siblings' sectors with the same number, regardless of status.

If a drive has multiple issues with bad sector, kick it out. It doesn't have anything to do in the RAID anymore

Vennlig hilsen

roy
-- 
Roy Sigurd Karlsbakk
(+47) 98013356
http://blogg.karlsbakk.net/
GPG Public key: http://karlsbakk.net/roysigurdkarlsbakk.pubkey.txt
--
Hið góða skaltu í stein höggva, hið illa í snjó rita.


  reply	other threads:[~2020-09-02 14:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 18:00 Feature request: Remove the badblocks list Roy Sigurd Karlsbakk
2020-08-18 19:26 ` Wols Lists
2020-08-18 19:34   ` Piergiorgio Sartor
2020-08-18 19:43   ` Phil Turmel
2020-08-18 21:03 ` Håkon Struijk Holmen
2020-08-22  1:42   ` David C. Rankin
2020-09-02 13:36     ` Roy Sigurd Karlsbakk
2020-09-02 14:34       ` Adam Goryachev
2020-09-02 14:50         ` Roy Sigurd Karlsbakk [this message]
2020-09-02 15:09           ` Adam Goryachev
2020-09-02 15:25             ` Roy Sigurd Karlsbakk
2020-09-02 16:32               ` Adam Goryachev
2020-09-02 16:50                 ` Roy Sigurd Karlsbakk
2020-09-02 19:45                 ` Håkon Struijk Holmen

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=1375662956.965590.1599058237477.JavaMail.zimbra@karlsbakk.net \
    --to=roy@karlsbakk.net \
    --cc=drankinatty@suddenlinkmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mailinglists@websitemanagers.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.