From owner-freebsd-geom@FreeBSD.ORG Tue Jan 9 02:08:43 2007 Return-Path: X-Original-To: geom@freebsd.org Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37FBE16A403 for ; Tue, 9 Jan 2007 02:08:43 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by mx1.freebsd.org (Postfix) with ESMTP id EBE3D13C458 for ; Tue, 9 Jan 2007 02:08:42 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so4155737pyh for ; Mon, 08 Jan 2007 18:08:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P5fk9gApXde0hmVFvFelWmgL6k+BgKzn3b8Oi9Icaf4JuhogkmfwVYC9xM1L7F4cBbvUK8UhXYBT3aLllgSu4jYkL5PBsuRnKrRbgJ6TaAt9AnttZXrCs0TCJ/WveIGJovL/oxrUIDA/xTfKYqbG0IiZgao365UAivd1SKDK9X8= Received: by 10.35.75.1 with SMTP id c1mr50028263pyl.1168308522188; Mon, 08 Jan 2007 18:08:42 -0800 (PST) Received: by 10.35.16.1 with HTTP; Mon, 8 Jan 2007 18:08:42 -0800 (PST) Message-ID: <520894aa0701081808k224709dbi3f36f0c1a703a70e@mail.gmail.com> Date: Mon, 8 Jan 2007 23:08:42 -0300 From: "Fernan Aguero" To: "Pawel Jakub Dawidek" In-Reply-To: <20070108235044.GB5165@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <520894aa0701081445i43d76098m418ce695d2133e53@mail.gmail.com> <20070108231751.78304.qmail@web30310.mail.mud.yahoo.com> <20070108235044.GB5165@garage.freebsd.pl> Cc: geom@freebsd.org, "R. B. Riddick" Subject: Re: clear metadata using dd? 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, 09 Jan 2007 02:08:43 -0000 On 1/8/07, Pawel Jakub Dawidek wrote: > On Mon, Jan 08, 2007 at 03:17:51PM -0800, R. B. Riddick wrote: > > --- Fernan Aguero 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 " (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 > # 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