Date: Tue, 16 Jul 2013 15:10:37 -0700 From: aurfalien <aurfalien@gmail.com> To: Warren Block <wblock@wonkity.com> Cc: Michael Sierchio <kudzu@tenebras.com>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: gpart: table 'da0' is corrupt; operation not permitted Message-ID: <706BDFA7-0C04-4C16-96A7-61C145997554@gmail.com> In-Reply-To: <alpine.BSF.2.00.1307161558270.82814@wonkity.com> References: <AE78EABA-CB23-4B04-BE55-37627B8C6A83@gmail.com> <CAHu1Y70gF4T=4F3wUy9Q5wT2EmJ5sOfwsedkrsFEoLUZfq6e%2BA@mail.gmail.com> <CB03CFAC-6F82-46B0-B456-E81E45A4F4AB@gmail.com> <alpine.BSF.2.00.1307161558270.82814@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 16, 2013, at 3:01 PM, Warren Block wrote: > On Tue, 16 Jul 2013, aurfalien wrote: >=20 >>=20 >> On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote: >>=20 >>> On Tue, Jul 16, 2013 at 1:44 PM, aurfalien <aurfalien@gmail.com> = 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} >>=20 >> This is what I ended up doing. >>=20 >> I unplugged it, waited a few, re plugged and then I was able to = delete/destroy. >>=20 >> I will keep your method on hand though as I prefer not doing a hot = plug. >=20 > Hot plug? That just wipes the beginning and end of the disk. I would = erase 1M just to be sure. >=20 > The more elegant version is >=20 > gpart destroy -F da0 Oh for sure, I did that after the hotplug which finally allowed me to f = do it. I had to hot plug a few times though. > If it gives an error when doing that, disabling the safety may be = necessary: sysctl kern.geom.debugflags=3D16 > Do that only when necessary. It usually is not. Funny, I did that based on some googling but no dice. I booted in both regular shel and Live CD. - aurf=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?706BDFA7-0C04-4C16-96A7-61C145997554>