From owner-freebsd-doc@FreeBSD.ORG Mon Jun 4 20:19:12 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 448AE106564A for ; Mon, 4 Jun 2012 20:19:12 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 425038FC12 for ; Mon, 4 Jun 2012 20:19:11 +0000 (UTC) Received: from alph.allbsd.org (p4242-ipbf1504funabasi.chiba.ocn.ne.jp [118.7.211.242]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q54KItHL081529; Tue, 5 Jun 2012 05:19:05 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.allbsd.org (8.14.4/8.14.4) with ESMTP id q54KIr8j007581; Tue, 5 Jun 2012 05:18:55 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 05 Jun 2012 05:18:40 +0900 (JST) Message-Id: <20120605.051840.668781590183332493.hrs@allbsd.org> To: wblock@wonkity.com From: Hiroki Sato In-Reply-To: References: <20120605.005134.320058107548486045.hrs@allbsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.4.50 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Tue_Jun__5_05_18_40_2012_483)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Tue, 05 Jun 2012 05:19:05 +0900 (JST) X-Spam-Status: No, score=-98.8 required=13.0 tests=CONTENT_TYPE_PRESENT, RCVD_IN_RP_RNBL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org 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 20:19:12 -0000 ----Security_Multipart(Tue_Jun__5_05_18_40_2012_483)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Warren Block wrote in : wb> On Tue, 5 Jun 2012, Hiroki Sato wrote: wb> wb> > Warren Block wrote wb> > in : wb> > wb> > wb> This procedure works well when the new drive's capacity is no wb> > larger wb> > wb> than the old drive's capacity. wb> > wb> wb> > wb> The problem I had was when the new drive was larger than the old wb> > wb> drive. gmirror creates a mirror on the new, larger drive using the wb> > wb> full space available (1T). The old drive (250G, say) can't be wb> > wb> inserted in this mirror because it's not large enough. wb> > wb> > Ah, true. I did not notice the pitfall. I updated the diff to solve wb> > the issue: wb> > wb> > http://people.allbsd.org/~hrs/FreeBSD/geom-mirror-2.html wb> > http://people.allbsd.org/~hrs/FreeBSD/geom-chapter.20120605.diff wb> > wb> > I used g_nop and g_zero to limit the capacity of gmirror. It is a wb> > hack but it should work. wb> wb> Nice! So you create a fake disk with the right size to trick gmirror wb> into limiting the mirror size. (Should it be 'gnop destroy'ed before wb> the 'gmirror forget'?) I think there is no need to destroy because gzero.nop is not actually added to the mirror. The operation to write the metadata into gzero.nop is ignored, so the mirror will be marked as DEGRADED just after the creation and the gzero.nop will never be added. The "gmirror forget" command is necessary to clear the DEGRADED by removing gzero.nop from the provider list. wb> It's a little tricky. What do you think about having two sections, wb> one for how to create a standard mirror from scratch, and one for wb> converting a single-disk system to a mirror? It sounds like a good idea. -- Hiroki ----Security_Multipart(Tue_Jun__5_05_18_40_2012_483)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk/NGCAACgkQTyzT2CeTzy3zGACfV0rKaa+unSY0K5GPSpiR13wx pf8AnAvKANGPSCr2h2HdnAhVyPTxgaO8 =1n10 -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Jun__5_05_18_40_2012_483)----