gpart: table 'da0' is corrupt; operation not permitted
aurfalien
aurfalien at gmail.com
Tue Jul 16 20:57:10 UTC 2013
On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote:
> On Tue, Jul 16, 2013 at 1:44 PM, aurfalien <aurfalien at gmail.com> wrote:
>
>> Upon doing;
>>
>> gpart destroy da0
>>
>> I get;
>>
>> gpart: Device busy
>
> crude but effective:
>
>
> DISK=da0
>
> offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'`
> dd if=/dev/zero of=/dev/$DISK bs=64k count=1
> dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset
>
> 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
More information about the freebsd-questions
mailing list