Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Ladislav Mate <ladislav.mate@gmail.com>
To: Jan Kasprzak <kas@fi.muni.cz>
Cc: linux-raid@vger.kernel.org
Subject: Re: Replacing a failed disk "in advance"
Date: Wed, 20 May 2015 16:40:01 +0200	[thread overview]
Message-ID: <20150520144001.GA2826@dev> (raw)
In-Reply-To: <20150520142049.GT24672@fi.muni.cz>

On Wed, May 20, 2015 at 04:20:49PM +0200, Jan Kasprzak wrote:
> 	Hello,
Hi Jan,
> 
> I have a RAID-5 volume of 8 physical disks. One of these disks failed the SMART
> self-test with an unreadable block error. Unfortunately I have discovered
> that there is _another_ bad block on another disk. It is a different block,
> so the RAID-5 volume as a whole is still working. But as a whole, the
> RAID-5 volume has at least two unreadable sectors on two different disks.
> 
> What is the best way to replace these two failing disks one by one without
> the loss of data? I cannot mdadm --fail one of them, because the
> subsequent rebuild on a new disk would fail on reading the other bad block.
> 
> I would like to add the ninth drive to the RAID-5 volume, and put a replica
> of one of the failing drives to it. Then remove the just-replicated drive,
> and do the same with the other failing drive.
When you take a look in mdadm man page and search for --replace you'll find what you are looking for.

--replace
       Mark listed devices as requiring replacement.  As soon as a spare is available, it will be rebuilt  and  will  replace
       the marked device.  This is similar to marking a device as faulty, but the device remains in service during the recov-
       ery process to increase resilience against multiple failures.  When the replacement  process  finishes,  the  replaced
       device will be marked as faulty.

--with This  can  follow a list of --replace devices.  The devices listed after --with will be preferentially used to replace
       the devices listed after --replace.  These device must already be spare devices in the array.

HTH,

/lm
> 
> Thanks,
> 
> -Yenya
> 
> -- 
> | Jan "Yenya" Kasprzak   <kas at {fi.muni.cz - work | yenya.net - private}> |
> | New GPG 4096R/A45477D5 -- see http://www.fi.muni.cz/~kas/pgp-rollover.txt |
> | http://www.fi.muni.cz/~kas/     Journal: http://www.fi.muni.cz/~kas/blog/ |
>            Smart data structures and dumb code works a lot better
>            than the other way around.           --Eric S. Raymond
> --
> 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

  reply	other threads:[~2015-05-20 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 14:20 Replacing a failed disk "in advance" Jan Kasprzak
2015-05-20 14:40 ` Ladislav Mate [this message]
2015-05-20 14:51   ` Jan Kasprzak
2015-05-20 15:12     ` Caspar Smit
2015-05-20 15:15       ` Jan Kasprzak

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=20150520144001.GA2826@dev \
    --to=ladislav.mate@gmail.com \
    --cc=kas@fi.muni.cz \
    --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