linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Gandalf Corvotempesta <gandalf.corvotempesta@gmail.com>,
	Linux RAID Mailing List <linux-raid@vger.kernel.org>
Subject: Re: 3 way mirror
Date: Sun, 11 Sep 2022 11:08:36 +0100	[thread overview]
Message-ID: <73143dc1-e259-9dd1-d146-81d6c576b5d4@youngman.org.uk> (raw)
In-Reply-To: <CAJH6TXj0y_bfJ1q50S7xnTyz_4BSrgNboim9e+zK1nKZX9MR3g@mail.gmail.com>

On 11/09/2022 10:08, Gandalf Corvotempesta wrote:
> let's assume a 3 way mirror (raid1 with 3 disks)
> One disk got a bad sector detrcted by smartd
> what happens trying to read or write to that sector?

I'm guessing when linux goes to read the data, the read will fail.
> 
> is md smart enough to read from the other 2 disks and serve consistant data?

Very much so, PROVIDED linux returns a read error for the disk.
> 
> in other words, can i delay the disk replacement for a couple of days
> (i've ordered the disk today, will came tuesday) ?

What sort of error? A new disk *may* be overkill ...


Firstly, this is a disk level problem. The whole point of raid is to 
protect your data from disk level problems :-)

Secondly, this is a disk level problem. The dodgy sector might not even 
be in use, so there's no data there to lose.

Thirdly, this is a disk level problem. It may be a simple case of the 
disk needs to rewrite the data and relocate the sector and everything 
will be hunky-dory again. BUT IT CAN'T DO THAT UNTIL LINUX GIVES IT NEW 
FRESH DATA.

So you need to quiesce the disk (basically, shut down as many processes 
as you can, maybe do this overnight), and run a scrub. That will tell 
you if linux/mdraid thinks there's a problem.

Then re-run smartd and see if it's fixed the problem.

Then look at the smartd output and ask yourself "do I really need a new 
disk?". I wouldn't send the new one back. Depending on how well you are 
off for disk space and SATA ports, now you've got the new disk, if the 
old one is still good I'd go for a 3-disk raid-5 plus spare. That's my 
current setup.

Cheers,
Wol

  parent reply	other threads:[~2022-09-11 10:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11  9:08 3 way mirror Gandalf Corvotempesta
2022-09-11  9:50 ` Geoff Back
2022-09-11 10:08 ` Wols Lists [this message]
2022-09-11 10:21   ` Gandalf Corvotempesta
2022-09-12  0:58   ` Phil Turmel
2022-09-12  8:06     ` Wols Lists
2022-09-12 12:48       ` Phil Turmel
2022-09-11 10:52 ` Reindl Harald
2022-09-11 11:35   ` Gandalf Corvotempesta
2022-09-11 12:20     ` Reindl Harald
2022-09-11 18:08       ` Wols Lists
2022-09-11 19:11         ` Gandalf Corvotempesta
2022-09-12  8:16         ` Reindl Harald
2022-09-12  8:18           ` Gandalf Corvotempesta
2022-09-12  9:26           ` Roman Mamedov
2022-09-12  9:40             ` Reindl Harald
2022-09-12 13:02             ` Phil Turmel

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=73143dc1-e259-9dd1-d146-81d6c576b5d4@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=gandalf.corvotempesta@gmail.com \
    --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).