From: Marc MERLIN <marc@merlins.org>
To: Adam Goryachev <mailinglists@websitemanagers.com.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: force remapping a pending sector in sw raid5 array
Date: Tue, 6 Feb 2018 14:02:25 -0800 [thread overview]
Message-ID: <20180206220225.GE9565@merlins.org> (raw)
In-Reply-To: <d764a824-fe3e-583a-10ef-040bc32dc78e@websitemanagers.com.au>
On Wed, Feb 07, 2018 at 08:51:15AM +1100, Adam Goryachev wrote:
> I think instead of reading the sector from the drive and relying on the
> drive to determine the correct data (it's already telling you it can't).
Just on that point, it's not that simple. A drive will only try to read the
data a few times before giving up and marking the sector as pending a
re-write with new data (so that it can be re-mapped).
You can however re-read it in different ways and sometimes get the data
back, which _should_ then cause an immediate re-writing of the data on a new
block and turn the pending into a reallocated block
However, this does not seem to have happened on my drive, either because the
bad data didn't really get read by hdparm --read-sector, or because the
firmware isn't doing its remapping job, or something else I don't understand
> What you need to do is find out where on md7 drive x sector y maps to
> and read that sector from md7, which will get md to (possibly) notice
> the read error, and then read the data from the other drives, and then
> re-write the faulty sector with correct calculated data (or do the
> resync on that area of md7 only).
Yeah, I got that part.
> So try setting something like 1287000000 * 4 as the start of the resync
> up to 1288000000 * 4 and see if that finds and fixes it for you.
>
> If nothing else, it should finish fairly quickly. You might need to
> start earlier, but you could just keep reducing the "window" until you
> find the right spot. Or, someone who knows a lot more about this mapping
> might jump in and answer the question, though they might need to see the
> raid details to see the actual physical layout/order of drives/etc.
I did however (indeed) miss that I can narrow the check range, so I'll try
playing with that until I can narrow it down to the right bit.
I'm still curious as to why the hdparm bit didn't work, but oh well at this
point.
Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
next prev parent reply other threads:[~2018-02-06 22:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 18:14 force remapping a pending sector in sw raid5 array Marc MERLIN
2018-02-06 18:59 ` Reindl Harald
2018-02-06 19:36 ` Marc MERLIN
2018-02-06 20:03 ` Andreas Klauer
2018-02-06 21:51 ` Adam Goryachev
2018-02-06 22:02 ` Marc MERLIN [this message]
2018-02-06 22:31 ` Roger Heflin
2018-02-06 22:46 ` Marc MERLIN
2018-02-07 4:29 ` Marc MERLIN
2018-02-07 9:42 ` Kay Diederichs
2018-02-09 19:29 ` Marc MERLIN
2018-02-09 19:57 ` Kay Diederichs
2018-02-09 20:02 ` Roger Heflin
2018-02-09 20:13 ` Phil Turmel
2018-02-09 20:29 ` Marc MERLIN
2018-02-09 20:44 ` Phil Turmel
2018-02-09 21:22 ` Marc MERLIN
2018-02-09 22:07 ` Wol's lists
2018-02-09 22:36 ` Marc MERLIN
2018-02-09 20:52 ` Kay Diederichs
2018-02-11 20:52 ` Roger Heflin
2018-02-09 21:17 ` Kay Diederichs
2018-02-10 21:43 ` Mateusz Korniak
2018-02-11 15:41 ` Marc MERLIN
2018-02-11 16:41 ` Marc MERLIN
2018-02-11 17:13 ` Phil Turmel
2018-02-11 18:02 ` Wols Lists
2018-02-12 10:43 ` Mateusz Korniak
2018-02-12 15:29 ` Phil Turmel
2018-02-12 16:49 ` Marc MERLIN
2018-02-12 17:16 ` Phil Turmel
2018-02-12 17:30 ` Marc MERLIN
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=20180206220225.GE9565@merlins.org \
--to=marc@merlins.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox