From owner-freebsd-questions@FreeBSD.ORG Thu Aug 31 18:08:53 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CF5B16A523 for ; Thu, 31 Aug 2006 18:08:53 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADDED43D46 for ; Thu, 31 Aug 2006 18:08:48 +0000 (GMT) (envelope-from david.robillard@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so684626uge for ; Thu, 31 Aug 2006 11:08:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HZo1wsulcaHnEARrvoeIitQ0EI4uTsF3RDuMKK0mGJPAXNKGoTOJGHExRSMGzCjO7ogGoQ3TQa6zr2derWjUoIGN1HUBTPeDa+iXPDQAvpIR/EhYt7hjCA/8Qw3LMuv/y+H6x9sbRW2NmB5p9VI8vFemsYuakZxZ2VJgqBV/x3E= Received: by 10.67.10.12 with SMTP id n12mr688007ugi; Thu, 31 Aug 2006 11:08:48 -0700 (PDT) Received: by 10.67.106.17 with HTTP; Thu, 31 Aug 2006 11:08:47 -0700 (PDT) Message-ID: <226ae0c60608311108l263442b6j122835ba73ff645c@mail.gmail.com> Date: Thu, 31 Aug 2006 14:08:47 -0400 From: "David Robillard" To: "Elliot Finley" In-Reply-To: <0a7c01c6cd26$a76b5b80$37cba1cd@emerytelcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <226ae0c60608311017j1a4bea9cg6dbaa12414d74716@mail.gmail.com> <0a7c01c6cd26$a76b5b80$37cba1cd@emerytelcom.com> Cc: Jonathan McKeown , FreeBSD Questions Mailing List Subject: Re: Mirroring: gvinum or gmirror? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Aug 2006 18:08:53 -0000 On 8/31/06, Elliot Finley wrote: >> ad0: 4112MB at ata0-master UDMA33 >> ad3: 4028MB 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