linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Raid1 and mdadm
@ 2003-03-31 17:22 Cress, Andrew R
  2003-04-01 16:07 ` Paul Clements
  0 siblings, 1 reply; 10+ messages in thread
From: Cress, Andrew R @ 2003-03-31 17:22 UTC (permalink / raw)
  To: linux-raid


You can use grub for root mirroring (software raid-1), but grub currently
does not write the Master Boot Record to the 2nd disk, so you have to do
that manually the first time.  Sample script below:
# 
tmpa=/tmp/a
tmpg=/tmp/grub.out
cat - <<%%% >$tmpa
install (hd0,0)/grub/stage1 (hd1) (hd1,0)/grub/stage2 (hd0,0)/grub/grub.conf
quit
%%%
grub <$tmpa  >$tmpg 2>&1
# 

However, you MUST link the md driver into the kernel.  It doesn't work right
as a module, even in initrd.
That's probably why it panic'd.

Andy

-----Original Message-----
From: Friedrich Lobenstock [mailto:fl@fl.priv.at] 
Sent: Monday, March 31, 2003 6:35 AM
To: Linux RAID Mailing Liste
Subject: Re: Raid1 and mdadm


Max Booker wrote:
> 
> GRUB boot loader
> 
>     hda1    /boot
>     hda2    /
>     hda3    swap
> 
>     hdd1    (intended) mirror partition of  /
> 
> I can create the (degraded) array on hdd1, mkfs on /dev/md0, mount
/dev/md0
> as /mnt, copy / to /mnt, and edit /mnt/etc/fstab.
> 
> Everything works well up to the point where I reboot, with kernel
parameters
> (md=0,/dev/hdd1 root=/dev/md0). This is where the kernel panics.
> 
> I think that I have not edited fstab properly, or GRUB is getting in the
> way, or maybe it is not possible to add hda2 to the array because it
already
> has a filesystem on it.... How do I get hda2 to be part of the Raid array?
> Nothing attempted so far has made any impression on the fact that mdadm
> insists that /dev/hda2 is not an md component.
> 

As far as I know you have to use LILO instead of GRUB to boot
from a root raid. Take care that raid1 is compiled into the kernel.

-- 
MfG / Regards
Friedrich Lobenstock

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Raid1 and mdadm
@ 2003-04-01 16:43 Cress, Andrew R
  0 siblings, 0 replies; 10+ messages in thread
From: Cress, Andrew R @ 2003-04-01 16:43 UTC (permalink / raw)
  To: 'Paul Clements', linux-raid

Well, it might be convenient otherwise, but it makes sense that if you want
to boot from the software RAID, that you have to ensure that the md driver
is loaded early enough to recognize that the RAID is configured before it
tries to boot from SCSI alone.

If you aren't booting from the software RAID, md can be a module.  
Also, the other SCSI and RAID components can be modules as long as
CONFIG_BLK_DEV_MD=y.

Andy

-----Original Message-----
From: Paul Clements [mailto:Paul.Clements@SteelEye.com] 
Sent: Tuesday, April 01, 2003 11:08 AM
To: linux-raid@vger.kernel.org
Subject: Re: Raid1 and mdadm


"Cress, Andrew R" wrote:

> However, you MUST link the md driver into the kernel.  It doesn't work
right
> as a module, even in initrd.

BTW, it would be nice if this were fixed, so that md could be compiled
as a module...would the maintainers be willing to accept patches that
would make "autostart" a module option, so that upon insertion of the md
module it would do the autostart stuff, or something similar? From what
I can tell, we basically need to remove some ifndef MODULE stuff and
make the autostart option call autostart_arrays(), as it is when md is
linked into the kernel...

Or is there a better way to do this?

--
Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Raid1 and mdadm
@ 2003-03-31 13:33 Sarcar, Shourya C (MED)
  0 siblings, 0 replies; 10+ messages in thread
From: Sarcar, Shourya C (MED) @ 2003-03-31 13:33 UTC (permalink / raw)
  To: Linux RAID Mailing Liste

Max,

Even if RAID is not compiled into the kernel, you can build an initrd
image (man mkinitrd) and change /etc/lilo.conf to point to the new
initrd image.
This way you will override the pains of a 'proper' kernel compile. 

Thanks
Shourya Sarcar 
_____________________________________________________
Global Recon Engine, Computed Tomography
Edison Engineering Development Program, GE Medical Systems
3000 N Grandview Blvd., MS W 1200, Waukesha, WI 53188, USA
Tel: 262 312 7405 (O) | *320 7405 (DialComm)
 


> -----Original Message-----
> From: Friedrich Lobenstock [mailto:fl@fl.priv.at]
> Sent: Monday, March 31, 2003 5:35 AM
> To: Linux RAID Mailing Liste
> Subject: Re: Raid1 and mdadm
> 
> 
> Max Booker wrote:
> > 
> > GRUB boot loader
> > 
> >     hda1    /boot
> >     hda2    /
> >     hda3    swap
> > 
> >     hdd1    (intended) mirror partition of  /
> > 
> > I can create the (degraded) array on hdd1, mkfs on 
> /dev/md0, mount /dev/md0
> > as /mnt, copy / to /mnt, and edit /mnt/etc/fstab.
> > 
> > Everything works well up to the point where I reboot, with 
> kernel parameters
> > (md=0,/dev/hdd1 root=/dev/md0). This is where the kernel panics.
> > 
> > I think that I have not edited fstab properly, or GRUB is 
> getting in the
> > way, or maybe it is not possible to add hda2 to the array 
> because it already
> > has a filesystem on it.... How do I get hda2 to be part of 
> the Raid array?
> > Nothing attempted so far has made any impression on the 
> fact that mdadm
> > insists that /dev/hda2 is not an md component.
> > 
> 
> As far as I know you have to use LILO instead of GRUB to boot
> from a root raid. Take care that raid1 is compiled into the kernel.
> 
> -- 
> MfG / Regards
> Friedrich Lobenstock
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Raid1 and mdadm
@ 2003-03-29 20:28 Max Booker
  2003-03-29 21:54 ` Mads Peter Bach
  2003-03-31 11:34 ` Friedrich Lobenstock
  0 siblings, 2 replies; 10+ messages in thread
From: Max Booker @ 2003-03-29 20:28 UTC (permalink / raw)
  To: Raid

Hello

I am a Linux newbie, using Redhat Linux 7.3 Kernel 2.4.18-17.7.x on an Asus
7V333 with Promise Raid Controller (disabled).

I would like to understand more about Raid in a Linux environment, except
that all the documentation I have read seems not to apply to my case.

I understand that mdadm is better than raidtools, but I still cannot get my
head around the concept of how Linux Raid works.

Neil Brown gave a reply to splee in April, which seems to be relatively
straightforward - however, when I try this method, I get a kernel panic.

My setup is as follows:

GRUB boot loader

    hda1    /boot
    hda2    /
    hda3    swap

    hdd1    (intended) mirror partition of  /

I can create the (degraded) array on hdd1, mkfs on /dev/md0, mount /dev/md0
as /mnt, copy / to /mnt, and edit /mnt/etc/fstab.

Everything works well up to the point where I reboot, with kernel parameters
(md=0,/dev/hdd1 root=/dev/md0). This is where the kernel panics.

I think that I have not edited fstab properly, or GRUB is getting in the
way, or maybe it is not possible to add hda2 to the array because it already
has a filesystem on it.... How do I get hda2 to be part of the Raid array?
Nothing attempted so far has made any impression on the fact that mdadm
insists that /dev/hda2 is not an md component.

I hope that this is enough info.

Best regards

Max Booker


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-04-02 20:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-31 17:22 Raid1 and mdadm Cress, Andrew R
2003-04-01 16:07 ` Paul Clements
2003-04-01 23:08   ` Neil Brown
2003-04-02 20:22     ` Paul Clements
2003-04-02 20:34       ` Paul Clements
  -- strict thread matches above, loose matches on Subject: below --
2003-04-01 16:43 Cress, Andrew R
2003-03-31 13:33 Sarcar, Shourya C (MED)
2003-03-29 20:28 Max Booker
2003-03-29 21:54 ` Mads Peter Bach
2003-03-31 11:34 ` Friedrich Lobenstock

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).