Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2002 23:23:31 +0200
From:      Gerhard Sittig <Gerhard.Sittig@gmx.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: Software raid 1 on root partition?
Message-ID:  <20020711232331.U1494@shell.gsinet.sittig.org>
In-Reply-To: <E17Sk90-0001FQ-00@clever.eusc.inter.net>; from msch@snafu.de on Thu, Jul 11, 2002 at 10:02:29PM %2B0200
References:  <E17Sk90-0001FQ-00@clever.eusc.inter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 11, 2002 at 22:02 +0200, Matthias Schuendehuette wrote:
> 
> Gerhard Sittig wrote:
> > The trick is to load a kernel with software RAID support even
> > before you have a root filesystem with your kernel and modules
> > on it. :)  This is not different between Linux and FreeBSD.
> > Putting everything you need to boot into a ramdisk and loading
> > it with your favourite boot manager is the solution.
> 
> Ahm... where's the beef? I.e. where does this RAM-Disk Image come from?

Counter Question:  Where does the Linux boot RAM disk come from?

I understood the original question to be "I already do boot Linux
with a software RAID root fs -- can it be done with FreeBSD,
too?".  That's when I asked "how is this different?"  The admin
needs to have some media with a kernel and software RAID drivers
for Linux, too, to access the root fs and boot strap into a
running system (usually a RAM disk).  This image can be built by
the admin or he can have it built by the vendor.  I don't care
about it, it's no different in FreeBSD in any case.  And I don't
care which boot loader is used and how it accesses the RAM disk
image.  FreeBSD still has the exact same requirements.  Neither
system can magically overcome objective constraints. :]

> It's safe to *read* from one of the two disks, but what I don't 
> understand is:
> 
> Asume there are 4 disks: disk #1+#3 are RAID1 for -STABLE, disk #2+#4 
> are for -current. I want to boot -stable, so I try to load the RAM-Disk 
> Image from disk #1 - but it's crashed. How do I know what disk to use 
> next?

How does the boot manager used for Linux know?  I don't see the
differnce. :)  Experience tells me that LILO maps file data
blocks to BIOS addresses at "install time" and thus doesn't need
to interpret file systems and can boot from any disk the system
knows about which runs at install time.  While the FreeBSD boot
loader knows about ufs (and cd9660?) and reads the file at run
time by interpreting the file system.  But that's just an
implementation detail and doesn't change the situation should
the disk with the boot image be b0rken or unavailable.  It's as
simple as this:  Locate the RAM disk image wherever you want to
and use a boot manager of your choice.  All that's required is
that a kernel comes up which can handle software RAID to access
the root fs.

BTW was there a reason for my pointing to the installation media
and the livecd port.  You can boot a kernel by any means / from
any location and still get your root fs and everything mounted
thereunder from the RAID volumes.  You just have to get software
RAID support before accessing the root fs -- by statically
compiling it into the kernel or by loading modules from a RAM
disk or whatever you come up with.

Otherwise -- if you cannot boot the above mentioned software
RAID enabled kernel without accessing the root fs -- you are
stuck with hardware RAID.  But this is totally different from
the OS POV since hardware managed RAID volumes look and feel
like "just another simple harddisk".


And in all the thread's length I still question the benefit of
running your root fs in software RAID.  Since /tmp and /var and
/usr (and /home) usually all are separate partitions of their
own I don't see how the root fs could be often modified or
heavily stressed.  So a solid backup should suffice and can
easily save you from all the hassle outlined above.  If one
still does require RAID on the (mostly read only) root fs one
should switch to hardware RAID and get transparent support.

Remember:  It is the _non_ transparent RAID support which makes
you duplicate parts of your root fs on a media outside of your
root fs and keep this copy updated every time you change your
kernel or modules.  It's not the system's fault.  And it is not
at all different between the Linux and the FreeBSD setup.  Nor
would it be different with any other system.  Using "one half
of a RAID1 set" as a "degraded but still safe to read only disk"
is just a hack and works equally well or bad in any setup.


virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020711232331.U1494>