FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 09-18-2010, 03:13 PM
Matthew Topper
 
Default Software RAID + LVM + Grub

I'm playing with software RAID and LVM in some virtual machines and
I've run into an issue that I can't find a good answer to in the docs.

I have the following RAID setup:

md0: sda1 and sdb1, RAID 1. This is /boot

md1: sda2 and sdb2, RAID 1. This is a PV for LVM.

VolGroup00, this is the volume group and md1 is the only PV in it.

LogVol00 is swap
LogVol01 is /
LogVol02 is /home

So, I tested to see what happens if I disable sdb in virtualbox.
Machine booted find and I was able to see that part of the raid array
was gone.

I reattached the disk and rebuilt the array
mdam --add /dev/md0 /dev/sdb1
mdam --add /dev/md1 /dev/sdb2

The array rebuilt without issue. But now, if I remove sda, the machine
doesn't boot and grub complains. The question I have is how does one
reinstall the boot sector at this point? I'm a little confused as far
as to what device to install it on and what to specify as the root.

This is grub.conf if it helps:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
title CentOS (2.6.18-194.e15)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.e15 ro root=/dev/VolGroup00/LogVol01
initrd /initrd-2.6.18-194.e15.img

Grub has always been a little confusing for me, so I guess I don't
understand. What do the two root entries specify? And again, my main
question is how do I reinstall grub to the repaired disk? Sorry for
the lengthy post, I'm trying to provide as much information as possible.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-18-2010, 03:42 PM
Timo Schoeler
 
Default Software RAID + LVM + Grub

On 09/18/2010 05:13 PM, Matthew Topper wrote:
> I'm playing with software RAID and LVM in some virtual machines and
> I've run into an issue that I can't find a good answer to in the docs.
>
> I have the following RAID setup:
>
> md0: sda1 and sdb1, RAID 1. This is /boot
>
> md1: sda2 and sdb2, RAID 1. This is a PV for LVM.
>
> VolGroup00, this is the volume group and md1 is the only PV in it.
>
> LogVol00 is swap
> LogVol01 is /
> LogVol02 is /home
>
> So, I tested to see what happens if I disable sdb in virtualbox.
> Machine booted find and I was able to see that part of the raid array
> was gone.
>
> I reattached the disk and rebuilt the array
> mdam --add /dev/md0 /dev/sdb1
> mdam --add /dev/md1 /dev/sdb2
>
> The array rebuilt without issue. But now, if I remove sda, the machine
> doesn't boot and grub complains. The question I have is how does one
> reinstall the boot sector at this point? I'm a little confused as far
> as to what device to install it on and what to specify as the root.
>
> This is grub.conf if it helps:
>
> default=0
> timeout=5
> splashimage=(hd0,0)/grub/splash.xpm.gz
> title CentOS (2.6.18-194.e15)
> root (hd0,0)
> kernel /vmlinuz-2.6.18-194.e15 ro root=/dev/VolGroup00/LogVol01
> initrd /initrd-2.6.18-194.e15.img
>
> Grub has always been a little confusing for me, so I guess I don't
> understand. What do the two root entries specify? And again, my main
> question is how do I reinstall grub to the repaired disk? Sorry for
> the lengthy post, I'm trying to provide as much information as possible.

http://wiki.centos.org/HowTos/CentOS5ConvertToRAID#head-fa2b73a28acdf965daa1e018962eaa8cbd94110c

HTH,

Timo
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-18-2010, 06:41 PM
Matthew Topper
 
Default Software RAID + LVM + Grub

Entering those commands exactly worked, but I'm not sure why it
worked. So, it's progress.

I need to find some good reference on GRUB, which seems difficult
because most things I can find are about GRUB2, and CentOS has 0.97

On Sat, 18 Sep 2010 17:42:59 +0200
Timo Schoeler <timo.schoeler@riscworks.net> wrote:

