Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2006 14:08:47 -0400
From:      "David Robillard" <david.robillard@gmail.com>
To:        "Elliot Finley" <efinleywork@efinley.com>
Cc:        Jonathan McKeown <jonathan@hst.org.za>, FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Mirroring: gvinum or gmirror?
Message-ID:  <226ae0c60608311108l263442b6j122835ba73ff645c@mail.gmail.com>
In-Reply-To: <0a7c01c6cd26$a76b5b80$37cba1cd@emerytelcom.com>
References:  <226ae0c60608311017j1a4bea9cg6dbaa12414d74716@mail.gmail.com> <0a7c01c6cd26$a76b5b80$37cba1cd@emerytelcom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/31/06, Elliot Finley <efinleywork@efinley.com> wrote:
>> ad0: 4112MB <WDC AC24300L 09.09M08> at ata0-master UDMA33
>> ad3: 4028MB <Maxtor 84320D4 NAVXAA21> at ata1-slave UDMA33
>>
> > Then make sure you install FreeBSD on the bigger one (i.e. here that
> > would be ad0) then setup gmirror. If you do the oposite, you will have
> > a "Consumers too small" error when you try to bring the mirror
> > together.
>
> I could be wrong, but that seems backwards.

I know, that's also what I thought before I had the problem. (hence
the Tip of Day!)

It's quite easy to understand when you think about it. Let's say we
have the same disk drives as above in which ad0 is bigger then ad3.

So you install the OS on the smaller ad3 disk first. Then you setup
gmirror on the bigger disk ad0. You then dump(8) the OS from ad3 onto
the broken mirror gm0 which is made up of ad0. Next you reboot on gm0
(hence on ad0). You clear ad3 which is not used anymore and try to
`sudo gmirror insert gm0 /dev/ad3` = WRONG!

Why? Because what you're actually doing is trying to synchronise a
bigger submirror disk (ad0) onto a smaller submirror disk (ad3). Hence
gmirror(8) complains that the container is too small.

What you want to do is the oposite. Which is to first install FreeBSD
on the bigger drive, then setup a broken submirror gm0 onto the
smaller disk. Dump(8) FreeBSD onto this new gm0 mirror. Reboot on that
gm0 mirror. Then finally synchronise the small submirror onto the
bigger disk onto which you had FreeBSD installed first.

But be my guest, try it out and you'll see :)

Here's what you get once the whole thing is finished:

[drobilla@klotho] ~ {336}$ gmirror list
Geom name: gm0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 2054366258
Providers:
1. Name: mirror/gm0
   Mediasize: 4223729152 (3.9G)
   Sectorsize: 512
   Mode: r5w5e6
Consumers:
1. Name: ad0
   Mediasize: 4311982080 (4.0G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 4020171026
2. Name: ad3
   Mediasize: 4223729664 (3.9G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 411377980

Cheers,

David
-- 
David Robillard
UNIX systems administrator & Oracle DBA
CISSP, RHCE & Sun Certified Security Administrator
Montreal: +1 514 966 0122



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