From owner-freebsd-geom@FreeBSD.ORG Sun Dec 12 23:27:58 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 421DA16A4CE for ; Sun, 12 Dec 2004 23:27:58 +0000 (GMT) Received: from koyukuk.teamcool.net (koyukuk.teamcool.net [208.39.216.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 912FD43D5A for ; Sun, 12 Dec 2004 23:27:55 +0000 (GMT) (envelope-from kgunders@teamcool.net) Received: from localhost (localhost [127.0.0.1]) by localhost.teamcool.net (TeamCool Rocks) with SMTP id 57C3217093 for ; Sun, 12 Dec 2004 16:36:42 -0700 (MST) Received: from cochise.teamcool.net (unknown [192.168.1.57]) by koyukuk.teamcool.net (TeamCool Rocks) with ESMTP id 0F41615B7B for ; Sun, 12 Dec 2004 16:36:42 -0700 (MST) Content-Type: text/plain; charset="iso-8859-1" From: Ken Gunderson To: freebsd-geom@freebsd.org Date: Sun, 12 Dec 2004 16:50:12 -0700 User-Agent: KMail/1.4.3 References: <200412101947.52728.kgunders@teamcool.net> In-Reply-To: <200412101947.52728.kgunders@teamcool.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200412121650.12823.kgunders@teamcool.net> Subject: Re: gmirror confusion X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2004 23:27:58 -0000 On Friday 10 December 2004 07:47 pm, Ken Gunderson wrote: > Hello: > > Been fighting gmirror for longer than I want to admit and going to > have to break down and ask for help on what at first blush seems > should be trivial... Would somebody please elaborate upon Pawel's > post in the gmirror problmes thread: > > > The safest way to do what you want is to: > > # gmirror label ad1 > create slices and partitions on /dev/mirror/ > create file system > copy data from ad0 to > change /etc/fstab to boot from /dev/mirror/s1a or > something > reboot > # gmirror insert ad0 > > > I have two disks, ad0 and ad2 that I'd like to mirror. In the past > would have just bootstrapped vinum. Gmirror seems like a better way > to go for this type of application but I'm only recently using 5.3 on > production machines so haven't had the chance to become as familiar > with geom as I probably should be. > > I can get the mirror configured with the live files system trick, but > not the above, which Pawel mentions as the "safest" way to handle > this. > > For example, I've searched archives and seen references to both > > 1) "create slices and partitions on /dev/mirror/" > > as well as > > 2) "create slices and partitions on provider" > > As well as confusion about whether the mirror's label should have the > 16 sector offset thrown at it by bsdlabel, or whether I should just > clone the label from the drive I did the install on. > > I'm also curious whether anyone has done any performance testing of > the different balance options. For booting from 2 mirrored drives, I > assume either "load" or "round-robin" would be the options of choice? > > TIA-- I'll be lame and follow up my own post... First, sorry that I confused "provider" with "consumer", so that question is moot. However, I note the following: >>>>>>> build# bsdlabel mirror/mirror0s1 # /dev/mirror/mirror0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 524288 0 4.2BSD 2048 16384 32776 b: 4194304 524288 swap c: 78156162 0 unused 0 0 # "raw" part, don't edit d: 1048576 4718592 4.2BSD 2048 16384 8 e: 1048576 5767168 4.2BSD 2048 16384 8 f: 8388608 6815744 4.2BSD 2048 16384 28552 g: 16777216 15204352 4.2BSD 2048 16384 28552 h: 46174594 31981568 4.2BSD 2048 16384 28552 build# bsdlabel /dev/mirror/mirror0s1 # /dev/mirror/mirror0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 524288 63 4.2BSD 2048 16384 32776 b: 4194304 524351 swap c: 78156162 63 unused 0 0 # "raw" part, don't edit d: 1048576 4718655 4.2BSD 2048 16384 8 e: 1048576 5767231 4.2BSD 2048 16384 8 f: 8388608 6815807 4.2BSD 2048 16384 28552 g: 16777216 15204415 4.2BSD 2048 16384 28552 h: 46174594 31981631 4.2BSD 2048 16384 28552 partition c: partition extends past end of unit bsdlabel: partition c doesn't start at 0! bsdlabel: An incorrect partition c may cause problems for standard system utilities partition h: partition extends past end of unit <<<<<<<<<<<<<<<<<<< Per man page for bsd label: "When specifying the device, the /dev/ path prefix may be omitted; the bsdlabel utility will automatically prepend it." Hence I was getting confused about seeming eratic bsdlabels, until I figured out that the return was consistent, but dependent upon whether I prepended "/dev" or not, at least when applied to gmirror provider. Is this 1) a bsdlabel or gmirror issue, and 2) which return should I believe? Thanks. -- Best regards, Ken Gunderson GPG Key-- 9F5179FD "Freedom begins between the ears." -- Edward Abbey From owner-freebsd-geom@FreeBSD.ORG Tue Dec 14 22:18:34 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 418E516A4CE for ; Tue, 14 Dec 2004 22:18:34 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0295143D31 for ; Tue, 14 Dec 2004 22:18:34 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id iBEMIB1r072488; Tue, 14 Dec 2004 17:18:11 -0500 (EST) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id iBEMHtpv072487; Tue, 14 Dec 2004 17:17:55 -0500 (EST) (envelope-from afields) Date: Tue, 14 Dec 2004 17:17:54 -0500 From: Allan Fields To: "Frank J. Beckmann" Message-ID: <20041214221754.GA62438@afields.ca> References: <200412100315.11436.frank@barda.agala.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200412100315.11436.frank@barda.agala.net> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: How do I change the password of a gbde lock? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 22:18:34 -0000 On Fri, Dec 10, 2004 at 03:14:59AM +0100, Frank J. Beckmann wrote: > # gbde init /dev/ad4s4h -i -L /etc/gbde/ad4s4h.lock > # gbde attach ad4s4h -l /etc/gbde/ad4s4h.lock > # newfs -U /dev/ad4s4h.bde > # mount /dev/ad4s4h.bde /secure > ... > # umount /secure > # gbde detach ad4s4h > > That was easy. Then I tried: > > # gbde setkey ad4s4h -l /etc/gbde/ad4s4h.lock -L /etc/gbde/ad4s4h.lock > gbde: Error 22 decrypting lock > > Ofcourse I typed the password, when ist asked me. Did you type it incorrectly? What release? You seem to show {non-exist,corrupt} lock sectors, which can result from bad passphrase. src/sys/geom/bde/g_bde_lock.c: 370: /* If it points ito thin blue air, forget it */ 371: if (off + G_BDE_LOCKSIZE > (uint64_t)mediasize) { 372: off = 0; 373: return (EINVAL); 374: } ... 435: /* If we have an unsorted lock-sequence, refuse */ 436: for (i = 0; i < G_BDE_MAXKEYS - 1; i++) 437: if (gl->lsector[i] >= gl->lsector[i + 1]) 438: return (EINVAL); /usr/include/sys/errno.h: 77:#define EINVAL 22 /* Invalid argument */ > -- > Tsch?ss > Frank -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541