Handbook mirroring section
Warren Block
wblock at wonkity.com
Mon Jun 4 19:39:19 UTC 2012
On Tue, 5 Jun 2012, Hiroki Sato wrote:
> Warren Block <wblock at wonkity.com> wrote
> in <alpine.BSF.2.00.1206040653380.97869 at 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.
More information about the freebsd-doc
mailing list