Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2008 23:01:53 +0200
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Kris Kennaway <kris@FreeBSD.org>
Cc:        freebsd-geom@FreeBSD.org
Subject:   Re: GEOM_STRIPE device wackiness
Message-ID:  <487D1041.70702@FreeBSD.org>
In-Reply-To: <4879532F.7000603@FreeBSD.org>
References:  <4879532F.7000603@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?487D1041.70702>