All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: d tbsky <tbskyd@gmail.com>
Cc: list Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: add new disk with dd
Date: Sat, 1 May 2021 11:07:30 +0100	[thread overview]
Message-ID: <608D2862.9090306@youngman.org.uk> (raw)
In-Reply-To: <CAC6SzH+JM9EWiB9kQNPaSm8prX-hK3N7D7yzB3Po3nS43fZJ3A@mail.gmail.com>

On 29/04/21 16:32, d tbsky wrote:
> Mateusz <mateusz-lists@ant.gliwice.pl>
>> Should in most cases [1], but IMHO it's good idea to
>> mdadm --zero-superblock /dev/YOU_ARE_SURE_IS_ONE_YOU_WANT_TO_ADD
>> before adding disk already used somewhere else.
> 
>    "madam --zero-superblock" is great.  I will add it to my procedure.
>    thanks a lot for the hint!
> 
>> BTW,  IMHO it's better to clone partition layout, and than install bootloaders
>> instead of dding disk.
> 
>    yes. but sometimes dd is easy, especially for mbr layout.
> anyway I think your suggestion "--zero-superblock" make things safe
> with new and old disks.
> 
I notice you said mbr ... because with GPT it will give you a broken
partition table.

Note also it will copy all your guids, so you don't EVER want those two
disks to be in the same system at the same time ...

I'd do what the others have suggested - copy the partition table,
re-install grub or whatever (you have got it documented what to do? :-)
It should be easy), and simply add your replacement partition.

Oh - and did you say it was raid-5? You've just busted your redundancy
during the most dangerous period of an array's life - the rebuild. If
you add the new disk to your system then do a --replace before removing
the old, your array is fully protected at all times and the only two
disks being hammered are the old one that's not working properly anyway,
and the new one that should be able to take it.

(The other thing about doing a proper rebuild, is you can use a larger
disk, and a larger partition, ready to upgrade the other disks and grow
your array.)

Cheers,
Wol

      parent reply	other threads:[~2021-05-01 10:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  8:52 add new disk with dd d tbsky
2021-04-29  9:05 ` Roman Mamedov
2021-04-29  9:21 ` Mateusz
2021-04-29 15:32   ` d tbsky
2021-04-29 15:34     ` Reindl Harald
2021-05-01 10:07     ` Wols Lists [this message]

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=608D2862.9090306@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=tbskyd@gmail.com \
    /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.