All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Gandalf Corvotempesta <gandalf.corvotempesta@gmail.com>,
	linux-raid@vger.kernel.org
Subject: Re: Auto replace disk
Date: Wed, 8 Mar 2017 18:17:45 +0000	[thread overview]
Message-ID: <58C04AC9.9070801@youngman.org.uk> (raw)
In-Reply-To: <CAJH6TXgyOEE5A8TZVZy-db+tPD1QeHtnXXO3B-1vmKe4cAt6xA@mail.gmail.com>

On 08/03/17 11:28, Gandalf Corvotempesta wrote:
> Hi to all
> I'm trying to configure mdadm to do automatic replace/rebuild when a
> disk is phisically removed and replaced in a slot but without success

Do you mean you remove an old disk, and put a new blank disk in?
> 
> Is this possible? How?
> The new disk must be formatted or mdadm will replicate partition table
> on it's own?

If that's what you mean, then no, it's not possible. mdadm doesn't have
a clue about disks, what it sees is "block devices".

If you stick a new disk in, you need to tell mdadm about it. At which
point you can add it as a spare (which means mdadm will use it to
replace a disk that fails), or you can tell mdadm to replace a failed disk.

You should not - if you can help it - ever remove a disk and then
replace it. Yes in practice I know that's a luxury people often don't
have ... at best you should have spares configured; if you have to you
put the new drive in, use --replace, and then remove the old one. The
last resort is to remove the broken drive and then replace it - this is
likely to trigger further failures and bring down the array.

Cheers,
Wol


  reply	other threads:[~2017-03-08 18:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 11:28 Auto replace disk Gandalf Corvotempesta
2017-03-08 18:17 ` Wols Lists [this message]
2017-03-08 21:32   ` Gandalf Corvotempesta
2017-03-09  1:31     ` Brad Campbell
2017-03-09  9:07       ` Gandalf Corvotempesta
2017-03-09  2:08     ` Edward Kuns
2017-03-13 21:36     ` NeilBrown

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=58C04AC9.9070801@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 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.