Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Andreas Klauer <Andreas.Klauer@metamorpher.de>
To: Marc MERLIN <marc@merlins.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: force remapping a pending sector in sw raid5 array
Date: Tue, 6 Feb 2018 21:03:12 +0100	[thread overview]
Message-ID: <20180206200312.GA20708@metamorpher.de> (raw)
In-Reply-To: <20180206181416.amo6geclrvc6ylrf@merlins.org>

On Tue, Feb 06, 2018 at 10:14:16AM -0800, Marc MERLIN wrote:
> echo check > /sys/block/md7/md/sync_action 
> md7 : active raid5 sdf1[0] sdg1[5] sdd1[3] sdh1[2] sde1[1]
>       23441561600 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
>       [==>..................]  check = 10.5% (615972996/5860390400) finish=4822.1min speed=18125K/sec
>       bitmap: 3/44 pages [12KB], 65536KB chunk
> 
> My understanding is that eventually it will find the bad sectors that can't be read
> and rewrite new ones (block remapping) after reading the remaining 4 drives.

You can do selective area checks, with /sys/block/mdX/md/sync_{min,max}.

Documented here:

https://www.kernel.org/doc/html/latest/admin-guide/md.html#md-devices-in-sysfs

Also see if increasing the stripe cache size helps with speeds.

> Should I stick this data into a 512 byte file and write it back with dd in the right place?

Most hard drives have 4K sectors these days. Writing 512 byte into a bad 
physical 4K sector is probably not a good idea. So at minimum, write 4K 
(aligned). If in doubt, write more...

However, leaving it to the md check should be the much safer option. 
Easy to make mistakes when messing with drives directly.

> Does that sound like a good plan, or is there another better way to fix my issue?

mdadm --replace the drive entirely with a new one is not an option?

Then you could do a full badblocks write test on the removed/faulty drive 
and make a more informed decision as to whether it can be trusted at all.

Regards
Andreas Klauer

  parent reply	other threads:[~2018-02-06 20:03 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 [this message]
2018-02-06 21:51 ` Adam Goryachev
2018-02-06 22:02   ` Marc MERLIN
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=20180206200312.GA20708@metamorpher.de \
    --to=andreas.klauer@metamorpher.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=marc@merlins.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