From owner-freebsd-geom@FreeBSD.ORG Fri Jul 18 09:50:21 2008 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 434A41065676 for ; Fri, 18 Jul 2008 09:50:21 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045140.chello.pl [87.206.45.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB2A8FC1D for ; Fri, 18 Jul 2008 09:50:20 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id AE4FE45C99; Mon, 14 Jul 2008 08:41:25 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9C9C7456AB; Mon, 14 Jul 2008 08:41:19 +0200 (CEST) Date: Mon, 14 Jul 2008 08:41:20 +0200 From: Pawel Jakub Dawidek To: Kris Kennaway Message-ID: <20080714064120.GA13560@garage.freebsd.pl> References: <4879532F.7000603@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <4879532F.7000603@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-geom@FreeBSD.org Subject: Re: GEOM_STRIPE device wackiness X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2008 09:50:21 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 13, 2008 at 02:58:23AM +0200, Kris Kennaway wrote: > I tried to create a stripe on two disks, after writing a new label to=20 > overwrite the previous one (all filesystems and swap had been=20 > unconfigured). No slices were in use on the disk and I did >=20 > gstripe label -v -s 131072 data /dev/da0d /dev/da1d >=20 > newfs worked fine, etc. Rebooted, and geom decided my da0 needed to=20 > sprout a da0s1, and that the gstripe should attach there (actually the=20 > da0? devices were completely gone). The filesystem was corrupt because= =20 > the offsets were now all wrong on one of the disks. >=20 > Rebooting into single-user mode the devices were sort of back: >=20 > # ls -l /dev/da0* > crw-r----- 1 root operator 0, 74 Jul 13 00:48 /dev/da0 > crw-r----- 1 root operator 0, 76 Jul 13 00:48 /dev/da0b > crw-r----- 1 root operator 0, 77 Jul 13 00:48 /dev/da0c > crw-r----- 1 root operator 0, 83 Jul 13 00:48 /dev/da0cs1 > crw-r----- 1 root operator 0, 87 Jul 13 00:48 /dev/da0cs1b > crw-r----- 1 root operator 0, 88 Jul 13 00:48 /dev/da0cs1c > crw-r----- 1 root operator 0, 89 Jul 13 00:48 /dev/da0cs1d > crw-r----- 1 root operator 0, 78 Jul 13 00:48 /dev/da0d > crw-r----- 1 root operator 0, 79 Jul 13 00:48 /dev/da0s1 > crw-r----- 1 root operator 0, 84 Jul 13 00:48 /dev/da0s1b > crw-r----- 1 root operator 0, 85 Jul 13 00:48 /dev/da0s1c > crw-r----- 1 root operator 0, 86 Jul 13 00:48 /dev/da0s1d >=20 > "da0cs1"? Uh ok. >=20 > # bsdlabel -r /dev/da0 > # /dev/da0: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > b: 33554432 16 swap > c: 143638992 0 unused 0 0 # "raw" part,=20 > don't edit > d: 110084544 33554448 4.2BSD 0 0 0 >=20 > ...still looks fine >=20 > # gstripe destroy data > GEOM_STRIPE: Disk da0d removed from data. > GEOM_STRIPE: Device data destroyed. > # gstripe label -v -s 131072 -h data /dev/da0d /dev/da1d > GEOM_STRIPE: Device data created (id=3D2560258567). > GEOM_STRIPE: Disk da0s1d attached to data. > GEOM_STRIPE: Disk da0s1d removed from data. > GEOM_STRIPE: Device data destroyed. > GEOM_STRIPE: Device data created (id=3D476052638). > GEOM_STRIPE: Disk da0d attached to data. > GEOM_STRIPE: Device data already configured. > GEOM_STRIPE: Cannot create device data. > Metadata value stored on da0d. > GEOM_STRIPE: Disk da1d attached to data. > GEOM_STRIPE: Device data activated. > Metadata value stored on da1d. > Done. >=20 > Why all this craziness? >=20 > Now I can mount the filesystem again, but still: >=20 > # ls -l /dev/da0* > crw-r----- 1 root operator 0, 74 Jul 13 00:48 /dev/da0 > crw-r----- 1 root operator 0, 76 Jul 13 00:48 /dev/da0b > crw-r----- 1 root operator 0, 77 Jul 13 00:48 /dev/da0c > crw-r----- 1 root operator 0, 83 Jul 13 00:48 /dev/da0cs1 > crw-r----- 1 root operator 0, 87 Jul 13 00:48 /dev/da0cs1b > crw-r----- 1 root operator 0, 88 Jul 13 00:48 /dev/da0cs1c > crw-r----- 1 root operator 0, 89 Jul 13 00:48 /dev/da0cs1d > crw-r----- 1 root operator 0, 78 Jul 13 00:49 /dev/da0d >=20 > What's going on here? Most likely trash BSD label metadata. Try doing: # dd if=3D/dev/zero of=3D/dev/da0 count=3D79 first and then bsdlabel and gstripe it again. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFIevUQForvXbEpPzQRAoV0AJ0V/sTvGKKjFCR0froov03LQZvaUACgsUnq KPJh2KY/Zon6+amKJ/O+n2Q= =P4bP -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--