> On 09/18/2010 05:13 PM, Matthew Topper wrote:
> > I'm playing with software RAID and LVM in some virtual machines and
> > I've run into an issue that I can't find a good answer to in the
> > docs.
> >
> > I have the following RAID setup:
> >
> > md0: sda1 and sdb1, RAID 1. This is /boot
> >
> > md1: sda2 and sdb2, RAID 1. This is a PV for LVM.
> >
> > VolGroup00, this is the volume group and md1 is the only PV in it.
> >
> > LogVol00 is swap
> > LogVol01 is /
> > LogVol02 is /home
> >
> > So, I tested to see what happens if I disable sdb in virtualbox.
> > Machine booted find and I was able to see that part of the raid
> > array was gone.
> >
> > I reattached the disk and rebuilt the array
> > mdam --add /dev/md0 /dev/sdb1
> > mdam --add /dev/md1 /dev/sdb2
> >
> > The array rebuilt without issue. But now, if I remove sda, the
> > machine doesn't boot and grub complains. The question I have is
> > how does one reinstall the boot sector at this point? I'm a little
> > confused as far as to what device to install it on and what to
> > specify as the root.
> >
> > This is grub.conf if it helps:
> >
> > default=0
> > timeout=5
> > splashimage=(hd0,0)/grub/splash.xpm.gz
> > title CentOS (2.6.18-194.e15)
> > root (hd0,0)
> > kernel /vmlinuz-2.6.18-194.e15 ro
> > root=/dev/VolGroup00/LogVol01 initrd /initrd-2.6.18-194.e15.img
> >
> > Grub has always been a little confusing for me, so I guess I don't
> > understand. What do the two root entries specify? And again, my
> > main question is how do I reinstall grub to the repaired disk?
> > Sorry for the lengthy post, I'm trying to provide as much
> > information as possible.
>
> http://wiki.centos.org/HowTos/CentOS5ConvertToRAID#head-fa2b73a28acdf965daa1e018962eaa8cbd94110c
>
> HTH,
>
> Timo
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-18-2010, 09:47 PM
Tom H
 
Default Software RAID + LVM + Grub

On Sat, Sep 18, 2010 at 2:41 PM, Matthew Topper <topperm9@gmail.com> wrote:
> On Sat, 18 Sep 2010 17:42:59 +0200 Timo Schoeler <timo.schoeler@riscworks.net> wrote:
>
>> On 09/18/2010 05:13 PM, Matthew Topper wrote:
>> > I'm playing with software RAID and LVM in some virtual machines and
>> > I've run into an issue that I can't find a good answer to in the
>> > docs.
>> >
>> > I have the following RAID setup:
>> >
>> > md0: sda1 and sdb1, RAID 1. *This is /boot
>> >
>> > md1: sda2 and sdb2, RAID 1. *This is a PV for LVM.
>> >
>> > VolGroup00, this is the volume group and md1 is the only PV in it.
>> >
>> > LogVol00 is swap
>> > LogVol01 is /
>> > LogVol02 is /home
>> >
>> > So, I tested to see what happens if I disable sdb in virtualbox.
>> > Machine booted find and I was able to see that part of the raid
>> > array was gone.
>> >
>> > I reattached the disk and rebuilt the array
>> > mdam --add /dev/md0 /dev/sdb1
>> > mdam --add /dev/md1 /dev/sdb2
>> >
>> > The array rebuilt without issue. *But now, if I remove sda, the
>> > machine doesn't boot and grub complains. *The question I have is
>> > how does one reinstall the boot sector at this point? *I'm a little
>> > confused as far as to what device to install it on and what to
>> > specify as the root.
>> >
>> > This is grub.conf if it helps:
>> >
>> > default=0
>> > timeout=5
>> > splashimage=(hd0,0)/grub/splash.xpm.gz
>> > title CentOS (2.6.18-194.e15)
>> > * * root (hd0,0)
>> > * * kernel /vmlinuz-2.6.18-194.e15 ro
>> > root=/dev/VolGroup00/LogVol01 initrd /initrd-2.6.18-194.e15.img
>> >
>> > Grub has always been a little confusing for me, so I guess I don't
>> > understand. *What do the two root entries specify? *And again, my
>> > main question is how do I reinstall grub to the repaired disk?
>>
>> http://wiki.centos.org/HowTos/CentOS5ConvertToRAID#head-fa2b73a28acdf965daa1e018962eaa8cbd94110c
>
> Entering those commands exactly worked, but I'm not sure why it
> worked. So, it's progress.
>
> I need to find some good reference on GRUB, which seems difficult
> because most things I can find are about GRUB2, and CentOS has 0.97

The commands installed grub into the mbr of sdb that way you can boot
from either sda or sdb if the other is missing.

You should always do that when booting from raid1
http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5

