linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janek Kozicki <janek_listy@wp.pl>
To: linux-raid@vger.kernel.org
Subject: switching root fs '/' to boot from RAID1 with grub
Date: Tue, 30 Oct 2007 21:07:21 +0100	[thread overview]
Message-ID: <20071030210721.386ca2fa@absurd> (raw)

Hello,

I have and olde HDD and two new HDDs:

- hda1 - my current root filesystem '/'
- sda1 - part of raid1 /dev/md0 [U_U]
- hdc1 - part of raid1 /dev/md0 [U_U]

I want all hda1, sda1, hdc1 to be a raid1. I remounted hda1 readonly 
then I did 'dd if=/dev/hda1 of=/dev/md0'. I carefully checked that
the partition sizes match exactly. So now md0 contains the same thing
as hda1. 

But hda1 is still outside of the array. I want to add it to the array.
But before I do this I think that I should boot from /dev/md0 ?
Otherwise I might hose this system. I tried `grub-install /dev/sda1`
(assuming that grub would see no problem with reading raid1
partition, and boot from it, until mdadm detects an array). I tried
`grub-install /dev/sda` as well as on /dev/hdc and /dev/hdc1.
I turned off 'active' flag for partition hda1 and turned it on for hdc1
and sda1. But still grub is booting from hda1.

I did all this with version 1.1

mdadm --create --verbose /dev/md0 --chunk=64 --level=raid1 \
      --metadata=1.1  --bitmap=internal --raid-devices=3 /dev/sda1 \
      missing /dev/hdc1

I'm NOT using LVM here.

Can someone tell me how should I switch grub to boot from /dev/md0 ?

After the boot I will add hda1 to the array, and all three partitions
should become a raid1.

-- 
Janek Kozicki                                                         |

             reply	other threads:[~2007-10-30 20:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30 20:07 Janek Kozicki [this message]
2007-10-30 20:37 ` switching root fs '/' to boot from RAID1 with grub Janek Kozicki
2007-10-30 22:01 ` Doug Ledford
2007-10-31 15:01   ` Janek Kozicki
2007-10-31 17:38     ` Doug Ledford
2007-10-31 20:12       ` xosview + RAID (was: switching root fs '/'...) Janek Kozicki
2007-10-31 20:47         ` xosview + RAID David Greaves
2007-11-01 17:31   ` switching root fs '/' to boot from RAID1 with grub H. Peter Anvin
2007-11-01 18:30     ` Doug Ledford
2007-11-01 18:57       ` H. Peter Anvin
2007-11-02 15:55         ` Doug Ledford
2007-11-01 19:04       ` Janek Kozicki
2007-11-01 19:20         ` Doug Ledford
2007-11-02 16:36     ` berk walker
2007-11-04  3:18       ` Bill Davidsen
2007-11-04  3:44         ` H. Peter Anvin
2007-11-04  4:28           ` Bill Davidsen
2007-11-04 18:02             ` H. Peter Anvin

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=20071030210721.386ca2fa@absurd \
    --to=janek_listy@wp.pl \
    --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;
as well as URLs for NNTP newsgroup(s).