Date: Mon, 14 Jul 2008 08:41:20 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Kris Kennaway <kris@FreeBSD.org> Cc: freebsd-geom@FreeBSD.org Subject: Re: GEOM_STRIPE device wackiness Message-ID: <20080714064120.GA13560@garage.freebsd.pl> In-Reply-To: <4879532F.7000603@FreeBSD.org> References: <4879532F.7000603@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080714064120.GA13560>