From owner-freebsd-geom@FreeBSD.ORG Sun Jan 30 23:21:15 2005 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 9003516A4CE; Sun, 30 Jan 2005 23:21:15 +0000 (GMT) Received: from hollin.esperi.net (hollin.esperi.net [194.153.168.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C14E43D2D; Sun, 30 Jan 2005 23:21:15 +0000 (GMT) (envelope-from nicolai@hollin.esperi.net) Received: from localhost ([127.0.0.1] helo=hollin.esperi.net) by hollin.esperi.net with esmtp (Exim 4.10) id 1CvONW-000EMM-00; Sun, 30 Jan 2005 23:21:14 +0000 Received: (from nicolai@localhost) by hollin.esperi.net (8.12.3/8.12.3/Submit) id j0UNLDgZ055199; Sun, 30 Jan 2005 23:21:13 GMT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16893.27625.379973.406076@hollin.esperi.net> Date: Sun, 30 Jan 2005 23:21:13 +0000 From: Nicolai E M Plum To: Pawel Jakub Dawidek In-Reply-To: <20050118072926.GE795@darkness.comp.waw.pl> References: <16876.30085.273846.833564@hollin.esperi.net> <20050118072926.GE795@darkness.comp.waw.pl> X-Mailer: VM 7.07 under Emacs 21.3.1 cc: freebsd-geom@FreeBSD.org Subject: Re: geom_mirror panic with pair of firewire disc 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, 30 Jan 2005 23:21:15 -0000 Pawel Jakub Dawidek wrote: > On Tue, Jan 18, 2005 at 02:33:41AM +0000, Nicolai E M Plum wrote: > +> and on the console: > +>=20 > +> Fatal double fault: > +> eip =3D 0xc07a4acd > +> esp =3D 0xd4226000 > +> ebp =3D 0xd4226014 > +> panic: double fault > +> Uptime: 2h45m29s > Could you get for me output of: > # objdump -d -l `find /usr/obj/ -type f -name kernel.debug` | grep -5 ^c07a4acd: (sorry about the delay, I've been away from this machine in the mean time) I had to recompile the kernel to get a kernel.debug file, so the addresses in the panic message have changed to: Fatal double fault: eip = 0xc0867e2b esp = 0xd4225fd8 ebp = 0xd4226010 panic = double fault So, using the new value of eip, I get this from objdump: # objdump -d -l `find /usr/obj/ -type f -name kernel.debug` | grep -5 ^c0867e2b: c0867e1f: 8b 5d 08 mov 0x8(%ebp),%ebx c0867e22: 8b 55 0c mov 0xc(%ebp),%edx c0867e25: 8b 7d 18 mov 0x18(%ebp),%edi c0867e28: 8b 75 1c mov 0x1c(%ebp),%esi /usr/src/sys/i386/i386/busdma_machdep.c:649 c0867e2b: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) /usr/src/sys/i386/i386/busdma_machdep.c:650 c0867e32: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) /usr/src/sys/i386/i386/busdma_machdep.c:652 c0867e39: 85 d2 test %edx,%edx c0867e3b: 74 06 je c0867e43 Is that any use? Thanks Nicolai From owner-freebsd-geom@FreeBSD.ORG Tue Feb 1 08:58:13 2005 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 DA1E716A4CE for ; Tue, 1 Feb 2005 08:58:13 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63E8943D4C for ; Tue, 1 Feb 2005 08:58:13 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 34CC3ACC56; Tue, 1 Feb 2005 09:58:10 +0100 (CET) Date: Tue, 1 Feb 2005 09:58:10 +0100 From: Pawel Jakub Dawidek To: Nicolai E M Plum Message-ID: <20050201085810.GF1546@darkness.comp.waw.pl> References: <16876.30085.273846.833564@hollin.esperi.net> <20050118072926.GE795@darkness.comp.waw.pl> <16893.27625.379973.406076@hollin.esperi.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DO5DiztRLs659m5i" Content-Disposition: inline In-Reply-To: <16893.27625.379973.406076@hollin.esperi.net> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@FreeBSD.org Subject: Re: geom_mirror panic with pair of firewire disc 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, 01 Feb 2005 08:58:14 -0000 --DO5DiztRLs659m5i Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 30, 2005 at 11:21:13PM +0000, Nicolai E M Plum wrote: +> Pawel Jakub Dawidek wrote: +> > On Tue, Jan 18, 2005 at 02:33:41AM +0000, Nicolai E M Plum wrote: +>=20 +> > +> and on the console: +> > +>=3D20 +> > +> Fatal double fault: +> > +> eip =3D3D 0xc07a4acd +> > +> esp =3D3D 0xd4226000 +> > +> ebp =3D3D 0xd4226014 +> > +> panic: double fault +> > +> Uptime: 2h45m29s +>=20 +> > Could you get for me output of: +>=20 +> > # objdump -d -l `find /usr/obj/ -type f -name kernel.debug` | grep -5= ^c07a4acd: +>=20 +> (sorry about the delay, I've been away from this machine in the mean tim= e) +>=20 +> I had to recompile the kernel to get a kernel.debug file, so the address= es in +> the panic message have changed to: +>=20 +> Fatal double fault: +> eip =3D 0xc0867e2b +> esp =3D 0xd4225fd8 +> ebp =3D 0xd4226010 +> panic =3D double fault +>=20 +> So, using the new value of eip, I get this from objdump: +>=20 +> # objdump -d -l `find /usr/obj/ -type f -name kernel.debug` | grep -5 ^c= 0867e2b: +> c0867e1f: 8b 5d 08 mov 0x8(%ebp),%ebx +> c0867e22: 8b 55 0c mov 0xc(%ebp),%edx +> c0867e25: 8b 7d 18 mov 0x18(%ebp),%edi +> c0867e28: 8b 75 1c mov 0x1c(%ebp),%esi +> /usr/src/sys/i386/i386/busdma_machdep.c:649 +> c0867e2b: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) +> /usr/src/sys/i386/i386/busdma_machdep.c:650 +> c0867e32: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) +> /usr/src/sys/i386/i386/busdma_machdep.c:652 +> c0867e39: 85 d2 test %edx,%edx +> c0867e3b: 74 06 je c0867e43 +>=20 +> Is that any use? Maybe. Could you give me also output of: grep '$FreeBSD:' /usr/src/sys/i386/i386/busdma_machdep.c --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --DO5DiztRLs659m5i Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB/0SiForvXbEpPzQRAv1UAKDIKc2OGZUqnEgwPfkg0w/eahVrVwCg9Uc2 vOX3A3cW+Bhd3ozKfeGi2Gc= =8Ham -----END PGP SIGNATURE----- --DO5DiztRLs659m5i-- From owner-freebsd-geom@FreeBSD.ORG Tue Feb 1 10:53:39 2005 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 18C5616A4CE; Tue, 1 Feb 2005 10:53:39 +0000 (GMT) Received: from hollin.esperi.net (hollin.esperi.net [194.153.168.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id C433643D49; Tue, 1 Feb 2005 10:53:38 +0000 (GMT) (envelope-from nicolai@hollin.esperi.net) Received: from localhost ([127.0.0.1] helo=hollin.esperi.net) by hollin.esperi.net with esmtp (Exim 4.10) id 1Cvvf5-000ITA-00; Tue, 01 Feb 2005 10:53:37 +0000 Received: (from nicolai@localhost) by hollin.esperi.net (8.12.3/8.12.3/Submit) id j11ArZd0070997; Tue, 1 Feb 2005 10:53:35 GMT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16895.24495.144360.333610@hollin.esperi.net> Date: Tue, 1 Feb 2005 10:53:35 +0000 From: Nicolai E M Plum To: Pawel Jakub Dawidek In-Reply-To: <20050201085810.GF1546@darkness.comp.waw.pl> References: <16876.30085.273846.833564@hollin.esperi.net> <20050118072926.GE795@darkness.comp.waw.pl> <16893.27625.379973.406076@hollin.esperi.net> <20050201085810.GF1546@darkness.comp.waw.pl> X-Mailer: VM 7.07 under Emacs 21.3.1 cc: freebsd-geom@FreeBSD.org Subject: Re: geom_mirror panic with pair of firewire disc 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, 01 Feb 2005 10:53:39 -0000 Pawel Jakub Dawidek wrote: > Maybe. Could you give me also output of: > grep '$FreeBSD:' /usr/src/sys/i386/i386/busdma_machdep.c # grep '$FreeBSD:' /usr/src/sys/i386/i386/busdma_machdep.c __FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.59.2.1 2004/09/09 23:05:00 scottl Exp $"); Nicolai From owner-freebsd-geom@FreeBSD.ORG Wed Feb 2 11:17:46 2005 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 C8A1B16A4CE for ; Wed, 2 Feb 2005 11:17:46 +0000 (GMT) Received: from clueful.shagged.org (clueful.shagged.org [212.13.201.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84AC243D2D for ; Wed, 2 Feb 2005 11:17:46 +0000 (GMT) (envelope-from chris@clueful.shagged.org) Received: from chris by clueful.shagged.org with local (Exim 4.40 (FreeBSD)) id 1CwIVu-000NpH-7d for freebsd-geom@freebsd.org; Wed, 02 Feb 2005 11:17:38 +0000 Date: Wed, 2 Feb 2005 11:17:38 +0000 From: Chris Elsworth To: freebsd-geom@freebsd.org Message-ID: <20050202111738.GA91357@shagged.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Sender: Chris Elsworth X-Shagged-MailScanner-Information: See www.mailscanner.info for information X-Shagged-MailScanner: Found to be clean X-MailScanner-From: chris@clueful.shagged.org Subject: Disk statistics since boot? 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: Wed, 02 Feb 2005 11:17:46 -0000 Hello, I'm sure there must be a way to do this, but I'm having a good deal of trouble finding it. I'd like to be able to see how many transactions have been done and how many bytes have been read/written to a given disk since boot. The closest I can seem to get is iostat -dI, but that doesn't separate the values out into read and write. I haven't tried snmpd with UCD-DISKIO-MIB yet, but I'd rather not have to use that to get the values. Is this possible, or is it something that might make it into future versions of geom classes? Cheers, -- Chris From owner-freebsd-geom@FreeBSD.ORG Wed Feb 2 19:09:18 2005 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 C5FD616A4CE for ; Wed, 2 Feb 2005 19:09:18 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B95F43D45 for ; Wed, 2 Feb 2005 19:09:18 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j12J9GdW001304; Wed, 2 Feb 2005 20:09:16 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Chris Elsworth From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 02 Feb 2005 11:17:38 GMT." <20050202111738.GA91357@shagged.org> Date: Wed, 02 Feb 2005 20:09:16 +0100 Message-ID: <1303.1107371356@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-geom@freebsd.org Subject: Re: Disk statistics since boot? 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: Wed, 02 Feb 2005 19:09:18 -0000 In message <20050202111738.GA91357@shagged.org>, Chris Elsworth writes: >Hello, > >I'm sure there must be a way to do this, but I'm having a good deal of >trouble finding it. > >I'd like to be able to see how many transactions have been done and >how many bytes have been read/written to a given disk since boot. The >closest I can seem to get is iostat -dI, but that doesn't separate the >values out into read and write. > >I haven't tried snmpd with UCD-DISKIO-MIB yet, but I'd rather not have >to use that to get the values. > >Is this possible, or is it something that might make it into future >versions of geom classes? the info is all there, look at the gstat source code and modify as necessary. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Thu Feb 3 10:35:56 2005 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 C8D6016A4CE for ; Thu, 3 Feb 2005 10:35:56 +0000 (GMT) Received: from clueful.shagged.org (clueful.shagged.org [212.13.201.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A28A43D4C for ; Thu, 3 Feb 2005 10:35:56 +0000 (GMT) (envelope-from chris@clueful.shagged.org) Received: from chris by clueful.shagged.org with local (Exim 4.40 (FreeBSD)) id 1CweL1-000LqU-RV; Thu, 03 Feb 2005 10:35:51 +0000 Date: Thu, 3 Feb 2005 10:35:51 +0000 From: Chris Elsworth To: Poul-Henning Kamp Message-ID: <20050203103551.GA83867@shagged.org> References: <20050202111738.GA91357@shagged.org> <1303.1107371356@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1303.1107371356@critter.freebsd.dk> User-Agent: Mutt/1.5.6i Sender: Chris Elsworth X-Shagged-MailScanner-Information: See www.mailscanner.info for information X-Shagged-MailScanner: Found to be clean X-MailScanner-From: chris@clueful.shagged.org cc: freebsd-geom@freebsd.org Subject: Re: Disk statistics since boot? 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: Thu, 03 Feb 2005 10:35:56 -0000 On Wed, Feb 02, 2005 at 08:09:16PM +0100, Poul-Henning Kamp wrote: > > > >I'd like to be able to see how many transactions have been done and > >how many bytes have been read/written to a given disk since boot. The > >closest I can seem to get is iostat -dI, but that doesn't separate the > >values out into read and write. > > the info is all there, look at the gstat source code and modify > as necessary. Hello, Got it, devstat_compute_statistics() with a NULL second arg. Thanks for the pointer :) -- Chris From owner-freebsd-geom@FreeBSD.ORG Thu Feb 3 23:04:33 2005 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 9011016A4CE for ; Thu, 3 Feb 2005 23:04:33 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id E831643D41 for ; Thu, 3 Feb 2005 23:04:32 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 7386CACBCF; Fri, 4 Feb 2005 00:04:30 +0100 (CET) Date: Fri, 4 Feb 2005 00:04:30 +0100 From: Pawel Jakub Dawidek To: freebsd-geom@freebsd.org Message-ID: <20050203230430.GD27596@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pk6IbRAofICFmK5e" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: -k/-K options for gbde(8). 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: Thu, 03 Feb 2005 23:04:33 -0000 --Pk6IbRAofICFmK5e Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. Patch below implement -k/-K/-N options from the gbde(8)-TODO list: http://people.freebsd.org/~pjd/patches/gbde.3.patch Those options allow to give a part of the pass-phrase from the file: gbde attach da0 -k /mnt/usb/da0.key If '-N' option is not given user will still be prompted for the pass-phrase and the two parts will be used as a one key. -k/-K option can be used multiple times: gbde attach da0 -k /mnt/usb/da0.key -k /somewhereelse/da0.key which is equivalent to: cat /mnt/usb/da0.key /somewhereelse/da0.key | gbde attach da0 -k /dev/stdin --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Pk6IbRAofICFmK5e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCAq3+ForvXbEpPzQRAvmXAKCwkBTrhmMsUXzKRo2CC+pyn8AzKwCgz/bP eGXJluZArM0ZfPFpnVYwRPw= =vNEU -----END PGP SIGNATURE----- --Pk6IbRAofICFmK5e-- From owner-freebsd-geom@FreeBSD.ORG Fri Feb 4 15:05:09 2005 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 79C5F16A4CE; Fri, 4 Feb 2005 15:05:09 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5CD443D2D; Fri, 4 Feb 2005 15:05:08 +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 j14F55Mq053368; Fri, 4 Feb 2005 10:05:05 -0500 (EST) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id j14F55Sk053361; Fri, 4 Feb 2005 10:05:05 -0500 (EST) (envelope-from afields) Date: Fri, 4 Feb 2005 10:04:53 -0500 From: Allan Fields To: Pawel Jakub Dawidek Message-ID: <20050204150453.GB59632@afields.ca> References: <20050203230430.GD27596@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050203230430.GD27596@darkness.comp.waw.pl> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: -k/-K options for gbde(8). 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: Fri, 04 Feb 2005 15:05:09 -0000 On Fri, Feb 04, 2005 at 12:04:30AM +0100, Pawel Jakub Dawidek wrote: > Hi. > > Patch below implement -k/-K/-N options from the gbde(8)-TODO list: > > http://people.freebsd.org/~pjd/patches/gbde.3.patch It seems in a previous life now.. I had also done a similar patch, it's on the list a while back and have updated since. Since then, I looked at various ways gbde(8) could be improved, expanded the TODO list, and started work on encrypted root support (Going from memory: phk and I discussed various options and concluded it best to implement an optional signature in metadata for gbde volumes to be detected and auto-mounted at boot before init I believe.) Regarding auto-mounting I responded: > > Some of the target objectives I had in mind were: > - Facilitate mounting of encrypted root (implies auto-attach or > prev. mentioned sol's working from device name [XX: not wise]). > [Attached before attempting to mount root] > - Allow non-boot-time-critical devices to be either manually > mounted or mounted such that they don't hold up the boot process. > i.e. allow some gbde devices to be mounted at different stages > in the boot process -- which is current way.. > No reason to attach /topsecret at the same time as encrypted /tmp > (Perhaps the two have different security needs) > [Could use a multi-stage approach in rc scripts] > - But allow the kernel to automatically attach gbde devices as found [, where desired] > - Encrypted swap implies still having control over the attach so > it doesn't try to attach old gbde with random passphrase > > How about just an "auto" flag in the metadata which is either 0 or 1. > Then you could keep the current manual behaviour and have some > devices (not) prompt for passphrase before startup. > > Incidentally, this could be as easy as saying on devices with sector > 0 are auto attached the rest are manual. > > [..] > Those options allow to give a part of the pass-phrase from the file: > > gbde attach da0 -k /mnt/usb/da0.key > > If '-N' option is not given user will still be prompted for the > pass-phrase and the two parts will be used as a one key. That's an interesting feature, the alternative which I originally proposed of encrypting key material is a less wise strategy which I'll suggest against. This might lend useful for multi-party keying schemes, though N of M would still require some work. > -k/-K option can be used multiple times: > > gbde attach da0 -k /mnt/usb/da0.key -k /somewhereelse/da0.key > which is equivalent to: > cat /mnt/usb/da0.key /somewhereelse/da0.key | gbde attach da0 -k /dev/stdin > -- > Pawel Jakub Dawidek http://www.wheel.pl > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! -- Allan Fields From owner-freebsd-geom@FreeBSD.ORG Fri Feb 4 17:06:20 2005 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 00E6616A4CE for ; Fri, 4 Feb 2005 17:06:19 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64D3F43D48 for ; Fri, 4 Feb 2005 17:06:19 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 3D8A1ACC56; Fri, 4 Feb 2005 18:06:17 +0100 (CET) Date: Fri, 4 Feb 2005 18:06:17 +0100 From: Pawel Jakub Dawidek To: Allan Fields Message-ID: <20050204170617.GG27596@darkness.comp.waw.pl> References: <20050203230430.GD27596@darkness.comp.waw.pl> <20050204150453.GB59632@afields.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hK8Uo4Yp55NZU70L" Content-Disposition: inline In-Reply-To: <20050204150453.GB59632@afields.ca> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@freebsd.org Subject: Re: -k/-K options for gbde(8). 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: Fri, 04 Feb 2005 17:06:20 -0000 --hK8Uo4Yp55NZU70L Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 04, 2005 at 10:04:53AM -0500, Allan Fields wrote: +> On Fri, Feb 04, 2005 at 12:04:30AM +0100, Pawel Jakub Dawidek wrote: +> > Hi. +> >=20 +> > Patch below implement -k/-K/-N options from the gbde(8)-TODO list: +> >=20 +> > http://people.freebsd.org/~pjd/patches/gbde.3.patch +>=20 +> It seems in a previous life now.. I had also done a similar patch, +> it's on the list a while back and have updated since. +>=20 +> Since then, I looked at various ways gbde(8) could be improved, +> expanded the TODO list, and started work on encrypted root support +> (Going from memory: phk and I discussed various options and concluded it +> best to implement an optional signature in metadata for gbde volumes +> to be detected and auto-mounted at boot before init I believe.) [...] I done this some time ago. You have to have /boot/ directory on e.g. bootable USB device and BDE providers in loader.conf (in kern.geom.bde.providers tunable). On boot it will ask for the passphrase before root is mounted: http://people.freebsd.org/~pjd/patches/gbde.patch Poul-Henning suggested that taste mechanism should be used instead of tunable, which should be quite easy to implement. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --hK8Uo4Yp55NZU70L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCA6uJForvXbEpPzQRAoMRAKCZOv0j8/wlmbT/nNbZbznZ9JDM7gCeKsYN sB7N4rd7sbmPEqhJUG4+qfg= =Nr5s -----END PGP SIGNATURE----- --hK8Uo4Yp55NZU70L-- From owner-freebsd-geom@FreeBSD.ORG Fri Feb 4 17:43:25 2005 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 D7E5916A4CE for ; Fri, 4 Feb 2005 17:43:25 +0000 (GMT) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FD0043D1D for ; Fri, 4 Feb 2005 17:43:25 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 350D3C54726 for ; Fri, 4 Feb 2005 12:43:24 -0500 (EST) X-Sasl-enc: oi9GYgqlqShxvO9M92SMpQ 1107539003 Received: from gumby.localhost (dsl-80-41-107-215.access.as9105.com [80.41.107.215]) by frontend2.messagingengine.com (Postfix) with ESMTP id 63337570159 for ; Fri, 4 Feb 2005 12:43:23 -0500 (EST) From: RW To: freebsd-geom@freebsd.org Date: Fri, 4 Feb 2005 17:43:18 +0000 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200502041743.21047.list-freebsd-2004@morbius.sent.com> Subject: Encrypted DVDs beyond 2GB 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: Fri, 04 Feb 2005 17:43:26 -0000 Some time ago I asked about creating encrypted data CDs, and someone suggested using mdconfig to create a file backed md device, encrypted with gdbe, and then burning the backing file to CD. That all works fine, but when the same technique is tried on DVDs, you run into the problem that FreeBSD 5.3 can't handle a file bigger that 2GB on an iso9660 filesystem. If you install the development version of mkisofs, it is possible to burn a DVD containing a file of up to 4GB. Windows 98 can read the file off the disk, but FreeBSD can't do anything with it. Using 2 files and having the data mounted at two separate points would be a bit clumsy. Does anyone have a better idea? From owner-freebsd-geom@FreeBSD.ORG Fri Feb 4 17:54:36 2005 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 6675116A4CE for ; Fri, 4 Feb 2005 17:54:36 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD6EC43D45 for ; Fri, 4 Feb 2005 17:54:35 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 950F6AEA61; Fri, 4 Feb 2005 18:54:34 +0100 (CET) Date: Fri, 4 Feb 2005 18:54:34 +0100 From: Pawel Jakub Dawidek To: RW Message-ID: <20050204175434.GH27596@darkness.comp.waw.pl> References: <200502041743.21047.list-freebsd-2004@morbius.sent.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hTiIB9CRvBOLTyqY" Content-Disposition: inline In-Reply-To: <200502041743.21047.list-freebsd-2004@morbius.sent.com> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@freebsd.org Subject: Re: Encrypted DVDs beyond 2GB 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: Fri, 04 Feb 2005 17:54:36 -0000 --hTiIB9CRvBOLTyqY Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 04, 2005 at 05:43:18PM +0000, RW wrote: +> Some time ago I asked about creating encrypted data CDs, and someone sug= gested=20 +> using mdconfig to create a file backed md device, encrypted with gdbe, a= nd=20 +> then burning the backing file to CD.=20 +>=20 +> That all works fine, but when the same technique is tried on DVDs, you r= un=20 +> into the problem that FreeBSD 5.3 can't handle a file bigger that 2GB on= an=20 +> iso9660 filesystem. If you install the development version of mkisofs, i= t is=20 +> possible to burn a DVD containing a file of up to 4GB. Windows 98 can re= ad=20 +> the file off the disk, but FreeBSD can't do anything with it. +>=20 +> Using 2 files and having the data mounted at two separate points would b= e a=20 +> bit clumsy. Does anyone have a better idea? I'm just doing it now, so few random advices. - With DVD+RW you don't need iso9660 file system. What you need to do is to format it: # dvd+rw-format /dev/cd0 # cdcontrol eject # cdcontrol close create even UFS2 on it: # newfs -U /dev/acd0t01 mount it and just copy files there. - GBDE is very, very slow on DVDs for me. Practicaly unusable. I wrote a GEOM class for simple encryption which don't have to read key sectors, data sectors, etc. So there is no performance difference for me. - If you want to use many md(4) file-backed devices, you can use gconcat(8). If you create concatenated device with 'create' subcommand, no on-disk metadata is used, so it work like one big file. - You can try growfs(8) from sysutils/dvd+rw-tools. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --hTiIB9CRvBOLTyqY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCA7baForvXbEpPzQRAthJAJ4522EmJB4NSydXA/egG/q6gs6gEgCgobSe 7Gts2Ttue2QyR5RHQ0ZU3o0= =b9V/ -----END PGP SIGNATURE----- --hTiIB9CRvBOLTyqY-- From owner-freebsd-geom@FreeBSD.ORG Sat Feb 5 19:57:07 2005 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 80CA916A4CE for ; Sat, 5 Feb 2005 19:57:07 +0000 (GMT) Received: from FS.denninger.net (wsip-68-15-213-52.at.at.cox.net [68.15.213.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA3F343D2F for ; Sat, 5 Feb 2005 19:57:06 +0000 (GMT) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net (localhost [127.0.0.1]) by FS.denninger.net (8.13.1/8.13.1) with SMTP id j15Jv5QJ010507 for ; Sat, 5 Feb 2005 13:57:05 -0600 (CST) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net [127.0.0.1] by Spamblock-sys; Sat Feb 5 13:57:05 2005 Received: (from karl@localhost) by FS.denninger.net (8.13.1/8.13.1/Submit) id j15Jv5tp010505 for freebsd-geom@freebsd.org; Sat, 5 Feb 2005 13:57:05 -0600 (CST) (envelope-from karl) Message-ID: <20050205135705.A10437@denninger.net> Date: Sat, 5 Feb 2005 13:57:05 -0600 From: Karl Denninger To: freebsd-geom@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i Organization: Karl's Sushi and Packet Smashers X-Die-Spammers: Spammers cheerfully broiled for supper and served with ketchup! Subject: Gmirror - how to do? 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: Sat, 05 Feb 2005 19:57:07 -0000 Howdy; Another quickie someone may know how to handle. I've got a 2-drive RAID1 mirror I wish to back up. The easy way appears to be to attach a third drive, let it sync, detach it and then you have a backup, right? So I do the following: atacontrol attach 2 (attach new disk on external adapter) gmirror insert boot ad4s1 (insert the backup into the existing mirror) wait (while the disk synchronizes - 3-4 hours) gmirror remove boot ad4s1 (remove third copy from mirror) atacontrol detach 2 (remove device from the system) Now I can go pull the carrier "cleanly". Except for one small problem - when you do this, then try to boot the backup volume it fails, because gmirror has marked the metadata as "do not use" when you removed it, yet the /etc/fstab entries all point to a mirror that isn't there. So... how do you accomplish this? Detach the BUS underlying the drive without warning gmirror first (e.g. "atacontrol detach 2", without the preceding "gmirror remove"), thereby forcing a "dirty" disconnect? I'd rather not, although if I must, that I suppose would work. However, if I do this, then gmirror thinks I have a third volume present, and as a consequence as soon I re-init that channel and geom sees the disk it will immediately begin a rebuild (whether this is bad or not I suppose is a matter of interpretation) The bad part of doing it that way that I can identify is that if the machine is rebooted it will automatically reattach the 'backup' volume and once that starts you're committed to wait for it to finish. That's not too cool. Is there a solution to this dilemma that's clean yet leaves me with a stand-alone bootable backup volume? -- -- Karl Denninger (karl@denninger.net) Internet Consultant & Kids Rights Activist http://www.denninger.net My home on the net - links to everything I do! http://scubaforum.org Your UNCENSORED place to talk about DIVING! http://www.spamcuda.net SPAM FREE mailboxes - FREE FOR A LIMITED TIME! http://genesis3.blogspot.com Musings Of A Sentient Mind From owner-freebsd-geom@FreeBSD.ORG Sat Feb 5 20:12:43 2005 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 8211316A4CE for ; Sat, 5 Feb 2005 20:12:43 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id A914943D41 for ; Sat, 5 Feb 2005 20:12:42 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id A54CDAC861; Sat, 5 Feb 2005 21:12:37 +0100 (CET) Date: Sat, 5 Feb 2005 21:12:37 +0100 From: Pawel Jakub Dawidek To: Karl Denninger Message-ID: <20050205201237.GB1666@darkness.comp.waw.pl> References: <20050205135705.A10437@denninger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: <20050205135705.A10437@denninger.net> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@freebsd.org Subject: Re: Gmirror - how to do? 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: Sat, 05 Feb 2005 20:12:43 -0000 --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 05, 2005 at 01:57:05PM -0600, Karl Denninger wrote: +> Howdy; +>=20 +> Another quickie someone may know how to handle. +>=20 +> I've got a 2-drive RAID1 mirror I wish to back up. +>=20 +> The easy way appears to be to attach a third drive, let it sync, detach = it +> and then you have a backup, right? +>=20 +> So I do the following: +>=20 +> atacontrol attach 2 (attach new disk on external adapter) +> gmirror insert boot ad4s1 (insert the backup into the existing mirror) +> wait (while the disk synchronizes - 3-4 hours) +> gmirror remove boot ad4s1 (remove third copy from mirror) +> atacontrol detach 2 (remove device from the system) +>=20 +> Now I can go pull the carrier "cleanly". +>=20 +> Except for one small problem - when you do this, then try to boot the +> backup volume it fails, because gmirror has marked the metadata as "do= =20 +> not use" when you removed it, yet the /etc/fstab entries all point to a +> mirror that isn't there. +>=20 +> So... how do you accomplish this? +>=20 +> Detach the BUS underlying the drive without warning gmirror first (e.g. +> "atacontrol detach 2", without the preceding "gmirror remove"), thereby= =20 +> forcing a "dirty" disconnect? I'd rather not, although if I must, that = I=20 +> suppose would work. However, if I do this, then gmirror thinks I have a +> third volume present, and as a consequence as soon I re-init that channel +> and geom sees the disk it will immediately begin a rebuild (whether this= is +> bad or not I suppose is a matter of interpretation) In you case I suggest do this: 1. atacontrol attach 2 2. gmirror insert boot ad4s1 3. gmirror remove boot ad4s1 4. gmirror label boot ad4s1 5. atacontrol detach 2 In 4th step, you labeling only one provider with the same name. It will be tasted, but ignored, because mirror 'boot' is already configured: GEOM_MIRROR: Device boot already configured. Now it should be bootable. Remember not to boot the main machine with this disk inside, as it can be tasted before your main 'boot' mirror. Inserting this disk after boot, when your 'boot' mirror is configured should be safe. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCBSi1ForvXbEpPzQRAhsQAJwK0KzkwTezibMcbxOb87oqt7lD5ACgqG7F UfFPJUZC/+1XYBTXp7/dPJE= =H/qX -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2-- From owner-freebsd-geom@FreeBSD.ORG Sat Feb 5 23:04:17 2005 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 876E216A4CE for ; Sat, 5 Feb 2005 23:04:17 +0000 (GMT) Received: from FS.denninger.net (wsip-68-15-213-52.at.at.cox.net [68.15.213.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id D656943D2D for ; Sat, 5 Feb 2005 23:04:16 +0000 (GMT) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net (localhost [127.0.0.1]) by FS.denninger.net (8.13.1/8.13.1) with SMTP id j15N4FEW012648 for ; Sat, 5 Feb 2005 17:04:16 -0600 (CST) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net [127.0.0.1] by Spamblock-sys; Sat Feb 5 17:04:16 2005 Received: (from karl@localhost) by FS.denninger.net (8.13.1/8.13.1/Submit) id j15N4FfT012646; Sat, 5 Feb 2005 17:04:15 -0600 (CST) (envelope-from karl) Message-ID: <20050205170415.A12620@denninger.net> Date: Sat, 5 Feb 2005 17:04:15 -0600 From: Karl Denninger To: Pawel Jakub Dawidek References: <20050205135705.A10437@denninger.net> <20050205201237.GB1666@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <20050205201237.GB1666@darkness.comp.waw.pl>; from Pawel Jakub Dawidek on Sat, Feb 05, 2005 at 09:12:37PM +0100 Organization: Karl's Sushi and Packet Smashers X-Die-Spammers: Spammers cheerfully broiled for supper and served with ketchup! cc: freebsd-geom@FreeBSD.org Subject: Re: Gmirror - how to do? 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: Sat, 05 Feb 2005 23:04:17 -0000 On Sat, Feb 05, 2005 at 09:12:37PM +0100, Pawel Jakub Dawidek wrote: > On Sat, Feb 05, 2005 at 01:57:05PM -0600, Karl Denninger wrote: > +> Howdy; > +> > +> Another quickie someone may know how to handle. > +> > +> I've got a 2-drive RAID1 mirror I wish to back up. > +> > +> The easy way appears to be to attach a third drive, let it sync, detach it > +> and then you have a backup, right? > +> > +> So I do the following: > +> > +> atacontrol attach 2 (attach new disk on external adapter) > +> gmirror insert boot ad4s1 (insert the backup into the existing mirror) > +> wait (while the disk synchronizes - 3-4 hours) > +> gmirror remove boot ad4s1 (remove third copy from mirror) > +> atacontrol detach 2 (remove device from the system) > +> > +> Now I can go pull the carrier "cleanly". > +> > +> Except for one small problem - when you do this, then try to boot the > +> backup volume it fails, because gmirror has marked the metadata as "do > +> not use" when you removed it, yet the /etc/fstab entries all point to a > +> mirror that isn't there. > +> > +> So... how do you accomplish this? > +> > +> Detach the BUS underlying the drive without warning gmirror first (e.g. > +> "atacontrol detach 2", without the preceding "gmirror remove"), thereby > +> forcing a "dirty" disconnect? I'd rather not, although if I must, that I > +> suppose would work. However, if I do this, then gmirror thinks I have a > +> third volume present, and as a consequence as soon I re-init that channel > +> and geom sees the disk it will immediately begin a rebuild (whether this is > +> bad or not I suppose is a matter of interpretation) > > In you case I suggest do this: > > 1. atacontrol attach 2 > 2. gmirror insert boot ad4s1 > > 3. gmirror remove boot ad4s1 > 4. gmirror label boot ad4s1 > 5. atacontrol detach 2 > > In 4th step, you labeling only one provider with the same name. > It will be tasted, but ignored, because mirror 'boot' is already > configured: > > GEOM_MIRROR: Device boot already configured. > > Now it should be bootable. > > Remember not to boot the main machine with this disk inside, as it can > be tasted before your main 'boot' mirror. Inserting this disk after > boot, when your 'boot' mirror is configured should be safe. Nope, won't work. The mirrors potentially have different PHYSICAL slice sizes (remember this debate a while back on this list?) and if I do this, I'm guaranteed to screw the partition table, as the fdisk size of the slice table will be picked up. -- -- Karl Denninger (karl@denninger.net) Internet Consultant & Kids Rights Activist http://www.denninger.net My home on the net - links to everything I do! http://scubaforum.org Your UNCENSORED place to talk about DIVING! http://www.spamcuda.net SPAM FREE mailboxes - FREE FOR A LIMITED TIME! http://genesis3.blogspot.com Musings Of A Sentient Mind From owner-freebsd-geom@FreeBSD.ORG Sat Feb 5 23:08:44 2005 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 8A0F016A4CE for ; Sat, 5 Feb 2005 23:08:44 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23FCE43D2F for ; Sat, 5 Feb 2005 23:08:44 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 50CC4ACBCF; Sun, 6 Feb 2005 00:08:42 +0100 (CET) Date: Sun, 6 Feb 2005 00:08:42 +0100 From: Pawel Jakub Dawidek To: Karl Denninger Message-ID: <20050205230842.GD1666@darkness.comp.waw.pl> References: <20050205135705.A10437@denninger.net> <20050205201237.GB1666@darkness.comp.waw.pl> <20050205170415.A12620@denninger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8nsIa27JVQLqB7/C" Content-Disposition: inline In-Reply-To: <20050205170415.A12620@denninger.net> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@FreeBSD.org Subject: Re: Gmirror - how to do? 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: Sat, 05 Feb 2005 23:08:44 -0000 --8nsIa27JVQLqB7/C Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 05, 2005 at 05:04:15PM -0600, Karl Denninger wrote: +> > Remember not to boot the main machine with this disk inside, as it can +> > be tasted before your main 'boot' mirror. Inserting this disk after +> > boot, when your 'boot' mirror is configured should be safe. +>=20 +> Nope, won't work. +>=20 +> The mirrors potentially have different PHYSICAL slice sizes (remember +> this debate a while back on this list?) and if I do this, I'm guaranteed= to +> screw the partition table, as the fdisk size of the slice table will be +> picked up. Sorry, but I don't understand. How can you touch slices configuration by labeling ad4s1? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --8nsIa27JVQLqB7/C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCBVH6ForvXbEpPzQRAhiDAJ9JdA5OnJpUCbY8U2sh5lWB87APeACdFHuz Uis4u2w9sWDGBBh20BSr/Ws= =S5l4 -----END PGP SIGNATURE----- --8nsIa27JVQLqB7/C-- From owner-freebsd-geom@FreeBSD.ORG Sat Feb 5 23:33:28 2005 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 907A916A4CE for ; Sat, 5 Feb 2005 23:33:28 +0000 (GMT) Received: from FS.denninger.net (wsip-68-15-213-52.at.at.cox.net [68.15.213.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B4A243D41 for ; Sat, 5 Feb 2005 23:33:27 +0000 (GMT) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net (localhost [127.0.0.1]) by FS.denninger.net (8.13.1/8.13.1) with SMTP id j15NXQRe012894 for ; Sat, 5 Feb 2005 17:33:27 -0600 (CST) (envelope-from karl@FS.denninger.net) Received: from fs.denninger.net [127.0.0.1] by Spamblock-sys; Sat Feb 5 17:33:26 2005 Received: (from karl@localhost) by FS.denninger.net (8.13.1/8.13.1/Submit) id j15NXQar012892; Sat, 5 Feb 2005 17:33:26 -0600 (CST) (envelope-from karl) Message-ID: <20050205173326.B12620@denninger.net> Date: Sat, 5 Feb 2005 17:33:26 -0600 From: Karl Denninger To: Pawel Jakub Dawidek References: <20050205135705.A10437@denninger.net> <20050205201237.GB1666@darkness.comp.waw.pl> <20050205170415.A12620@denninger.net> <20050205230842.GD1666@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <20050205230842.GD1666@darkness.comp.waw.pl>; from Pawel Jakub Dawidek on Sun, Feb 06, 2005 at 12:08:42AM +0100 Organization: Karl's Sushi and Packet Smashers X-Die-Spammers: Spammers cheerfully broiled for supper and served with ketchup! cc: freebsd-geom@FreeBSD.org Subject: Re: Gmirror - how to do? 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: Sat, 05 Feb 2005 23:33:28 -0000 On Sun, Feb 06, 2005 at 12:08:42AM +0100, Pawel Jakub Dawidek wrote: > On Sat, Feb 05, 2005 at 05:04:15PM -0600, Karl Denninger wrote: > +> > Remember not to boot the main machine with this disk inside, as it can > +> > be tasted before your main 'boot' mirror. Inserting this disk after > +> > boot, when your 'boot' mirror is configured should be safe. > +> > +> Nope, won't work. > +> > +> The mirrors potentially have different PHYSICAL slice sizes (remember > +> this debate a while back on this list?) and if I do this, I'm guaranteed to > +> screw the partition table, as the fdisk size of the slice table will be > +> picked up. > > Sorry, but I don't understand. > How can you touch slices configuration by labeling ad4s1? > > -- > Pawel Jakub Dawidek http://www.wheel.pl > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! Won't the gmirror system create the new mirror (on the "backup disk" using the full size of the slice? If it does, then I can never re-insert that disk into the existing "boot" mirror. Here's what I want to be able to do - if its possible. 1. The backup disk needs to remain physically mounted most of the time. 2. Backups are done on a schedule, automatically. 3. The disk is rotated with one in a vault on some schedule to protect against catastrophe (e.g. fire, etc) I can now mount up the partitions separately if necessary to recover a file or directory if I "oh !@$!" fatfinger something. This all works ok because the first mirror element was on the smallest disk, so other elements are 'downsized'. However, if I do what you're suggesting, the "new" mirror is going to get created with the size of the slice on the disk involved, which screws me. I will be able to mount the disks, but I bet if I try to re-integrate the disk after doing that I get the proverbial "bad address". -- -- Karl Denninger (karl@denninger.net) Internet Consultant & Kids Rights Activist http://www.denninger.net My home on the net - links to everything I do! http://scubaforum.org Your UNCENSORED place to talk about DIVING! http://www.spamcuda.net SPAM FREE mailboxes - FREE FOR A LIMITED TIME! http://genesis3.blogspot.com Musings Of A Sentient Mind