From owner-freebsd-stable@FreeBSD.ORG Wed Jan 17 15:39:18 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5299F16A412 for ; Wed, 17 Jan 2007 15:39:18 +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 2E2F413C441 for ; Wed, 17 Jan 2007 15:39:17 +0000 (UTC) (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 l0HFdHcG046003; Wed, 17 Jan 2007 07:39:17 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-stable@freebsd.org Date: Wed, 17 Jan 2007 10:36:21 -0500 User-Agent: KMail/1.9.5 References: <20070117103935.GC4018@genius.tao.org.uk> In-Reply-To: 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="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701171036.21534.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: fs@freebsd.org Subject: Re: gmirror disks vs partitions X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 15:39:18 -0000 On Wednesday 17 January 2007 06:29, Andrew Pantyukhin wrote: > On 1/17/07, Josef Karthauser wrote: > > A poll for opinions if I may? > > > > I've got a few gmirrors running on various machines, all of which > > pair up two drives at the physical level (i.e. mirror /dev/ad0s1 > > with /dev/ad1s1). Of course there are other ways of doing it to, > > like mirroring at the partition level, ie pairing /dev/ad0s1a with > > /dev/ad1s1a, /dev/ad0s1e with /dev/ad0s1e, etc. > > > > Apart from potentially avoiding a whole disk from being copied > > during a resync after a crash, are there any other advantages to > > using partition level mirroring instead of drive level mirroring? > > I can imagine people using partition-level raid to > implement a popular configuration: > > You divide a couple of identical drives proportionally > in two partitions each, place a couple of the first > partitions into gmirror and a couple of the second > ones into gstripe. This way you get both reliable and > fast storage with just two drives. Some strings are > attached. The reduced likelihood of needing to rebuild a given volume is usually enough of an argument for me to mirror at the partition level. Of course, the other side of the coin is that if more than one volume on a given pair of disks needs to be rebuilt, the disks will be twice (or more) as hammered (and less efficient due to the greater number of seeks) during the rebuild(s). If you want to be creative/exotic then it's sometimes useful to use partitions as building blocks for odd (or "advanced") volume configurations. For instance, let's say you're trying to get some disk redundancy for your workstation but you're limited to whatever drives you can scrounge up. (Have _I_ ever been in this position? nah... :) ) You have a 40GB disk, a 60GB disk, and an 80GB disk. If you partition them up right and use gmirror with gstripe, it's possible to use all of the space and still be able to survive the failure of any one disk. Divide everything up into partitions of equal sizes. For an even number of disks you can use the GCD of the sizes as the partition size, but since there's an odd number of disks in this example we'll use GCD/2 or ~10GB. Pair one partition on the 40GB disk with one on the 60GB disk. Then pair all of the partitions on the 80GB disk with the remaining partitions on the 40 and 60 GB disks. Make each pair into a gmirror volume. If you need to boot from the array, pick one pair to be your system volume. The rest of the gmirrors can all be added into a gstripe volume, so you end up with 90GB (or 80+10) of redundant storage with quite good performance (not that I would know, of course). You can use the leftover bits for swap, etc. The two drawbacks to this approach vs a two-disk mirror are increased likelihood of drive failure (due to the greater number of disks) and a more complex recovery procedure if a drive fails (especially if you don't have a spare identical to or slightly larger than the one that failed). Just some thoughts.. JN