From owner-freebsd-doc@FreeBSD.ORG Mon Jun 4 19:39:19 2012 Return-Path: Delivered-To: doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FAD9106566B; Mon, 4 Jun 2012 19:39:19 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 597458FC0C; Mon, 4 Jun 2012 19:39:19 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q54JdIlA001008; Mon, 4 Jun 2012 13:39:18 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q54JdIIH001005; Mon, 4 Jun 2012 13:39:18 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 4 Jun 2012 13:39:18 -0600 (MDT) From: Warren Block To: Hiroki Sato In-Reply-To: <20120605.005134.320058107548486045.hrs@allbsd.org> Message-ID: References: <20120604.182331.536549548943660058.hrs@allbsd.org> <20120605.005134.320058107548486045.hrs@allbsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 04 Jun 2012 13:39:18 -0600 (MDT) Cc: doc@freebsd.org Subject: Re: Handbook mirroring section X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 19:39:19 -0000 On Tue, 5 Jun 2012, Hiroki Sato wrote: > Warren Block wrote > in : > > wb> This procedure works well when the new drive's capacity is no larger > wb> than the old drive's capacity. > wb> > wb> The problem I had was when the new drive was larger than the old > wb> drive. gmirror creates a mirror on the new, larger drive using the > wb> full space available (1T). The old drive (250G, say) can't be > wb> inserted in this mirror because it's not large enough. > > Ah, true. I did not notice the pitfall. I updated the diff to solve > the issue: > > http://people.allbsd.org/~hrs/FreeBSD/geom-mirror-2.html > http://people.allbsd.org/~hrs/FreeBSD/geom-chapter.20120605.diff > > I used g_nop and g_zero to limit the capacity of gmirror. It is a > hack but it should work. Nice! So you create a fake disk with the right size to trick gmirror into limiting the mirror size. (Should it be 'gnop destroy'ed before the 'gmirror forget'?) It's a little tricky. What do you think about having two sections, one for how to create a standard mirror from scratch, and one for converting a single-disk system to a mirror? > Maybe gmirror should support a capacity option as you pointed out... I really should have entered a PR, and will do that now.