Date: Mon, 4 Jun 2012 13:39:18 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Hiroki Sato <hrs@freebsd.org> Cc: doc@freebsd.org Subject: Re: Handbook mirroring section Message-ID: <alpine.BSF.2.00.1206041331520.945@wonkity.com> In-Reply-To: <20120605.005134.320058107548486045.hrs@allbsd.org> References: <alpine.BSF.2.00.1205220912060.52079@wonkity.com> <20120604.182331.536549548943660058.hrs@allbsd.org> <alpine.BSF.2.00.1206040653380.97869@wonkity.com> <20120605.005134.320058107548486045.hrs@allbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Jun 2012, Hiroki Sato wrote: > Warren Block <wblock@wonkity.com> wrote > in <alpine.BSF.2.00.1206040653380.97869@wonkity.com>: > > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1206041331520.945>