GRUB1 manual
http://www.gnu.org/software/grub/manual/legacy/grub.html

Good link (AFAIR)
http://members.iinet.net.au/~herman546/p15.html
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-20-2010, 12:51 PM
Matthew Topper
 
Default Software RAID + LVM + Grub

Thanks. That third link especially helped.

On Sat, Sep 18, 2010 at 5:47 PM, Tom H <tomh0665@gmail.com> wrote:
> On Sat, Sep 18, 2010 at 2:41 PM, Matthew Topper <topperm9@gmail.com> wrote:
>> On Sat, 18 Sep 2010 17:42:59 +0200 Timo Schoeler <timo.schoeler@riscworks.net> wrote:
>>
>>> On 09/18/2010 05:13 PM, Matthew Topper wrote:
>>> > I'm playing with software RAID and LVM in some virtual machines and
>>> > I've run into an issue that I can't find a good answer to in the
>>> > docs.
>>> >
>>> > I have the following RAID setup:
>>> >
>>> > md0: sda1 and sdb1, RAID 1. *This is /boot
>>> >
>>> > md1: sda2 and sdb2, RAID 1. *This is a PV for LVM.
>>> >
>>> > VolGroup00, this is the volume group and md1 is the only PV in it.
>>> >
>>> > LogVol00 is swap
>>> > LogVol01 is /
>>> > LogVol02 is /home
>>> >
>>> > So, I tested to see what happens if I disable sdb in virtualbox.
>>> > Machine booted find and I was able to see that part of the raid
>>> > array was gone.
>>> >
>>> > I reattached the disk and rebuilt the array
>>> > mdam --add /dev/md0 /dev/sdb1
>>> > mdam --add /dev/md1 /dev/sdb2
>>> >
>>> > The array rebuilt without issue. *But now, if I remove sda, the
>>> > machine doesn't boot and grub complains. *The question I have is
>>> > how does one reinstall the boot sector at this point? *I'm a little
>>> > confused as far as to what device to install it on and what to
>>> > specify as the root.
>>> >
>>> > This is grub.conf if it helps:
>>> >
>>> > default=0
>>> > timeout=5
>>> > splashimage=(hd0,0)/grub/splash.xpm.gz
>>> > title CentOS (2.6.18-194.e15)
>>> > * * root (hd0,0)
>>> > * * kernel /vmlinuz-2.6.18-194.e15 ro
>>> > root=/dev/VolGroup00/LogVol01 initrd /initrd-2.6.18-194.e15.img
>>> >
>>> > Grub has always been a little confusing for me, so I guess I don't
>>> > understand. *What do the two root entries specify? *And again, my
>>> > main question is how do I reinstall grub to the repaired disk?
>>>
>>> http://wiki.centos.org/HowTos/CentOS5ConvertToRAID#head-fa2b73a28acdf965daa1e018962eaa8cbd94110c
>>
>> Entering those commands exactly worked, but I'm not sure why it
>> worked. *So, it's progress.
>>
>> I need to find some good reference on GRUB, which seems difficult
>> because most things I can find are about GRUB2, and CentOS has 0.97
>
> The commands installed grub into the mbr of sdb that way you can boot
> from either sda or sdb if the other is missing.
>
> You should always do that when booting from raid1
> http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5
>
> GRUB1 manual
> http://www.gnu.org/software/grub/manual/legacy/grub.html
>
> Good link (AFAIR)
> http://members.iinet.net.au/~herman546/p15.html
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-21-2010, 03:03 AM
Tom H
 
Default Software RAID + LVM + Grub

On Mon, Sep 20, 2010 at 8:51 AM, Matthew Topper <topperm9@gmail.com> wrote:
> On Sat, Sep 18, 2010 at 5:47 PM, Tom H <tomh0665@gmail.com> wrote:
>>>
>>> I need to find some good reference on GRUB, which seems difficult
>>> because most things I can find are about GRUB2, and CentOS has 0.97
>>
>> The commands installed grub into the mbr of sdb that way you can boot
>> from either sda or sdb if the other is missing.
>>
>> You should always do that when booting from raid1
>> http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5
>>
>> GRUB1 manual
>> http://www.gnu.org/software/grub/manual/legacy/grub.html
>>
>> Good link (AFAIR)
>> http://members.iinet.net.au/~herman546/p15.html
>
> Thanks. That third link especially helped.

You're welcome.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 05:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org