Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Jun 2012 05:18:40 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        wblock@wonkity.com
Cc:        doc@FreeBSD.org
Subject:   Re: Handbook mirroring section
Message-ID:  <20120605.051840.668781590183332493.hrs@allbsd.org>
In-Reply-To: <alpine.BSF.2.00.1206041331520.945@wonkity.com>
References:  <alpine.BSF.2.00.1206040653380.97869@wonkity.com> <20120605.005134.320058107548486045.hrs@allbsd.org> <alpine.BSF.2.00.1206041331520.945@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Tue_Jun__5_05_18_40_2012_483)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Warren Block <wblock@wonkity.com> wrote
  in <alpine.BSF.2.00.1206041331520.945@wonkity.com>:

wb> On Tue, 5 Jun 2012, Hiroki Sato wrote:
wb>
wb> > Warren Block <wblock@wonkity.com> wrote
wb> >  in <alpine.BSF.2.00.1206040653380.97869@wonkity.com>:
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)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120605.051840.668781590183332493.hrs>