From owner-freebsd-questions@FreeBSD.ORG Tue Jul 16 20:57:10 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3C06C493 for ; Tue, 16 Jul 2013 20:57:10 +0000 (UTC) (envelope-from aurfalien@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 17B82131 for ; Tue, 16 Jul 2013 20:57:10 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id kl14so1185735pab.6 for ; Tue, 16 Jul 2013 13:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=ln6fegHYE/AwkgPYChrZLpLkFORt4Pb3tzlA5O00FKY=; b=NJOAQ9mNNQgE+WMko/tbdsUPaqdQlpT9IHPBqjmwYtmefRDWtNZzop3/J3M8hXfWGw 36Qc1hBRVmTT69vIKq+AJ6xYPsis1BzkUKSUjO6tDRVeOIIaqbFKWlwt3vUqgM1C8W+L UNZRIEZ5Za35xLgZf75fzlqdhOYjPXU/xHpjsMCeplvBLxwTEeqv9wgLFhvH94gre4Up NpRTDFhhGg/zUEDCflVv3d2BEYxhxwdzLWrpsUCqzyG+Z8mPNzymTxr+O7Jon7aLzYQx Rvq4olAObsm6YO4c8QIXF7zFNFSS8a9ki+q2mX29bqzJ1Jb25HuFv8u/3CifpqReTimI QsRA== X-Received: by 10.66.121.170 with SMTP id ll10mr4352745pab.126.1374008229898; Tue, 16 Jul 2013 13:57:09 -0700 (PDT) Received: from briankrusicw.logan.tv ([64.17.255.138]) by mx.google.com with ESMTPSA id qb15sm6158375pab.13.2013.07.16.13.57.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Jul 2013 13:57:08 -0700 (PDT) Subject: Re: gpart: table 'da0' is corrupt; operation not permitted Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: aurfalien In-Reply-To: Date: Tue, 16 Jul 2013 13:57:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Michael Sierchio X-Mailer: Apple Mail (2.1085) Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2013 20:57:10 -0000 On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote: > On Tue, Jul 16, 2013 at 1:44 PM, aurfalien = wrote: >=20 >> Upon doing; >>=20 >> gpart destroy da0 >>=20 >> I get; >>=20 >> gpart: Device busy >=20 > crude but effective: >=20 >=20 > DISK=3Dda0 >=20 > offset=3D`diskinfo $DISK | awk '{ print $4 - 131072 }'` > dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k count=3D1 > dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k seek=3D$offset >=20 > gpart create -s gpt ${DISK} This is what I ended up doing. I unplugged it, waited a few, re plugged and then I was able to = delete/destroy. I will keep your method on hand though as I prefer not doing a hot plug. - aurf=