From: Reindl Harald <h.reindl@thelounge.net>
To: Peter Sangas <pete@wnsdev.com>, linux-raid@vger.kernel.org
Subject: Re: GRUB warning after replacing disk drive in RAID1
Date: Thu, 2 Mar 2017 10:54:47 +0100 [thread overview]
Message-ID: <0060f09f-b82f-f35b-55fb-8125c21c5403@thelounge.net> (raw)
In-Reply-To: <008101d292e4$b1aeafe0$150c0fa0$@wnsdev.com>
Am 02.03.2017 um 00:36 schrieb Peter Sangas:
> Hi Reindl,
>
> My comments are interleaved. thanks:
> ___________________________________________________
>
>> #!/bin/bash
>
>> GOOD_DISK="/dev/sda"
>> BAD_DISK="/dev/sdc"
>
>> # clone MBR
>> dd if=$GOOD_DISK of=$BAD_DISK bs=512 count=1
>
> Here I run the command sfdisk -d /dev/$GOOD_DISK | sfdisk -f /dev/$BAD_DISK.
>
> I think dd and sfdisk are doing the same thing which is cloning the
> partitions and copy the MBR ?
yes
>> # force OS to read partition tables
>> partprobe $BAD_DISK
>
> Why run partprobe if the partitions have not changed?
because they *have* changed when you replace a disk with a complete
empty one and clone the MBR and partition table with 3 partitions and
have bootet with a empty partition table - not every hardware supports
hotswap proper and even if it don't harm
>> # install bootloader on replacement disk grub2-install "$BAD_DISK"
>
> Here don't you mean grub-install not grub2-install?
no, i mean what i say since that script replaced multiple disks on
multiple machines - but how does it matter which name a binary has on
whatever distribution?
[harry@srv-rhsoft:~]$ rpm -q --filesbypkg grub2 | grep install
[harry@srv-rhsoft:~]$ rpm -q --filesbypkg grub2-tools | grep install
grub2-tools /usr/sbin/grub2-install
grub2-tools /usr/share/man/man8/grub2-install.8.gz
[harry@srv-rhsoft:~]$ cat /etc/redhat-release
Generic release 24 (Generic)
next prev parent reply other threads:[~2017-03-02 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 23:37 GRUB warning after replacing disk drive in RAID1 Peter Sangas
2017-02-28 9:23 ` Reindl Harald
2017-02-28 21:01 ` Peter Sangas
2017-02-28 22:34 ` Reindl Harald
2017-02-28 23:15 ` Peter Sangas
2017-03-01 0:12 ` Reindl Harald
2017-03-01 23:36 ` Peter Sangas
2017-03-02 9:54 ` Reindl Harald [this message]
2017-03-01 18:29 ` Phil Turmel
2017-03-01 22:13 ` Reindl Harald
2017-03-02 2:42 ` Phil Turmel
2017-03-02 13:15 ` Wols Lists
2017-03-01 23:51 ` Peter Sangas
2017-03-02 0:05 ` Phil Turmel
2017-03-02 23:00 ` Peter Sangas
2017-03-02 13:17 ` Wols Lists
2017-03-06 22:13 ` Peter Sangas
2017-03-07 12:54 ` Wols Lists
2017-03-07 13:00 ` Reindl Harald
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=0060f09f-b82f-f35b-55fb-8125c21c5403@thelounge.net \
--to=h.reindl@thelounge.net \
--cc=linux-raid@vger.kernel.org \
--cc=pete@wnsdev.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.