From owner-freebsd-questions@FreeBSD.ORG Fri Jul 14 18:41:07 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FED716A4DE for ; Fri, 14 Jul 2006 18:41:07 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB5CA43D46 for ; Fri, 14 Jul 2006 18:41:06 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id k6EIf3HR061361; Fri, 14 Jul 2006 11:41:05 -0700 (PDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: stan Date: Fri, 14 Jul 2006 14:41:02 -0400 User-Agent: KMail/1.9.3 References: <20060713123434.GB30789@teddy.fas.com> <200607141111.48098.lists@jnielsen.net> <20060714173944.GB23323@teddy.fas.com> In-Reply-To: <20060714173944.GB23323@teddy.fas.com> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607141441.03132.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on ns1.jnielsen.net X-Virus-Status: Clean Cc: freebsd-questions@freebsd.org Subject: Re: Best way to create a large data space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2006 18:41:07 -0000 On Friday 14 July 2006 13:39, stan wrote: > On Fri, Jul 14, 2006 at 11:11:47AM -0400, John Nielsen wrote: > > On Friday 14 July 2006 10:37, John Nielsen wrote: > > > On Thursday 13 July 2006 20:24, stan wrote: > > > > On Thu, Jul 13, 2006 at 04:20:56PM -0400, John Nielsen wrote: > > > > > On Thursday 13 July 2006 08:34, stan wrote: > > > > > > i have a Sun Ultra 40 with 4 500F SATA drives. I plan on using > > > > > > this machine primarily for a large data storage requirement. > > > > > > > > > > > > What I want is one large /data partition. Given all the choices > > > > > > for doing this in FreeBSD (software) what's the "best" choice > > > > > > here? The partio will be shared via SAMBA if that affects the > > > > > > thhinking here. > > > > > > > > > > "Best" really depends on what your needs and goals are. Here's a > > > > > quick overview of what the choices ARE, based mostly on memory. > > > > > Corrections and additions welcome. I'll try to make some notes > > > > > about pros and cons as well. > > > > > > > > Thanks for the nice summary. > > > > > > > > The data will be backed up nightly, so I'll probably use gstirpe to > > > > get the maximum capicty. RAID5 would not work very well with 3 x 500G > > > > (asuuming that I can't use the 500G that I put the system on). > > > > > > If that's really what you want to do then here are a couple more tips. > > > You can't boot from a gstripe volume, and when (not if) one of your > > > drives goes bad you'll be happier if you only lose your data and not > > > your entire OS. So plan to partition the drives and use gmirror for the > > > base OS (since you can boot from a gmirror volume). Make a relatively > > > small partition (10GB?) at the beginning of each drive. Make a gmirror > > > volume using two or three of them and install the OS to that volume. > > > Use the remaining one or two small partitions for swap or utility > > > partitions. Then make your giant gstripe volume out of the large > > > partitions on all four drives. > > > > Or better yet, make a gvinum RAID5 volume with the four large partitions. > > K, I think I'm convinced. That would give me 1.5TB for my 2TB of physical > disk. Roughly speaking. > Got a pointer to docs on how to install the base OS on a RAID5 config? I'm not sure you can boot from a RAID5 volume, and it's tricky to boot from a gvinum volume at all. I would still recommend partitioning and installing the OS to a gmirror volume, and then set up your gvinum RAID5 after the fact. Unfortunately, sysinstall doesn't grok advanced disk setups very well, so you'll have to get started manually. I would do this: Download and burn a FreeBSD 6.1 Install CD (disc 1) and boot from it. Go into "Fixit" mode. Set up the basic partitions and a degraded gmirror volume (with only one member) rom the "Fixit" console. Repeat all of the fdisk and bsdlabel steps for each disk, substituting your real disk names for ad0 below: fdisk -BI ad0 [repeat for all disks] bsdlabel -wB ad0s1 [repeat for all disks] bsdlabel -e ad0s1 [manually shrink the 'a' partition (which you'll use as the 'small' one) and create a 'd' partition (which you'll use as the 'large' one). Calculator, pencil and paper (or their equivalents on another computer) are useful here.] [repeat for all disks] kldload geom_mirror gmirror label -b load myrootfs /dev/ad0s1a [You can replace 'myrootfs' with a volume name of your choosing. Perform this step only for the disk the computer BIOS is set to boot from. Do not repeat for the other disks.] newfs -U /dev/mirror/myrootfs exit Exit sysinstall and reboot; boot from the CD again. Perform a "Standard" install. Mount '/' on the existing ad0s1a (or the device name used in the "gmirror label" step). Do not mount or create any other partitions (or swap, yet). Perform the remainder of the install as normal. Reboot after the installation, and remove the CD. Allow the system to come all the way up to multi-user to be sure there aren't any problems. Log in as root. Drop back down to single-user: shutdown now Edit /boot/loader.conf and add the line geom_mirror_load="YES" Edit /etc/fstab. Change the line for / to use /dev/mirror/myrootfs instead of /dev/ad0s1a. Add a line like "/dev/ad3s1a none swap sw 0 0" to use the small partition on a drive not to be included in the mirror as swap space. Reboot: fastboot Bring the system up in single-user mode from the boot menu. Add the additional partition(s) to the mirror set: gmirror insert myrootfs /dev/ad1s1a [/dev/ad2s1a] Wait for the rebuild to complete. You can check the status by typing: gmirror status Reboot: fastboot Allow the system to come all the way up to multi-user. Verify that the mirror is being used as the root device and is healthy, and that swap has been enabled. At this point you will now have a fully functional, mirrored FreeBSD installation. Refer to existing [g]vinum documentation for details on setting up RAID5. You will use the ad[0-3]s1d devices as members of the array. JN