From owner-freebsd-geom@FreeBSD.ORG Tue Jul 15 21:01:52 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 AF910106566B; Tue, 15 Jul 2008 21:01:52 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 21BA68FC15; Tue, 15 Jul 2008 21:01:50 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <487D1041.70702@FreeBSD.org> Date: Tue, 15 Jul 2008 23:01:53 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Kris Kennaway References: <4879532F.7000603@FreeBSD.org> In-Reply-To: <4879532F.7000603@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 15 Jul 2008 21:01:52 -0000 Kris Kennaway wrote: > I tried to create a stripe on two disks, after writing a new label to > overwrite the previous one (all filesystems and swap had been > unconfigured). No slices were in use on the disk and I did > > gstripe label -v -s 131072 data /dev/da0d /dev/da1d > > newfs worked fine, etc. Rebooted, and geom decided my da0 needed to > sprout a da0s1, and that the gstripe should attach there (actually the > da0? devices were completely gone). The filesystem was corrupt because > the offsets were now all wrong on one of the disks. > > Rebooting into single-user mode the devices were sort of back: > > # 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 > > "da0cs1"? Uh ok. > > # 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, > don't edit > d: 110084544 33554448 4.2BSD 0 0 0 > > ...still looks fine > > # 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=2560258567). > 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=476052638). > 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. > > Why all this craziness? > > Now I can mount the filesystem again, but still: > > # 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 > > What's going on here? > > Kris > More wackiness: > # gstripe destroy disk > GEOM_STRIPE: Disk da0d removed from disk. > GEOM_STRIPE: Device disk removed. > GEOM_STRIPE: Disk da1d removed from disk. > GEOM_STRIPE: Device disk destroyed. > # gstripe clear da0 > Can't clear metadata on da0: Operation not permitted. > gstripe: Not fully done. > # swapoff /dev/da0b > # gstripe clear da0 > GEOM_STRIPE: Device disk created (id=4082191315). > GEOM_STRIPE: Disk da0d attached to disk. > Can't clear metadata on da0: Invalid argument. > gstripe: Not fully done. (whee my stripe is back) > # dd if=/dev/zero of=/dev/da0 bs=1m count=16 > GEOM_STRIPE: Disk da0d removed from disk. > GEOM_STRIPE: Device disk removed. > 16+0 records in > 16+0 records out > 16777216 bytes transferred in 1.307623 secs (12830317 bytes/sec) Kris