From owner-freebsd-stable Thu Jul 11 21:17:26 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6179037B400 for ; Thu, 11 Jul 2002 21:17:23 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 0E6F343E09 for ; Thu, 11 Jul 2002 21:17:22 -0700 (PDT) (envelope-from Gerhard.Sittig@gmx.net) Received: (qmail 8770 invoked by uid 0); 12 Jul 2002 04:17:15 -0000 Received: from p5091045d.dip0.t-ipconnect.de (HELO mail.gsinet.sittig.org) (80.145.4.93) by mail.gmx.net (mp015-rz3) with SMTP; 12 Jul 2002 04:17:15 -0000 Received: (qmail 18639 invoked from network); 11 Jul 2002 21:23:39 -0000 Received: from shell.gsinet.sittig.org (192.168.11.153) by mail.gsinet.sittig.org with SMTP; 11 Jul 2002 21:23:39 -0000 Received: (from sittig@localhost) by shell.gsinet.sittig.org (8.11.3/8.11.3) id g6BLNVC18626 for freebsd-stable@freebsd.org; Thu, 11 Jul 2002 23:23:31 +0200 (CEST) (envelope-from sittig) Date: Thu, 11 Jul 2002 23:23:31 +0200 From: Gerhard Sittig To: freebsd-stable@freebsd.org Subject: Re: Software raid 1 on root partition? Message-ID: <20020711232331.U1494@shell.gsinet.sittig.org> Mail-Followup-To: freebsd-stable@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from msch@snafu.de on Thu, Jul 11, 2002 at 10:02:29PM +0200 Organization: System Defenestrators Inc. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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