help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: booting from a raid1


From: Tom H
Subject: Re: booting from a raid1
Date: Tue, 5 Oct 2010 23:22:35 -0400

On Mon, Oct 4, 2010 at 9:46 AM, lee <address@hidden> wrote:
> On Sun, Oct 03, 2010 at 04:23:55PM -0400, Tom H wrote:
>>
>> 1. I forgot to ask earlier, are you running "grub-install /dev/sdd"
>> (and/or sdf)?
>
> Yes, both --- it creates a /boot directory when I'm using another
> partition for /boot, but no grub.cfg.


>> 2. Differences with setups that I've used:
>>
>> 2.a. I've never used the mdadm mdp option (I use md) or the fdisk da
>> option (I use fd).
>
> Hm, I don't know what these options are.

When I create an array, I create 6 raid autodetect (fd) partitions,
sda1, sda2, sda3, sdb1, sdb2, sdb3 and then either create a1/b1,
a2/b2, a3/b3 sets for "/", "/boot", swap with "mdadm --create ...
--auto=md ..." or do so through d-i.

I tried to re-create your setup in VBox. I looked for an option to
create a partitioned md device through d-i but it can only create a
non-partitioned device AFAICT. I also created a partitioned md device
using another install but I couldn't figure out, after running the
initial mdadm creation command, what to do next to carve out the
partitions and size them before booting from d-i to perform
installation. I must be missing something crucial here but no amount
of reading mdadm's man page or googling has helped me figure out the
next step... And d-i only sees one raid device.

As a WAG, I'd suggest that partitioned mdraid devices aren't supported
by grub2 (and maybe even grub1). But it's just a total WAG. I'm sure
that someone on the mdraid list would know.


>> 2.b. You're booted from sde1 and mount the md0p2 install's /tmp, /usr,
>> /var, /home, and /opt over the sde1 install's equivalents before
>> bind-mounting to the "/mnt/raid" mount of md0p2, and chrooting to it.
>> I would've mounted them directly to "/mnt/raid".
>
> sde1 is only the root partition, /tmp, /usr, /var and /opt are on
> partitions of md0, and /home is on md126. md126 is not partitioned. On
> /mnt/raid, the partition that needs to become the new root partition
> is mounted. Then the other partitions are bind-mounted to respective
> directories under /mnt/raid so that I can chroot to
> /mnt/raid. Mounting them directly to /mnt/raid would require to mount
> them twice.

I understand that /tmp, /usr, /var, and /opt are on md partitions.
What I don't understand, is that they are both the /tmp, /usr, /var,
and /opt of "/" on sde1 and of "/" on md0p2 and furthermore, in the
case of sde1, "/" is a single disk partition and /tmp, /usr, /var, and
/opt are mdraid devices (strange - to me - in and of itself).


>> 2.c. I only bind-mount /dev and create "normal" mounts for /dev/shm,
>> /proc, and /sys.
>>
>> I'm not sure if any of the points in (2) are causing your
>> "grub-install" failure but thought that I'd highlight them anyway.
>
> I guess they shouldn't since they are only there to allow me to run
> grub-install. From within chroot, /mnt/raid is the root
> partition.
>
> If I unmount everything except the old root partition and mount all
> others directly to the new root partition, grub-install will probably
> fail just the same way. I could try to manually make a grub.cfg which
> could probably be read from a separate /boot partition, but since
> there's no documentation, I don't know how to do that. It still won't
> allow me to have /boot on the RAID1.
>
> I'd also like to know before rebooting if it's going to work, but I've
> no way to tell. Trial and error is very risky because you never know
> if something happens when rebooting that overwrites your data.

If you want to have "/boot" on a separate non-mdadm'd disk, say sdg
(I've lost track of your disks but I think that it is the next
letter...), "/boot" can be "/dev/sdg1" and you'd then run
"grub-install /dev/sdg".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]