From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 22:54:48 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACA58106566B for ; Thu, 10 Apr 2008 22:54:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 745458FC0C for ; Thu, 10 Apr 2008 22:54:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.2/8.14.2) with ESMTP id m3AMsl46097793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 10 Apr 2008 17:54:47 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.2/8.14.2/Submit) id m3AMslQe097757 for freebsd-questions@freebsd.org; Thu, 10 Apr 2008 17:54:47 -0500 (CDT) (envelope-from dan) Date: Thu, 10 Apr 2008 17:54:47 -0500 From: Dan Nelson To: freebsd-questions@freebsd.org Message-ID: <20080410225447.GC4704@dan.emsphone.com> References: <20080410174523.GA5450@phoenix.nasreddine.info> <20080410181402.GA4704@dan.emsphone.com> <20080410190557.GB5450@phoenix.nasreddine.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080410190557.GB5450@phoenix.nasreddine.info> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: ZFS question... 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: Thu, 10 Apr 2008 22:54:48 -0000 In the last episode (Apr 10), Wael Nasreddine said: > This One Time, at Band Camp, Dan Nelson said, On Thu, Apr 10, 2008 at 01:14:02PM -0500: > > You don't necessarily need ZFS for this; gmirror would work just as > > well. You can split your 750GB drive into three > > partitions/slices/whatevers: > > > 160GB - mirror this with your physical 160GB disk > > 500GB - mirror this with your physical 500GB disk > > 90GB - leftover unmirrored, use at your peril > > > ZFS would let you take those two mirrored vdevs and stripe them into a > > single pool, but then again you could use gstripe or gconcat for that. > > The main benefit to ZFS would be if you regularly crash the system; > > fscking a 750gb UFS filesystem could take a while. > > That's not the desired behaviour actually, what I want is to gain the > maximum space without the possibility of loosing data, I hear that > ZFS is excellent at recovering data so I'm trying to figure out the > perfect installation with these drives and of course while keeping > the data safe... RAID0 is good for not wasting space at all but then > again if one drive fails I'll lose everything :( Thae above config will give you RAID1, not RAID0, since you're mirroring each small drive onto a part of your large drive. You'll end up with 160+500 = 660GB of mirrored storage, with 90gb of unmirrored space left over. If you use ZFS, you would do something like this: Replace /dev/md* with your usb devices, obviously :) # mdconfig -a -t swap -s 160G md1 # mdconfig -a -t swap -s 500G md2 # mdconfig -a -t swap -s 750G md3 # disklabel -R /dev/md3 /dev/stdin << DONE d: 160G * unknown e: 500G * unknown f: * * unknown DONE # zpool create usb mirror /dev/md1 /dev/md3d mirror /dev/md2 /dev/md3e # zpool list usb NAME SIZE USED AVAIL CAP HEALTH ALTROOT usb 655G 112K 655G 0% ONLINE - # zpool status usb pool: usb state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM usb ONLINE 0 0 0 mirror ONLINE 0 0 0 md1 ONLINE 0 0 0 md3d ONLINE 0 0 0 mirror ONLINE 0 0 0 md2 ONLINE 0 0 0 md3e ONLINE 0 0 0 errors: No known data errors # df -k /usb Filesystem 1024-blocks Used Avail Capacity Mounted on usb 676085632 0 676085632 0% /usb -- Dan Nelson dnelson@allantgroup.com