From: Wols Lists <antlists@youngman.org.uk>
To: Stefanie Leisestreichler
<stefanie.leisestreichler@peter-speer.de>,
linux-raid@vger.kernel.org
Subject: Re: RAID 1 | Restore based on Image of /dev/sda
Date: Mon, 4 May 2020 12:07:15 +0100 [thread overview]
Message-ID: <5EAFF763.2000906@youngman.org.uk> (raw)
In-Reply-To: <5e29b897-b2df-c6b9-019a-e037101bfeec@peter-speer.de>
On 04/05/20 11:48, Stefanie Leisestreichler wrote:
> Hi.
> I have a running RAID 1 based on /dev/sda1 and /dev/sda2 with
> metadata=1.2 with mdadm version 3.2.5.
>
> I took an image of /dev/sda using dd.
> There is a computer with identical hardware (test-env) where I put in
> this image. When I start this computer, it is booting and recognizing
> the raid active as md0 with state [2/1] [U_] like expected.
>
> My target is to restore the raid using another new and blank hard disk
> in the test-env computer. I know I have to format the new disk
> identically to the format the image is providing, but I am unsure about
> how to add the new disk to the raid array.
>
> Could you please guide me?
>
https://raid.wiki.kernel.org/index.php/Linux_Raid
Is the drive formatted with one big partition? I guess it is. What it
really cares about is that the new partition you are adding is identical
in size to the partition the raid is on.
There are tools that will copy a partition table for you - BEWARE - a
lot of things rely on GUIDs and at least the tools I know of don't reset
them by default - duplicate unique ids are not a good idea :-) So as you
copied this drive using dd DO NOT put it back in the original computer ...
https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm#Adding_a_drive_to_a_mirror
Cheers,
Wol
next prev parent reply other threads:[~2020-05-04 11:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 10:48 RAID 1 | Restore based on Image of /dev/sda Stefanie Leisestreichler
2020-05-04 10:59 ` Reindl Harald
2020-05-04 11:13 ` Stefanie Leisestreichler
2020-05-04 15:15 ` Stefanie Leisestreichler
2020-05-04 11:07 ` Wols Lists [this message]
2020-05-04 11:26 ` Stefanie Leisestreichler
2020-05-04 11:36 ` Johannes Truschnigg
2020-05-04 11:52 ` Stefanie Leisestreichler
2020-05-04 12:07 ` Wols Lists
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=5EAFF763.2000906@youngman.org.uk \
--to=antlists@youngman.org.uk \
--cc=linux-raid@vger.kernel.org \
--cc=stefanie.leisestreichler@peter-speer.de \
/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).