Date: Mon, 8 Jan 2007 23:08:42 -0300 From: "Fernan Aguero" <fernan.aguero@gmail.com> To: "Pawel Jakub Dawidek" <pjd@freebsd.org> Cc: geom@freebsd.org, "R. B. Riddick" <arne_woerner@yahoo.com> Subject: Re: clear metadata using dd? Message-ID: <520894aa0701081808k224709dbi3f36f0c1a703a70e@mail.gmail.com> In-Reply-To: <20070108235044.GB5165@garage.freebsd.pl> References: <520894aa0701081445i43d76098m418ce695d2133e53@mail.gmail.com> <20070108231751.78304.qmail@web30310.mail.mud.yahoo.com> <20070108235044.GB5165@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/8/07, Pawel Jakub Dawidek <pjd@freebsd.org> wrote: > On Mon, Jan 08, 2007 at 03:17:51PM -0800, R. B. Riddick wrote: > > --- Fernan Aguero <fernan.aguero@gmail.com> wrote: > > > I imagine I have to use something like > > > dd if=/dev/zero of=/dev/ad4s3? bs=512 count=1 > > > > > > but adding either skip=? or seek=? to taste. > > > > > > gama# fdisk -s /dev/ad4 > > > /dev/ad4: 310101 cyl 16 hd 63 sec > > > Part Start Size Type Flags > > > 1: 63 16771041 0xa5 0x00 > > > 2: 16771923 146795229 0xa5 0x80 > > > 3: 146795292 188742708 0xa5 0x00 > > > > > What about "dd if=/dev/zero of=/dev/ad4s3 oseek=188742707"? > > > > What does "gmirror status" say? > > I would remove the gmirror-s with "gmirror remove <device> <disk/slice>" (its > > easier than dd)... > > If there is a gmirror configured on adXs3, I'd suggest doing: No, there's no mirror in adXs3 now ... there *was* a mirror on that slice before ... but ... I didn't zero the whole disk before reorganizing the slices and partitions, I resized s2 and s3, thus erasing the metadata on the old s2 slice (gstripe), but of course, this didn't affect the last sector of the last slice ... which is still there :) > # gmirror stop <name of the mirror on adXs3> > # gmirror clear adXs3 I can't stop the gm0 mirror now, cause the root partition is mounted from it now. But although it doesn't have adXs3 listed as a consumer, I can why perhaps the fact that gmirror is loaded and running might be preventing operations that alter metadata (the old gmirror device was also named gm0 ... is this stored in the metadata and checked?) gama# gmirror status Name Status Components mirror/gm0 COMPLETE ad4s2 ad6s2 gama# gmirror clear ad4s3 Can't clear metadata on ad4s3: Operation not permitted. Not fully done. IIRC, I did gmirror remove gm0 ad4s3 before turning to reformat ad4 ... and according to gmirror(8): remove Remove the given component(s) from the mirror and clear meta-data on it. Now, what if I boot from ad6s2a (remove geom_gmirror_load="YES" from loader.conf, and change my fstab accordingly so that there's nothing 'active' or 'loaded') and try to clear ad4s3 again now? Fernan -- Fernan Aguero
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?520894aa0701081808k224709dbi3f36f0c1a703a70e>