From owner-freebsd-geom@FreeBSD.ORG Sun Sep 5 01:34:46 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 E45AA16A4DC for ; Sun, 5 Sep 2004 01:34:42 +0000 (GMT) Received: from frontend1.messagingengine.com (frontend1.messagingengine.com [66.111.4.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9924743D31 for ; Sun, 5 Sep 2004 01:34:42 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) X-Sasl-enc: Apk/AB8zsyjsgWu6cjvnjg 1094348079 Received: from modem-1113.lynx.dialup.pol.co.uk (modem-1113.lynx.dialup.pol.co.uk [217.135.196.89]) by frontend1.messagingengine.com (Postfix) with ESMTP id 0FF3CC14BBE for ; Sat, 4 Sep 2004 21:34:33 -0400 (EDT) From: "R. W." To: freebsd-geom@freebsd.org Date: Sun, 5 Sep 2004 02:34:13 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200409050234.13571.list-freebsd-2004@morbius.sent.com> Subject: Attaching two gbde partitions with the same password 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, 05 Sep 2004 01:34:46 -0000 I've created two gbde partitions, both have the same password, and I'd like to be able to attach them without typing it twice. Looking at man gbde it doesn't seem to be possible to mount them simultaneously. Is there a good workaround? From owner-freebsd-geom@FreeBSD.ORG Sun Sep 5 18:23:18 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 93A9316A4CE for ; Sun, 5 Sep 2004 18:23:18 +0000 (GMT) Received: from luzik.pl (pc184.sieradz.sdi.tpnet.pl [213.25.227.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 803EE43D2F for ; Sun, 5 Sep 2004 18:23:15 +0000 (GMT) (envelope-from killer@luzik.pl) Received: from killer (helo=localhost) by luzik.pl with local-esmtp (Exim 4.24; FreeBSD) id 1C41eY-0000Jo-Ac for freebsd-geom@freebsd.org; Sun, 05 Sep 2004 20:22:14 +0200 Date: Sun, 5 Sep 2004 20:22:14 +0200 (CEST) From: "killer@luzik.pl" To: freebsd-geom@freebsd.org Message-ID: <20040905202110.N1160@smart.luzik.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: geom_mirror and panics in BETA3 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, 05 Sep 2004 18:23:18 -0000 Hello. I cvsuped fresh sources from RELENG_5 and suppose it is small problem in geom_mirror. When I do: # gmirror label -b round-robin somename da0 # gmirror insert somename da1 and when disks are synchronize data make: # mount /dev/mirror/somename /mnt it's crashing system. Sometimes after that when system is rebooted command: # gmirror list is crashing too. After that is necessary do: # gmirror stop somename # gmirror label... etc. to fix problem. Regards, Piotr Kruszynski. killer-nospam@luzik.pl From owner-freebsd-geom@FreeBSD.ORG Mon Sep 6 11:57:55 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 B6A3116A4CE for ; Mon, 6 Sep 2004 11:57:55 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 218C643D48 for ; Mon, 6 Sep 2004 11:57:55 +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 i86Bvjie047900; Mon, 6 Sep 2004 13:57:45 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: DOT From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 03 Sep 2004 21:41:33 +0200." <20040903214133.144779e2.dot@data.pl> Date: Mon, 06 Sep 2004 13:57:45 +0200 Message-ID: <47899.1094471865@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Allan Fields cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] 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: Mon, 06 Sep 2004 11:57:55 -0000 In message <20040903214133.144779e2.dot@data.pl>, DOT writes: >On Thu, 2 Sep 2004 16:05:56 -0400 >Allan Fields wrote: > >> Can you indicate your number_of_keys parameter you are >> using in -i? Anyone using anything other than default 4? > >In both situations my device was initialized with number_of_keys set >to 1 (one). Another idea: Do you use a detached lock-location file (-L option to gbde init) ? If not, is there any chance the first sector of the gbde partition has been overwritten ? Check your disklabels etc. Also, if it starts at the very beginning of the disk, check that nothing slammed a MBR or similar down there. -- 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 Mon Sep 6 13:50:33 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 221F616A4CE for ; Mon, 6 Sep 2004 13:50:33 +0000 (GMT) Received: from mail.agtel.net (babylon.agtel.net [212.111.64.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id F113943D53 for ; Mon, 6 Sep 2004 13:50:31 +0000 (GMT) (envelope-from jema@sendmail.ru) Received: from [193.26.135.7] (account ) by mail.agtel.net (CommuniGate Pro WebUser 4.0.3) with HTTP id 38763473 for ; Mon, 06 Sep 2004 17:50:30 +0400 From: "Andy Jema" To: freebsd-geom@freebsd.org X-Mailer: CommuniGate Pro Web Mailer v.4.0.3 Date: Mon, 06 Sep 2004 17:50:30 +0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="KOI8-R"; format="flowed" Content-Transfer-Encoding: 8bit Subject: mirror for root partition 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: Mon, 06 Sep 2004 13:50:33 -0000 I'm wondering whether it's possible to mirror a root partition with GEOM_MIRROR? From owner-freebsd-geom@FreeBSD.ORG Mon Sep 6 14:03:51 2004 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CB2716A4CE; Mon, 6 Sep 2004 14:03:51 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E44FF43D58; Mon, 6 Sep 2004 14:03:50 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from freefall.freebsd.org (nork@localhost [127.0.0.1]) i86E3ooB024626; Mon, 6 Sep 2004 14:03:50 GMT (envelope-from nork@freefall.freebsd.org) Received: (from nork@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i86E3onL024622; Mon, 6 Sep 2004 14:03:50 GMT (envelope-from nork) Date: Mon, 6 Sep 2004 14:03:50 GMT From: Norikatsu Shigemura Message-Id: <200409061403.i86E3onL024622@freefall.freebsd.org> To: nork@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-geom@FreeBSD.org Subject: Re: kern/71431: [panic fix] [patch] geom_uzip.ko caused panic 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: Mon, 06 Sep 2004 14:03:51 -0000 Synopsis: [panic fix] [patch] geom_uzip.ko caused panic Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: nork Responsible-Changed-When: Mon Sep 6 14:03:36 GMT 2004 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=71431 From owner-freebsd-geom@FreeBSD.ORG Mon Sep 6 18:30:53 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 253A516A4CF for ; Mon, 6 Sep 2004 18:30:53 +0000 (GMT) Received: from v05184.home.net.pl (v05184.home.net.pl [212.85.117.104]) by mx1.FreeBSD.org (Postfix) with SMTP id 204D543D4C for ; Mon, 6 Sep 2004 18:30:52 +0000 (GMT) (envelope-from kris@home.pl) Received: from localhost (HELO ?81.219.131.10?) (kris@home@127.0.0.1) by matrix11.home.net.pl with SMTP; 6 Sep 2004 18:30:47 -0000 Message-ID: <413CACD6.20205@home.pl> Date: Mon, 06 Sep 2004 20:30:46 +0200 From: =?UTF-8?B?S3J6eXN6dG9mIENpZXDFgnVjaGE=?= User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andy Jema References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-geom@freebsd.org Subject: Re: mirror for root partition 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: Mon, 06 Sep 2004 18:30:53 -0000 Andy Jema wrote: > I'm wondering whether it's possible to mirror a root partition with > GEOM_MIRROR? I'm not sure what do you mean by 'root partition'? Please see 'problems with GEOM_MIRROR' thread where i'm describing my experience with trying to mirror whole disk where freebsd sits. There are still some problems, but I hope they could be fixed soon. -- kris-at-home-dot-pl From owner-freebsd-geom@FreeBSD.ORG Mon Sep 6 18:33:10 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 E174916A4CE for ; Mon, 6 Sep 2004 18:33:10 +0000 (GMT) Received: from v05184.home.net.pl (v05184.home.net.pl [212.85.117.104]) by mx1.FreeBSD.org (Postfix) with SMTP id 13A0143D41 for ; Mon, 6 Sep 2004 18:33:10 +0000 (GMT) (envelope-from kris@home.pl) Received: from localhost (HELO ?81.219.131.10?) (kris@home@127.0.0.1) by matrix11.home.net.pl with SMTP; 6 Sep 2004 18:33:06 -0000 Message-ID: <413CAD65.4080502@home.pl> Date: Mon, 06 Sep 2004 20:33:09 +0200 From: =?UTF-8?B?S3J6eXN6dG9mIENpZXDFgnVjaGE=?= User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <00d701c491af$253ebf30$fe78a8c0@kris> <20040903125220.GP30151@darkness.comp.waw.pl> <413A28A5.4010902@home.pl> <20040906115124.GQ30151@darkness.comp.waw.pl> In-Reply-To: <20040906115124.GQ30151@darkness.comp.waw.pl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-geom@freebsd.org Subject: Re: problems with GEOM_MIRROR 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: Mon, 06 Sep 2004 18:33:11 -0000 Pawel Jakub Dawidek wrote: > +> sysctl -b kern.geom.conftxt still shows labels like da0a .. da0f, and > +> the mirror is still starting synchronization after every restart. > > I haven't check it yet, but maybe this is because of swap partition. > On shutdown, file systems are unmounted, but I think swap paritition is not. > Could you try to remove swap partition from fstab and try again? ok, you were right. after turning off swap the system starts without synchronizing whole mirror. and the 'sysctl -b kern.geom.conftxt' command doesn't show labels like da0a anymore. this is what i expected. BUT, after physically removing one of the disks in mirror, the system doesn't boot up properly :( It doesn't matter if I remove the first or the second disk - the result is the same: Fragment of logfile: GEOM_LABEL[0]: Label for provider da0 is label/disk0 GEOM_LABEL[1]: UFS2 file system detected on da0. GEOM_LABEL[1]: UFS2 file system detected on da0a. GEOM_LABEL[1]: UFS2 file system detected on da0c. GEOM_LABEL[1]: UFS2 file system detected on da0d. GEOM_LABEL[1]: UFS2 file system detected on da0e. GEOM_LABEL[1]: UFS2 file system detected on da0f. GEOM_MIRROR[1]: Creating device mirror1 (id=1132938933). GEOM_MIRROR[0]: Device mirror1 created (id=1132938933). GEOM_MIRROR[1]: Adding disk label/disk0 to mirror1. GEOM_MIRROR[1]: Disk label/disk0 state change from NONE to NEW (device mirror1). GEOM_MIRROR[0]: Device mirror1: provider label/disk0 detected. Mounting root from ufs:/dev/mirror/mirror1a setrootbyname failed ffs_mountroot: can't find rootvp Root mount failed: 6 I think it might be a problem with starting degraded mirror when there is only one disk present in the system. I'll try to add a third disk to the mirror and then start the system with only two of them present. -- kris-at-home-dot-pl From owner-freebsd-geom@FreeBSD.ORG Mon Sep 6 20:39: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 A465616A4CE for ; Mon, 6 Sep 2004 20:39:34 +0000 (GMT) Received: from v00058.home.net.pl (data.pl [212.85.96.58]) by mx1.FreeBSD.org (Postfix) with SMTP id B19F043D58 for ; Mon, 6 Sep 2004 20:39:33 +0000 (GMT) (envelope-from dot@data.pl) Received: from localhost (HELO nonSpace) (dot.data@home@127.0.0.1) by matrix01.home.net.pl with SMTP; 6 Sep 2004 20:39:28 -0000 Date: Mon, 6 Sep 2004 22:52:05 +0200 From: DOT To: "Poul-Henning Kamp" Message-Id: <20040906225205.7b7b81db.dot@data.pl> In-Reply-To: <47899.1094471865@critter.freebsd.dk> References: <20040903214133.144779e2.dot@data.pl> <47899.1094471865@critter.freebsd.dk> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: Allan Fields cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] 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: Mon, 06 Sep 2004 20:39:34 -0000 On Mon, 06 Sep 2004 13:57:45 +0200 "Poul-Henning Kamp" wrote: > >> Can you indicate your number_of_keys parameter you are > >> using in -i? Anyone using anything other than default 4? > > > >In both situations my device was initialized with number_of_keys set > >to 1 (one). > > Another idea: Do you use a detached lock-location file (-L option > to gbde init) ? Yes, I've used -L argument. And according to dates this lockfile wasn't modified before "it" happens. > If not, is there any chance the first sector of the gbde partition > has been overwritten ? Check your disklabels etc. Also, if it starts > at the very beginning of the disk, check that nothing slammed a MBR > or similar down there. I belive that everything was OK there. It was a raw slice starting from circa middle of the disk. Michal Bartkowiak From owner-freebsd-geom@FreeBSD.ORG Mon Sep 6 21:10:55 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 102A916A4CE for ; Mon, 6 Sep 2004 21:10:55 +0000 (GMT) Received: from v05184.home.net.pl (v05184.home.net.pl [212.85.117.104]) by mx1.FreeBSD.org (Postfix) with SMTP id 21D2243D46 for ; Mon, 6 Sep 2004 21:10:54 +0000 (GMT) (envelope-from kris@home.pl) Received: from localhost (HELO ?81.219.131.10?) (kris@home@127.0.0.1) by matrix11.home.net.pl with SMTP; 6 Sep 2004 21:10:50 -0000 Message-ID: <413CD25B.5030502@home.pl> Date: Mon, 06 Sep 2004 23:10:51 +0200 From: =?UTF-8?B?S3J6eXN6dG9mIENpZXDFgnVjaGE=?= User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-geom@freebsd.org References: <00d701c491af$253ebf30$fe78a8c0@kris> <20040903125220.GP30151@darkness.comp.waw.pl> <413A28A5.4010902@home.pl> <20040906115124.GQ30151@darkness.comp.waw.pl> <413CAD65.4080502@home.pl> In-Reply-To: <413CAD65.4080502@home.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit cc: Pawel Jakub Dawidek Subject: Re: problems with GEOM_MIRROR - the solution! 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: Mon, 06 Sep 2004 21:10:55 -0000 Krzysztof CiepÅ‚ucha wrote: > I think it might be a problem with starting degraded mirror when there > is only one disk present in the system. I'll try to add a third disk to > the mirror and then start the system with only two of them present. I have looked at the sources and found that the solution is to set timeout to zero. So I set "kern.geom.mirror.timeout=0" in loader.conf and the system boots up properly with two (of three) and one (of three) disks from mirror present. Interestingly, this also resolved the problem with swap on mirrored disks. So now my system boots up and is running from mirrored disks without any problem: krisbsd# cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/mirror/mirror1b none swap sw 0 0 /dev/mirror/mirror1a / ufs rw 1 1 /dev/mirror/mirror1e /tmp ufs rw 2 2 /dev/mirror/mirror1f /usr ufs rw 2 2 /dev/mirror/mirror1d /var ufs rw 2 2 /dev/label/dataa /usr/obj ufs rw 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 krisbsd# Now some questions / suggestions to pjd: 1. what was the purpose of the kern.geom.mirror.timeout (set by default to 8)? i can't hardly imagine situation where we must wait for some disks to start mirror. 2. could you add a comand to geom mirror (maybe geom mirror status ?) which shows the current state of the mirror (OK, DEGRADED, SYNCHRONIZING, FAILED, etc)? now it is a little bit tricky to determine the state of a mirror when one disk is missing. -- kris-at-home-dot-pl From owner-freebsd-geom@FreeBSD.ORG Tue Sep 7 00:33:47 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 6BF3016A4CE; Tue, 7 Sep 2004 00:33:47 +0000 (GMT) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.49.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E32A43D46; Tue, 7 Sep 2004 00:33:47 +0000 (GMT) (envelope-from paul@gromit.dlib.vt.edu) Received: from hawkwind.Chelsea-Ct.Org (pool-151-199-91-61.roa.east.verizon.net [151.199.91.61]) by gromit.dlib.vt.edu (8.12.11/8.12.11) with ESMTP id i870XhtS099903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Sep 2004 20:33:45 -0400 (EDT) (envelope-from paul@gromit.dlib.vt.edu) Received: from [192.168.1.25] (zappa [192.168.1.25])i870XVP2007612; Mon, 6 Sep 2004 20:33:37 -0400 (EDT) From: Paul Mather To: Krzysztof =?iso-8859-2?Q?Ciep=B3ucha?= In-Reply-To: <413CAD65.4080502@home.pl> References: <00d701c491af$253ebf30$fe78a8c0@kris> <413A28A5.4010902@home.pl><413CAD65.4080502@home.pl> Content-Type: text/plain; charset=iso-8859-2 Message-Id: <1094517210.5231.41.camel@zappa.Chelsea-Ct.Org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 06 Sep 2004 20:33:31 -0400 Content-Transfer-Encoding: 8bit cc: Pawel Jakub Dawidek cc: freebsd-geom@freebsd.org Subject: Re: problems with GEOM_MIRROR 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, 07 Sep 2004 00:33:47 -0000 On Mon, 2004-09-06 at 14:33, Krzysztof Ciep³ucha wrote: > Pawel Jakub Dawidek wrote: > > > +> sysctl -b kern.geom.conftxt still shows labels like da0a .. da0f, and > > +> the mirror is still starting synchronization after every restart. > > > > I haven't check it yet, but maybe this is because of swap partition. > > On shutdown, file systems are unmounted, but I think swap paritition is not. > > Could you try to remove swap partition from fstab and try again? > > ok, you were right. after turning off swap the system starts without > synchronizing whole mirror. > and the 'sysctl -b kern.geom.conftxt' command doesn't show labels like > da0a anymore. this is what i expected. I use a RAIDframe RAID 1 mirror on my NetBSD/alpha system. There, they have a "swapoff" rc.conf variable that you should set to "YES" to have block swap devices removed (via "swapctl -U -t blk") during the rc.d shutdown sequence. Before that was introduced, I found that my /dev/raid1b swap device would initiate a parity rebuild upon reboot (presumably because it hadn't quiesced prior to shutdown). What does geom_mirror do with respect to quiescing prior to shutdown? Cheers, Paul. -- e-mail: paul@gromit.dlib.vt.edu "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." --- Frank Vincent Zappa From owner-freebsd-geom@FreeBSD.ORG Tue Sep 7 08:09:42 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 9B83A16A4CE for ; Tue, 7 Sep 2004 08:09:42 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 663D243D31 for ; Tue, 7 Sep 2004 08:09:42 +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 i8789fct013580; Tue, 7 Sep 2004 04:09:41 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i8789fCI013579; Tue, 7 Sep 2004 04:09:41 -0400 (EDT) (envelope-from afields) Date: Tue, 7 Sep 2004 04:09:41 -0400 From: Allan Fields To: "R. W." Message-ID: <20040907080941.GH34157@afields.ca> References: <200409050234.13571.list-freebsd-2004@morbius.sent.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2B/JsCI69OhZNC5r" Content-Disposition: inline In-Reply-To: <200409050234.13571.list-freebsd-2004@morbius.sent.com> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: Attaching two gbde partitions with the same password 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, 07 Sep 2004 08:09:42 -0000 --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 05, 2004 at 02:34:13AM +0100, R. W. wrote: > I've created two gbde partitions, both have the same password, and I'd=20 > like to be able to attach them without typing it twice. Looking at man=20 > gbde it doesn't seem to be possible to mount them simultaneously. >=20 > Is there a good workaround? Yes, it's possible to read in the passphrase once and then feed it on the command line using -p, it's also possible to feed it on stdin w/ a patch I've posted previously. The only issue with reading in passwords from a shell script is to not echo to the tty. There are ways around this problem such as: In bash you can use: read -esp "Enter passphrase: " pass gbde attach $dev -l $lck -p $pass otherwise: tmp=3D`stty -g`; stty -echo read -p "Enter passphrase: " pass echo; stty $tmp gbde attach $dev -l $lck -p $pass You could put this into your rc.early or something similarly early in the boot sequence if it suits your needs. (For security reasons passing the passphrase on the command line should be done before going multiuser.) Hope this helps, --=20 Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFBPWzE90UNcjm0VUERAnqYAKCwoOXO5EQNeR/1ZC//Y1eXyy5sUwCgnMBu y4/KHFXtdtJ+ODz3cEFgx+4= =bCR5 -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r-- From owner-freebsd-geom@FreeBSD.ORG Tue Sep 7 08:23:12 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 85E0716A4CE for ; Tue, 7 Sep 2004 08:23:12 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52D3543D2F for ; Tue, 7 Sep 2004 08:23:12 +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 i878NBbV013653; Tue, 7 Sep 2004 04:23:11 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i878NBOI013652; Tue, 7 Sep 2004 04:23:11 -0400 (EDT) (envelope-from afields) Date: Tue, 7 Sep 2004 04:23:11 -0400 From: Allan Fields To: "R. W." Message-ID: <20040907082311.GI34157@afields.ca> References: <200409050234.13571.list-freebsd-2004@morbius.sent.com> <20040907080941.GH34157@afields.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040907080941.GH34157@afields.ca> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: Attaching two gbde partitions with the same password 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, 07 Sep 2004 08:23:12 -0000 Add lines below to the examples (in case $pass hangs around.) On Tue, Sep 07, 2004 at 04:09:41AM -0400, Allan Fields wrote: > The only issue with reading in passwords from a shell script is to > not echo to the tty. There are ways around this problem such as: > > In bash you can use: > read -esp "Enter passphrase: " pass > gbde attach $dev -l $lck -p $pass gbde attach $dev2 -l $lck2 -p $pass pass=`head -c1024 /dev/urandom`; unset pass > > otherwise: > tmp=`stty -g`; stty -echo > read -p "Enter passphrase: " pass > echo; stty $tmp > gbde attach $dev -l $lck -p $pass gbde attach $dev2 -l $lck2 -p $pass pass=`head -c1024 /dev/urandom`; unset pass > > You could put this into your rc.early or something similarly early > in the boot sequence if it suits your needs. (For security reasons > passing the passphrase on the command line should be done before > going multiuser.) -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-geom@FreeBSD.ORG Wed Sep 8 10:52:37 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 4EECD16A4CE for ; Wed, 8 Sep 2004 10:52:37 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B36C43D2F for ; Wed, 8 Sep 2004 10:52:37 +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 i88AqYI7017657; Wed, 8 Sep 2004 06:52:34 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i88AqYAJ017656; Wed, 8 Sep 2004 06:52:34 -0400 (EDT) (envelope-from afields) Date: Wed, 8 Sep 2004 06:52:34 -0400 From: Allan Fields To: Poul-Henning Kamp Message-ID: <20040908105234.GJ34157@afields.ca> References: <20040903214133.144779e2.dot@data.pl> <47899.1094471865@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OBd5C1Lgu00Gd/Tn" Content-Disposition: inline In-Reply-To: <47899.1094471865@critter.freebsd.dk> User-Agent: Mutt/1.4i cc: DOT cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] 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, 08 Sep 2004 10:52:37 -0000 --OBd5C1Lgu00Gd/Tn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 06, 2004 at 01:57:45PM +0200, Poul-Henning Kamp wrote: > In message <20040903214133.144779e2.dot@data.pl>, DOT writes: > >On Thu, 2 Sep 2004 16:05:56 -0400 > >Allan Fields wrote: > > > >> Can you indicate your number_of_keys parameter you are > >> using in -i? Anyone using anything other than default 4? > > > >In both situations my device was initialized with number_of_keys set > >to 1 (one). >=20 > Another idea: Do you use a detached lock-location file (-L option > to gbde init) ? I've reproduced again (consistently) during tests and can file a PR if you want: - number_of_keys=3D1 - raw slice w/o a disklabel (either in primary or extended) - assume any 5.x so far bench# uname -a FreeBSD bench 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Aug 15 06:26:20 EDT 2= 004 root@bench:/usr/obj/usr/src/sys/GENERIC i386 bench# gbde init /dev/ad0s16 -f/dev/stdin<<-_INIT_ -L /etc/ad0s16.lock number_of_keys=3D1 _INIT_ Enter new passphrase: test Reenter new passphrase: test Wrote key 0 at 2767794688 bench# sh -c "echo $[2767794688/512] 5405849 bench# dd if=3D/dev/ad0s16 skip=3D5405849 bs=3D512 count=3D1|md5 1+0 records in 1+0 records out 512 bytes transfered in 0.002607 secs (196404 bytes/sec) d6b04b35b7c8dc492a8ec1c085a7d3e9 bench# md5 /etc/ad0s16.lock MD5 (/etc/ad0s16.lock) =3D ec2b824243467446bfb13f95b0785b7d bench# gbde attach /dev/ad0s16 -l /etc/ad0s16.lock Enter passphrase: test bench# ls -l /dev/ad0s16* crw-r----- 1 root operator 4, 33 Sep 2 14:22 /dev/ad0s16 crw-r----- 1 root operator 4, 49 Sep 2 14:22 /dev/ad0s16.bde bench# newfs -U /dev/ad0s16.bde bench# mount /dev/ad0s16.bde /testbde bench# cp -RPp /usr /testbde bench# dd if=3D/dev/random of=3D/testbde/filler bench# reboot =2E.. bench# gbde attach /dev/ad0s16 -l /etc/ad0s16.lock Enter passphrase: test bench# ls -l /dev/ad0s16* crw-r----- 1 root operator 4, 33 Sep 2 14:22 /dev/ad0s16 bench# gbde attach /dev/ad0s2d -l /etc/ad0s2d.lock Enter passphrase: test bench# ls -l /dev/ad0s2d* crw-r----- 1 root operator 4, 18 Sep 2 14:22 /dev/ad0s2d crw-r----- 1 root operator 4, 49 Sep 2 14:22 /dev/ad0s2d.bde bench# dd if=3D/dev/ad0s16 skip=3D5405849 bs=3D512 count=3D1|md5 1+0 records in 1+0 records out 512 bytes transfered in 0.000564 secs (907643 bytes/sec) 78b5f14a13c85ae4eac30e5546606abd bench# md5 /etc/ad0s16.lock MD5 (/etc/ad0s16.lock) =3D ec2b824243467446bfb13f95b0785b7d I'm pretty sure I got the passphrase correct. Can you verify my math/methods of hashing the key sector? (If I had zero'd or otherwise wipe out the specified sector w/ dd as above I can stop the bde device from attaching.) > If not, is there any chance the first sector of the gbde partition > has been overwritten ? Check your disklabels etc. Also, if it starts > at the very beginning of the disk, check that nothing slammed a MBR > or similar down there. Doesn't look like this is the problem, though sector zero does change after writing to the device and rebooting. I'll assume this is OK when -L/-l are in use. Haven't done any boundry/offset tests yet though next step for me is to try debugging / determine if number_of_keys=3D4 has similar issues w/ raw partitions. =09 > --=20 > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe =20 > Never attribute to malice what can adequately be explained by incompetenc= e. Another thing: Given DAG, can we reasonably expect configs such as: ad0s2.bdef da4.bdes1a etc. to work? Valid combos (w/ slice->part constraint) I see: dev--bde-------->part-------fs dev--bde->slice-------------fs dev-------slice------->bde--fs dev-------slice->part-------fs dev------------->part->bde--fs | slice=3D>dos partition, part=3D>disklabel So far my attempts at parsing device specs in C has proved interesting. Thanks, --=20 Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 --OBd5C1Lgu00Gd/Tn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFBPuRx90UNcjm0VUERAiN+AJoCgQq1oH8OVBrf5Tzti69H9M/3jwCfTpw9 g8G8w1a0CD1s0DlPYnEAaQw= =kJ3t -----END PGP SIGNATURE----- --OBd5C1Lgu00Gd/Tn-- From owner-freebsd-geom@FreeBSD.ORG Wed Sep 8 16:16:14 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 5BA4516A4CE for ; Wed, 8 Sep 2004 16:16:14 +0000 (GMT) Received: from mail.ba.zoznam.sk (mail.ba.zoznam.sk [217.75.73.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5420B43D5E for ; Wed, 8 Sep 2004 16:16:13 +0000 (GMT) (envelope-from matuska@firma.zoznam.sk) Received: from localhost (localhost.budkova.zoznam.sk [127.0.0.1]) by mail.ba.zoznam.sk (Postfix) with ESMTP id 3A8DA22B55 for ; Wed, 8 Sep 2004 18:16:12 +0200 (CEST) Received: from mail.ba.zoznam.sk ([127.0.0.1]) by localhost (mail.ba.zoznam.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05876-04-4 for ; Wed, 8 Sep 2004 18:16:11 +0200 (CEST) Received: from [192.168.0.153] (unknown [192.168.0.153]) by mail.ba.zoznam.sk (Postfix) with ESMTP id C7EA82285E for ; Wed, 8 Sep 2004 18:16:11 +0200 (CEST) Message-ID: <413F304D.6060608@firma.zoznam.sk> Date: Wed, 08 Sep 2004 18:16:13 +0200 From: Martin Matuska User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: multipart/mixed; boundary="------------040604010102050001040002" X-Virus-Scanned: by amavisd-new at firma.zoznam.sk X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: GEOM + sysinstall 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, 08 Sep 2004 16:16:14 -0000 This is a multi-part message in MIME format. --------------040604010102050001040002 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit The sysinstall utility does not start, if a glabel or gmirror device is configured (I tried only these two). Sysinstall reports "BARF 269" and exits. --------------040604010102050001040002-- From owner-freebsd-geom@FreeBSD.ORG Wed Sep 8 16:22:13 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 6045316A4CF for ; Wed, 8 Sep 2004 16:22:13 +0000 (GMT) Received: from mail.ba.zoznam.sk (mail.ba.zoznam.sk [217.75.73.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1E343D1F for ; Wed, 8 Sep 2004 16:22:12 +0000 (GMT) (envelope-from matuska@firma.zoznam.sk) Received: from localhost (localhost.budkova.zoznam.sk [127.0.0.1]) by mail.ba.zoznam.sk (Postfix) with ESMTP id 0B8D522BED for ; Wed, 8 Sep 2004 18:22:12 +0200 (CEST) Received: from mail.ba.zoznam.sk ([127.0.0.1]) by localhost (mail.ba.zoznam.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05595-04 for ; Wed, 8 Sep 2004 18:22:10 +0200 (CEST) Received: from [192.168.0.153] (unknown [192.168.0.153]) by mail.ba.zoznam.sk (Postfix) with ESMTP id E1FCE22BE9 for ; Wed, 8 Sep 2004 18:22:10 +0200 (CEST) Message-ID: <413F31B4.9080407@firma.zoznam.sk> Date: Wed, 08 Sep 2004 18:22:12 +0200 From: Martin Matuska User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: multipart/mixed; boundary="------------000904050608060207060107" X-Virus-Scanned: by amavisd-new at firma.zoznam.sk X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Partition table offset increment by 63 with geom mirror 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, 08 Sep 2004 16:22:13 -0000 This is a multi-part message in MIME format. --------------000904050608060207060107 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello, I have experienced the same problem as stated in: http://lists.freebsd.org/pipermail/freebsd-current/2003-July/007708.html System: FreeBSD 5.3-BETA3 i386 Problem description: When accessing SCSI disks via gmirror, the c partition (and all sub-partitions) reports an increased offset by 63 (under GEOM). Additional data: dmesg: CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2791.01-MHz 686-class CPU) ahd0: port 0x4000-0x40ff,0x3800-0x38ff mem 0xfe9e0000-0xfe9e1fff irq 50 at device 7.0 on pci4 ahd0: [GIANT-LOCKED] aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs ahd1: port 0x3400-0x34ff,0x3000-0x30ff mem 0xfe9f0000-0xfe9f1fff irq 49 at device 7.1 on pci4 ahd1: [GIANT-LOCKED] da0 at ahd1 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged Queueing Enabled da0: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) da1 at ahd1 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged Queueing Enabled da1: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) test# fdisk da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=4427 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=4427 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 71119692 (34726 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: test# bsdlabel -r /dev/da0s1 # /dev/da0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 71119692 0 unused 0 0 # "raw" part, don't edit test# gmirror label -v m1 da0 Metadata value stored on da0. Done. test# bsdlabel -r /dev/mirror/m1s1 # /dev/mirror/m1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 71119692 63 unused 0 0 # "raw" part, don't edit 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 This happens when mirroring the slice directly, too. I have the following sources compiled into my kernel: g_mirror.c: 1.25 (but I tried 1.19 from RELENG_5, too) g_mirror.h: 1.8 g_mirror_ctl.c: 1.4 --------------000904050608060207060107-- From owner-freebsd-geom@FreeBSD.ORG Wed Sep 8 16:25:08 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 76FBB16A4CE for ; Wed, 8 Sep 2004 16:25:08 +0000 (GMT) Received: from mail.ba.zoznam.sk (mail.ba.zoznam.sk [217.75.73.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id CECE843D31 for ; Wed, 8 Sep 2004 16:25:07 +0000 (GMT) (envelope-from matuska@firma.zoznam.sk) Received: from localhost (localhost.budkova.zoznam.sk [127.0.0.1]) by mail.ba.zoznam.sk (Postfix) with ESMTP id 093A422BED for ; Wed, 8 Sep 2004 18:25:07 +0200 (CEST) Received: from mail.ba.zoznam.sk ([127.0.0.1]) by localhost (mail.ba.zoznam.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05595-04-4 for ; Wed, 8 Sep 2004 18:25:06 +0200 (CEST) Received: from [192.168.0.153] (unknown [192.168.0.153]) by mail.ba.zoznam.sk (Postfix) with ESMTP id 5318222BE9 for ; Wed, 8 Sep 2004 18:25:06 +0200 (CEST) Message-ID: <413F3264.1040509@firma.zoznam.sk> Date: Wed, 08 Sep 2004 18:25:08 +0200 From: Martin Matuska User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: multipart/mixed; boundary="------------010502020000050107030304" X-Virus-Scanned: by amavisd-new at firma.zoznam.sk X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Partition table offset increment by 63 with geom mirror class 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, 08 Sep 2004 16:25:08 -0000 This is a multi-part message in MIME format. --------------010502020000050107030304 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello, I have experienced the same problem as stated in: http://lists.freebsd.org/pipermail/freebsd-current/2003-July/007708.html System: FreeBSD 5.3-BETA3 i386 Problem description: When accessing SCSI disks via gmirror, the c partition (and all sub-partitions) reports an increased offset by 63 (under GEOM). Additional data: dmesg: CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2791.01-MHz 686-class CPU) ahd0: port 0x4000-0x40ff,0x3800-0x38ff mem 0xfe9e0000-0xfe9e1fff irq 50 at device 7.0 on pci4 ahd0: [GIANT-LOCKED] aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs ahd1: port 0x3400-0x34ff,0x3000-0x30ff mem 0xfe9f0000-0xfe9f1fff irq 49 at device 7.1 on pci4 ahd1: [GIANT-LOCKED] da0 at ahd1 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged Queueing Enabled da0: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) da1 at ahd1 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged Queueing Enabled da1: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) test# fdisk da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=4427 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=4427 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 71119692 (34726 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: test# bsdlabel -r /dev/da0s1 # /dev/da0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 71119692 0 unused 0 0 # "raw" part, don't edit test# gmirror label -v m1 da0 Metadata value stored on da0. Done. test# bsdlabel -r /dev/mirror/m1s1 # /dev/mirror/m1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 71119692 63 unused 0 0 # "raw" part, don't edit 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 This happens when mirroring the slice directly, too. I have the following sources compiled into my kernel: g_mirror.c: 1.25 (but I tried 1.19 from RELENG_5, too) g_mirror.h: 1.8 g_mirror_ctl.c: 1.4 --------------010502020000050107030304-- From owner-freebsd-geom@FreeBSD.ORG Wed Sep 8 17:03:52 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 F347316A4CE for ; Wed, 8 Sep 2004 17:03:51 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46CEB43D2D for ; Wed, 8 Sep 2004 17:03:51 +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 i88DPOK7041404; Wed, 8 Sep 2004 15:25:24 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Allan Fields From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 08 Sep 2004 06:52:34 EDT." <20040908105234.GJ34157@afields.ca> Date: Wed, 08 Sep 2004 15:25:24 +0200 Message-ID: <41403.1094649924@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: DOT cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] 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, 08 Sep 2004 17:03:52 -0000 Here is one bugfix, but I'm not 100% sure it is what bites you, but please test anyway. Poul-Henning Index: gbde.c =================================================================== RCS file: /home/ncvs/src/sbin/gbde/gbde.c,v retrieving revision 1.24 diff -u -r1.24 gbde.c --- gbde.c 6 Sep 2004 13:42:09 -0000 1.24 +++ gbde.c 8 Sep 2004 13:20:30 -0000 @@ -476,7 +476,7 @@ static int sorthelp(const void *a, const void *b) { - const off_t *oa, *ob; + const uint64_t *oa, *ob; oa = a; ob = b; -- 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 Wed Sep 8 18:21:47 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 5C35616A4CE for ; Wed, 8 Sep 2004 18:21:47 +0000 (GMT) Received: from v05184.home.net.pl (v05184.home.net.pl [212.85.117.104]) by mx1.FreeBSD.org (Postfix) with SMTP id 347DB43D48 for ; Wed, 8 Sep 2004 18:21:44 +0000 (GMT) (envelope-from kris@home.pl) Received: from localhost (HELO ?192.168.1.10?) (kris@home@127.0.0.1) by matrix11.home.net.pl with SMTP; 8 Sep 2004 18:21:39 -0000 Message-ID: <413F4DAA.9030908@home.pl> Date: Wed, 08 Sep 2004 20:21:30 +0200 From: =?ISO-8859-2?Q?Krzysztof_Ciep=B3ucha?= User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pawel Jakub Dawidek , freebsd-geom References: <00d701c491af$253ebf30$fe78a8c0@kris> <20040903125220.GP30151@darkness.comp.waw.pl> <413A28A5.4010902@home.pl> <20040906115124.GQ30151@darkness.comp.waw.pl> <413CAD65.4080502@home.pl> <413CD25B.5030502@home.pl> <20040908161418.GU30151@darkness.comp.waw.pl> In-Reply-To: <20040908161418.GU30151@darkness.comp.waw.pl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: problems with GEOM_MIRROR - the solution! 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, 08 Sep 2004 18:21:47 -0000 Pawel Jakub Dawidek wrote: > It shouldn't if you have more than one disk. > So let it be clear: there is no synchronization if there is more than one > disk and timeout is set to 0? Yes, on 6-CURRENT it seems to work ok. But I'm not sure about 5.3BETA2 and BETA3 - I have to check it out on the second server. It seems that 5.3BETA builds ignore geom-related sysctls set in /boot/loader.conf > +> 1. what was the purpose of the kern.geom.mirror.timeout (set by default > +> to 8)? i can't hardly imagine situation where we must wait for some > +> disks to start mirror. > > Believe me, there can be many, e.g. mirror on one ata disk (which is > detected immediately) and one SCSI disk (which is detected after > SCSI_DELAY delay). I don't think so, because waiting for SCSI settlement pauses boot process and after that geom mirror looks for providers (in this case: scsi disks). BTW: 8 seconds geom mirror timeout is less than default 15 seconds SCSI settlement timeout, so it wouldn't work in that way anyway. > > +> 2. could you add a comand to geom mirror (maybe geom mirror status ?) > +> which shows the current state of the mirror (OK, DEGRADED, > +> SYNCHRONIZING, FAILED, etc)? now it is a little bit tricky to determine > +> the state of a mirror when one disk is missing. > > Yes, I can. There is such field in graid3 already. > Great to hear that. Did you make any performance comparisions with hardware mirror controllers? It shouldn't be any slower unless there is high CPU utilization, right? Do you think it is better to use geom mirror (which is often easier to control / manage) than sticking with hardware-based mirror / raid controllers (most of them lacks any management software for freebsd) ? -- kris-at-home-dot-pl From owner-freebsd-geom@FreeBSD.ORG Thu Sep 9 06:07:04 2004 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF7B216A4CE; Thu, 9 Sep 2004 06:07:04 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C21E043D46; Thu, 9 Sep 2004 06:07:04 +0000 (GMT) (envelope-from fjoe@FreeBSD.org) Received: from freefall.freebsd.org (fjoe@localhost [127.0.0.1]) i89674ZZ039639; Thu, 9 Sep 2004 06:07:04 GMT (envelope-from fjoe@freefall.freebsd.org) Received: (from fjoe@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i89674F3039635; Thu, 9 Sep 2004 06:07:04 GMT (envelope-from fjoe) Date: Thu, 9 Sep 2004 06:07:04 GMT From: Max Khon Message-Id: <200409090607.i89674F3039635@freefall.freebsd.org> To: daichi@FreeBSD.org, fjoe@FreeBSD.org, freebsd-geom@FreeBSD.org Subject: Re: kern/71431: [panic fix] [patch] geom_uzip.ko caused panic 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, 09 Sep 2004 06:07:05 -0000 Synopsis: [panic fix] [patch] geom_uzip.ko caused panic State-Changed-From-To: open->feedback State-Changed-By: fjoe State-Changed-When: Thu Sep 9 06:04:33 GMT 2004 State-Changed-Why: I can't reproduce this. geom uzip load does not work. kldload geom_uzip works perfectly. Can you provide stack trace? Can you reproduce the problem on recent -CURRENT? You can try this patch instead (but I doubt that it will change anything for you): Index: sys/geom/uzip/g_uzip.c =================================================================== RCS file: /home/ncvs/src/sys/geom/uzip/g_uzip.c,v retrieving revision 1.1 diff -u -p -r1.1 g_uzip.c --- sys/geom/uzip/g_uzip.c 13 Aug 2004 09:40:57 -0000 1.1 +++ sys/geom/uzip/g_uzip.c 8 Sep 2004 15:34:42 -0000 @@ -518,4 +518,5 @@ static struct g_class g_uzip_class = { .spoiled = g_uzip_spoiled, }; -DECLARE_GEOM_CLASS(g_uzip_class, g_uzip); +DECLARE_GEOM_CLASS(g_uzip_class, geom_uzip); +MODULE_DEPEND(geom_uzip, zlib, 1, 1, 1); Index: sys/modules/geom/geom_uzip/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/geom/geom_uzip/Makefile,v retrieving revision 1.1 diff -u -p -r1.1 Makefile --- sys/modules/geom/geom_uzip/Makefile 13 Aug 2004 09:40:58 -0000 1.1 +++ sys/modules/geom/geom_uzip/Makefile 8 Sep 2004 15:32:40 -0000 @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../geom/uzip ${.CURDIR}/../../../net KMOD= geom_uzip -SRCS= g_uzip.c zlib.c +SRCS= g_uzip.c #CFLAGS= -g .include http://www.freebsd.org/cgi/query-pr.cgi?pr=71431 From owner-freebsd-geom@FreeBSD.ORG Thu Sep 9 14:17:50 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 8F6D716A4CE for ; Thu, 9 Sep 2004 14:17:50 +0000 (GMT) Received: from frontend1.messagingengine.com (frontend1.messagingengine.com [66.111.4.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CA7643D3F for ; Thu, 9 Sep 2004 14:17:50 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) X-Sasl-enc: 5rVdPXPkCgiSW3FUnHOAJg 1094739462 Received: from modem-1992.lemur.dialup.pol.co.uk (modem-1992.lemur.dialup.pol.co.uk [217.135.135.200]) by frontend1.messagingengine.com (Postfix) with ESMTP id 7F195C1557C for ; Thu, 9 Sep 2004 10:17:42 -0400 (EDT) From: "R. W." To: freebsd-geom@freebsd.org Date: Thu, 9 Sep 2004 15:17:39 +0100 User-Agent: KMail/1.6.2 References: <200409050234.13571.list-freebsd-2004@morbius.sent.com> <20040907080941.GH34157@afields.ca> <20040907082311.GI34157@afields.ca> In-Reply-To: <20040907082311.GI34157@afields.ca> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409091517.39846.list-freebsd-2004@morbius.sent.com> Subject: Re: Attaching two gbde partitions with the same password 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, 09 Sep 2004 14:17:50 -0000 On Tuesday 07 September 2004 09:23, Allan Fields wrote: > Add lines below to the examples (in case $pass hangs around.) > > On Tue, Sep 07, 2004 at 04:09:41AM -0400, Allan Fields wrote: > > The only issue with reading in passwords from a shell script is to > > not echo to the tty. There are ways around this problem such as: > > > > In bash you can use: > > read -esp "Enter passphrase: " pass > > gbde attach $dev -l $lck -p $pass > > gbde attach $dev2 -l $lck2 -p $pass > pass=`head -c1024 /dev/urandom`; unset pass > > > otherwise: > > tmp=`stty -g`; stty -echo > > read -p "Enter passphrase: " pass > > echo; stty $tmp > > gbde attach $dev -l $lck -p $pass > > gbde attach $dev2 -l $lck2 -p $pass > pass=`head -c1024 /dev/urandom`; unset pass > > > You could put this into your rc.early or something similarly early > > in the boot sequence if it suits your needs. (For security reasons > > passing the passphrase on the command line should be done before > > going multiuser.) Thanks for your help. If I'm the only user, and I have no remote access enabled, do I gain much by attaching before going multiuser? > pass=`head -c1024 /dev/urandom`; unset pass I don't think this line works as intended. I had a quick look at the bash source, and it looks as if it allocates memory for the new string, and frees the old one. From owner-freebsd-geom@FreeBSD.ORG Fri Sep 10 16:15:50 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 4D76916A4CE for ; Fri, 10 Sep 2004 16:15:50 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2012643D48 for ; Fri, 10 Sep 2004 16:15:50 +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 i8AGFnRh025410; Fri, 10 Sep 2004 12:15:49 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i8AGFnM5025409; Fri, 10 Sep 2004 12:15:49 -0400 (EDT) (envelope-from afields) Date: Fri, 10 Sep 2004 12:15:49 -0400 From: Allan Fields To: "R. W." Message-ID: <20040910161549.GK34157@afields.ca> References: <200409050234.13571.list-freebsd-2004@morbius.sent.com> <20040907080941.GH34157@afields.ca> <20040907082311.GI34157@afields.ca> <200409091517.39846.list-freebsd-2004@morbius.sent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409091517.39846.list-freebsd-2004@morbius.sent.com> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: Attaching two gbde partitions with the same password 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, 10 Sep 2004 16:15:50 -0000 On Thu, Sep 09, 2004 at 03:17:39PM +0100, R. W. wrote: > On Tuesday 07 September 2004 09:23, Allan Fields wrote: > > Add lines below to the examples (in case $pass hangs around.) > > > > On Tue, Sep 07, 2004 at 04:09:41AM -0400, Allan Fields wrote: > > > The only issue with reading in passwords from a shell script is to > > > not echo to the tty. There are ways around this problem such as: > > > > > > In bash you can use: > > > read -esp "Enter passphrase: " pass > > > gbde attach $dev -l $lck -p $pass > > > > gbde attach $dev2 -l $lck2 -p $pass > > pass=`head -c1024 /dev/urandom`; unset pass > > > > > otherwise: > > > tmp=`stty -g`; stty -echo > > > read -p "Enter passphrase: " pass > > > echo; stty $tmp > > > gbde attach $dev -l $lck -p $pass > > > > gbde attach $dev2 -l $lck2 -p $pass > > pass=`head -c1024 /dev/urandom`; unset pass > > > > > You could put this into your rc.early or something similarly early > > > in the boot sequence if it suits your needs. (For security reasons > > > passing the passphrase on the command line should be done before > > > going multiuser.) > > Thanks for your help. > > If I'm the only user, and I have no remote access enabled, do I gain No network at all? > much by attaching before going multiuser? Pro: - Access to volumes in later startup possible (encrypted /var and /tmp); - File system checks can be done along with other non-encrypted devices; - The machine won't be on the network at all until later in the startup sequence; - Potentially insecure programs other than the shell wouldn't have had a chance to load. Con: - The need to enter a passphrase wouldn't work well for unattended reboots (though you'll probably want console access for attaching at this point anyway); - rc scripts for attach are somewhat minimal, but this doesn't preclude calling custom scripts early in startup, if needed; - it's still possible for an attacker to compromise physical security and setup logging (trojaned binaries, etc.) or monitor passphrase entry on the keyboard. By not putting the passphrase in the environment, it's even less of a worry. > > pass=`head -c1024 /dev/urandom`; unset pass > > I don't think this line works as intended. I had a quick look at the > bash source, and it looks as if it allocates memory for the new string, > and frees the old one. That's a good point: a problem w/ most shells is that you have lesser control than in C. You could write a wrapper program or modify gbde(8) itself if needed. My primary intent was to quickly ensure: - the shell itself couldn't subsequently retrieve the old value; - that the memory containing the passphrase was overwritten (or at least zeroed out) unset might be sufficient if random assignment doesn't provide additional security in this scenario. If the script is short lived (separate shell invocation from other boot tasks) as with most rc scripts, the only concern is that the passphrase could stick around in memory. I gather the real solution here is to implement memory scrubbing upon free() as a security feature. It would be trivial to implement: if it hasn't been tackled, it's been on my list to look at. Worth noting is that gbde(8) currently doesn't implement memory scrubbing yet either. -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-geom@FreeBSD.ORG Fri Sep 10 16:37:10 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 4728C16A4CE for ; Fri, 10 Sep 2004 16:37:10 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15C9B43D41 for ; Fri, 10 Sep 2004 16:37:10 +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 i8AGb8WD025480; Fri, 10 Sep 2004 12:37:08 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i8AGb7m4025479; Fri, 10 Sep 2004 12:37:07 -0400 (EDT) (envelope-from afields) Date: Fri, 10 Sep 2004 12:37:07 -0400 From: Allan Fields To: Poul-Henning Kamp Message-ID: <20040910163707.GL34157@afields.ca> References: <20040908105234.GJ34157@afields.ca> <41403.1094649924@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41403.1094649924@critter.freebsd.dk> User-Agent: Mutt/1.4i cc: DOT cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] 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, 10 Sep 2004 16:37:10 -0000 On Wed, Sep 08, 2004 at 03:25:24PM +0200, Poul-Henning Kamp wrote: > > Here is one bugfix, but I'm not 100% sure it is what bites > you, but please test anyway. It doesn't resolve the master key sector overwrite bug, but otherwise works fine. In my tests number_of_keys=4 works reliably even with raw slices, doesn't preclude scenario w/ beginning of slice being overwritten by other install/OS. The issue seems at some point (depending on master key location) w/ number_of_keys=1 the device eventually fills up enough to overwrite key sector(s): could be boundary condition. To try: - number_of_keys=2, number_of_keys=3 - fist_sector=0+x, last_sector=N-x tests - debug: set some break points in bde when (offset == master key offset) (other tests:) - backup/restore key sectors, try fsck - non-ufs use of device should reproduce, verify > Poul-Henning > > 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. -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-geom@FreeBSD.ORG Sat Sep 11 17:59:18 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 092F516A4CE for ; Sat, 11 Sep 2004 17:59:18 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DF8143D53 for ; Sat, 11 Sep 2004 17:59:17 +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 i8BHx71I027672; Sat, 11 Sep 2004 19:59:12 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Allan Fields From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 10 Sep 2004 12:37:07 EDT." <20040910163707.GL34157@afields.ca> Date: Sat, 11 Sep 2004 19:59:07 +0200 Message-ID: <27671.1094925547@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: DOT cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] 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, 11 Sep 2004 17:59:18 -0000 can you try the two fixes I just committed to -current ? In message <20040910163707.GL34157@afields.ca>, Allan Fields writes: >On Wed, Sep 08, 2004 at 03:25:24PM +0200, Poul-Henning Kamp wrote: >> >> Here is one bugfix, but I'm not 100% sure it is what bites >> you, but please test anyway. > >It doesn't resolve the master key sector overwrite bug, but otherwise >works fine. In my tests number_of_keys=4 works reliably even with >raw slices, doesn't preclude scenario w/ beginning of slice being >overwritten by other install/OS. > >The issue seems at some point (depending on master key location) >w/ number_of_keys=1 the device eventually fills up enough to >overwrite key sector(s): could be boundary condition. > >To try: >- number_of_keys=2, number_of_keys=3 >- fist_sector=0+x, last_sector=N-x tests >- debug: set some break points in bde when (offset == master key offset) >(other tests:) >- backup/restore key sectors, try fsck >- non-ufs use of device should reproduce, verify > >> Poul-Henning >> >> 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. > >-- > Allan Fields, AFRSL - http://afields.ca > 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 > -- 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 Sat Sep 11 20:35:26 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 4031D16A4CE; Sat, 11 Sep 2004 20:35:26 +0000 (GMT) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0E4C43D46; Sat, 11 Sep 2004 20:35:25 +0000 (GMT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (authenticated bits=128) by kestrel.alerce.com (8.12.10/8.12.10) with ESMTP id i8BKZLkk052697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 11 Sep 2004 13:35:22 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (localhost [127.0.0.1]) by rosebud.alerce.com (8.12.9p2/8.12.9) with ESMTP id i8BKa1wg007931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Sep 2004 13:36:02 -0700 (PDT) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.9p2/8.12.9/Submit) id i8BKa1ax007927; Sat, 11 Sep 2004 13:36:01 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16707.25008.865268.555842@rosebud.alerce.com> Date: Sat, 11 Sep 2004 13:36:00 -0700 To: Pawel Jakub Dawidek In-Reply-To: <20040911074556.GI30151@darkness.comp.waw.pl> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: George Hartzell cc: freebsd-geom@FreeBSD.org Subject: Re: Mounting root... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 20:35:26 -0000 Pawel Jakub Dawidek writes: > On Fri, Sep 10, 2004 at 09:44:48PM -0700, George Hartzell wrote: > +> > +> I've been playing with your patch for delaying mounting the root > +> partition, and I need some guidance on a reasonable number for the > +> delay value. > +> > +> I have two scsi disks, with identical MBR partition tables, and > +> identical disklabels in da0s1 and da1s1. I have a geom mirror set up > +> mirroring those two MBR-slices, and then have a bsd label on the > +> resulting "slice", and mount the standard a,d,e,f partitions. > +> > +> With the default value of the delay, when I shutdown cleanly, and > +> reboot, I get: > [...] > > If you don't have swap partition on the mirror everything should be fine. Sure enough, if I comment my swap partition out of /etc/fstab, reboot (which causes a rebuild because I was just using the swap), then reboot again (this time I've been running w/out swap), it comes right up w/out a rebuild. > PS. I'm CCing reply to freebsd-geom@, maybe others are also interested. I didn't realize there was a freebsd-geom, I've subscribed and grabbed the archives. It looks like you've been discussing the same problem with kris @ home.pl, and you mention that it's "fixed in current", but he still needs to remove his swap partition to get a clean restart, so I'm assuming you fixed a different problem here. paul at gromit.dlib.vt.edu mentions a similar problem on a NetBSD/RAIDframe system, and says that defining swapoff in /etc/rc.conf fixes it there. We do have a swapoff variable that's used in /etc/rc.d/swap1, I tried defining it swapoff="YES" in /etc/rc.conf, but I still had a rebuild. But, I never saw the message about "Removing block-type swap devices" that swap1_stop() should also produce, so I may be missing something. Actually, I'm definitely confused about the _stop() and _start() stuff. Setting swapoff="YES" doesn't seem to make the script remove any swap partitions. Editing /etc/rc.d/swap1 and changing stop_cmd from ':' to 'swapoff -a' let's me add and remove my swap by saying 'sh /etc/rc.d/swap1 start|stop', but even with that change, I still get a rebuild when I reboot. Is stopping swap not enough? Suggestions? g. From owner-freebsd-geom@FreeBSD.ORG Sat Sep 11 21:37:59 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 B600516A4CE; Sat, 11 Sep 2004 21:37:59 +0000 (GMT) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79B9443D46; Sat, 11 Sep 2004 21:37:59 +0000 (GMT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (authenticated bits=128) by kestrel.alerce.com (8.12.10/8.12.10) with ESMTP id i8BLbtkk053281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 11 Sep 2004 14:37:56 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (localhost [127.0.0.1]) by rosebud.alerce.com (8.12.9p2/8.12.9) with ESMTP id i8BLcZwg007967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Sep 2004 14:38:36 -0700 (PDT) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.9p2/8.12.9/Submit) id i8BLcZiv007964; Sat, 11 Sep 2004 14:38:35 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16707.28763.7201.383177@rosebud.alerce.com> Date: Sat, 11 Sep 2004 14:38:35 -0700 To: hartzell@kestrel.alerce.com In-Reply-To: <16707.25008.865268.555842@rosebud.alerce.com> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: Pawel Jakub Dawidek cc: freebsd-geom@FreeBSD.org Subject: Re: Mounting root... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 21:37:59 -0000 George Hartzell writes: > [...] > Suggestions? Sorry to follow up my own posting, but I have something that works. Two changes to /etc/rc.d/swap1 change stop_cmd from ':' to 'swap1_stop' and change the line in swap1_stop from swapctl -U -t blk to swapoff -a And 1 behavioural change. I reflexively use reboot to reboot the machine, and hadn't ever made the connection that it doesn't run any shutdown scripts. W/ the changes above, and using 'shutdown -r now' to reboot the machine, it comes up w/out synching the mirror. COOL! To be consistent, one should probably also change the start_cmd to swap1_start, and fix that function to use swapon -a since its usage of swapctl is also broken. Then, no_swap and swapoff need to be defaulted in /etc/defaults/rc.conf. Or, one could delete the swap1_{start,stop} functions, and just make start_cmd be 'swapon -a' and stop_cmd be 'swapoff -a'. I don't know which is more better, clearly there's some history here that's unfinished, or a cross-BSD compatibility thing, or??? Pawel, should I file some kind of bug here, or should you do something, or??? g. From owner-freebsd-geom@FreeBSD.ORG Sat Sep 11 22:13:28 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 384C116A4CE; Sat, 11 Sep 2004 22:13:28 +0000 (GMT) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DF0443D31; Sat, 11 Sep 2004 22:13:28 +0000 (GMT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (authenticated bits=128) by kestrel.alerce.com (8.12.10/8.12.10) with ESMTP id i8BMDOkk053670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 11 Sep 2004 15:13:25 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (localhost [127.0.0.1]) by rosebud.alerce.com (8.12.9p2/8.12.9) with ESMTP id i8BME5wg008004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Sep 2004 15:14:05 -0700 (PDT) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.9p2/8.12.9/Submit) id i8BME4K3007999; Sat, 11 Sep 2004 15:14:04 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16707.30892.683099.462355@rosebud.alerce.com> Date: Sat, 11 Sep 2004 15:14:04 -0700 To: Pawel Jakub Dawidek In-Reply-To: <20040911220839.GK30151@darkness.comp.waw.pl> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> <16707.28763.7201.383177@rosebud.alerce.com> <20040911220839.GK30151@darkness.comp.waw.pl> X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: George Hartzell cc: freebsd-geom@FreeBSD.org Subject: Re: Mounting root... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 22:13:28 -0000 Pawel Jakub Dawidek writes: > [...] > Speaking of rc.d/swap1. There is unused code from NetBSD and we don't > care about compatibility with their rcNG anymore, so it could be just > removed. Since you're already juggling this set of balls, may I leave it to you to make the right set of changes and submit/pr them? g. From owner-freebsd-geom@FreeBSD.ORG Sat Sep 11 23:53:47 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 7BCAD16A4CE; Sat, 11 Sep 2004 23:53:47 +0000 (GMT) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.49.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27C8243D2D; Sat, 11 Sep 2004 23:53:47 +0000 (GMT) (envelope-from paul@gromit.dlib.vt.edu) Received: from hawkwind.Chelsea-Ct.Org (pool-151-199-91-61.roa.east.verizon.net [151.199.91.61]) by gromit.dlib.vt.edu (8.13.1/8.13.1) with ESMTP id i8BNrhc9024096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 11 Sep 2004 19:53:45 -0400 (EDT) (envelope-from paul@gromit.dlib.vt.edu) Received: from [192.168.1.25] (zappa [192.168.1.25])i8BNrbNR015391; Sat, 11 Sep 2004 19:53:38 -0400 (EDT) From: Paul Mather To: hartzell@kestrel.alerce.com In-Reply-To: <16707.28763.7201.383177@rosebud.alerce.com> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> <16707.28763.7201.383177@rosebud.alerce.com> Content-Type: text/plain Message-Id: <1094946816.59283.75.camel@zappa.Chelsea-Ct.Org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sat, 11 Sep 2004 19:53:36 -0400 Content-Transfer-Encoding: 7bit cc: Pawel Jakub Dawidek cc: freebsd-geom@freebsd.org Subject: Re: Mounting root... 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, 11 Sep 2004 23:53:47 -0000 On Sat, 2004-09-11 at 17:38, George Hartzell wrote: > Sorry to follow up my own posting, but I have something that works. > > Two changes to /etc/rc.d/swap1 > > change stop_cmd from ':' to 'swap1_stop' > > and change the line in swap1_stop from > > swapctl -U -t blk > > to > > swapoff -a The /etc/rc.d/swap1 on FreeBSD-CURRENT is very close to that on my NetBSD-CURRENT box. Here are the diffs: --- freebsd_swap1 2004-09-11 19:19:18.000000000 -0400 +++ netbsd_swap1 2004-09-11 19:25:03.000000000 -0400 @@ -1,18 +1,17 @@ #!/bin/sh # # $NetBSD: swap1,v 1.8 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/swap1,v 1.6 2004/03/08 12:25:05 pjd Exp $ # # PROVIDE: localswap # REQUIRE: disks -# KEYWORD: FreeBSD nojail shutdown +# KEYWORD: shutdown . /etc/rc.subr name="swap1" -start_cmd='swapon -a' -stop_cmd=':' +start_cmd="swap1_start" +stop_cmd="swap1_stop" # Add all block-type swap devices; these might be necessary # during disk checks. So, although both have swap1_start and swap1_stop functions, under FreeBSD they're ignored. (I'm presuming when the script was imported from NetBSD it was left intact and the {start,stop}_cmd definitions amended to suit the FreeBSD case.) > To be consistent, one should probably also change the start_cmd to > swap1_start, and fix that function to use swapon -a since its usage of > swapctl is also broken. Then, no_swap and swapoff need to be > defaulted in /etc/defaults/rc.conf. > > Or, one could delete the swap1_{start,stop} functions, and just make > start_cmd be 'swapon -a' and stop_cmd be 'swapoff -a'. > > I don't know which is more better, clearly there's some history here > that's unfinished, or a cross-BSD compatibility thing, or??? Here's my proposed patch: --- netbsd_swap1 2004-09-11 19:25:03.000000000 -0400 +++ freebsd_swap1 2004-09-11 19:34:24.000000000 -0400 @@ -1,17 +1,18 @@ #!/bin/sh # # $NetBSD: swap1,v 1.8 2002/03/24 15:52:41 lukem Exp $ +# $FreeBSD: src/etc/rc.d/swap1,v 1.6 2004/03/08 12:25:05 pjd Exp $ # # PROVIDE: localswap # REQUIRE: disks -# KEYWORD: shutdown +# KEYWORD: FreeBSD nojail shutdown . /etc/rc.subr name="swap1" -start_cmd="swap1_start" -stop_cmd="swap1_stop" +start_cmd='swapon -a' +stop_cmd='swap1_stop' # Add all block-type swap devices; these might be necessary # during disk checks. @@ -29,7 +30,7 @@ { if checkyesno swapoff || [ -n "$rc_force" ]; then echo "Removing block-type swap devices" - swapctl -U -t blk + swapoff -a fi } This leaves the start_cmd the same, rather than using the swap1_start function, because swap1_start checks a "no_swap" setting that doesn't seem to be present on FreeBSD but is on NetBSD. (I don't know if a missing setting defaults to "NO," making this moot.) Changing stop_cmd to use the swap1_stop function makes turning off swap conditional on the "swapoff" setting, instead of unconditional, in the case of setting "stop_cmd='swapoff -a'". So, I think the above patch preserves the current behaviour, unless you set 'swapoff="YES"' in /etc/rc.conf, in which case all swap partitions will be unmounted during shutdown. Cheers, Paul. -- e-mail: paul@gromit.dlib.vt.edu "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." --- Frank Vincent Zappa