From nobody Tue Apr 11 13:32:47 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PwmxN33Nwz44sd4 for ; Tue, 11 Apr 2023 13:32:56 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PwmxM4G9Cz4HGD; Tue, 11 Apr 2023 13:32:55 +0000 (UTC) (envelope-from marck@rinet.ru) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id 33BDWlDB008481; Tue, 11 Apr 2023 16:32:47 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 11 Apr 2023 16:32:47 +0300 (MSK) From: Dmitry Morozovsky To: Graham Perrin cc: freebsd-hackers@FreeBSD.org Subject: Re: gpart destroy, in depth In-Reply-To: <64e88636-1e03-7ff5-7d3f-e8a36117cdbe@freebsd.org> Message-ID: References: <64e88636-1e03-7ff5-7d3f-e8a36117cdbe@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-ID: 6B691B03 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Tue, 11 Apr 2023 16:32:47 +0300 (MSK) X-Rspamd-Queue-Id: 4PwmxM4G9Cz4HGD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8331, ipnet:195.54.192.0/19, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, 11 Apr 2023, Graham Perrin wrote: > Please: what, exactly, occurs when a partition table is destroyed by gpart(8)? > > Background: a customer was 100% certain that no data was required from a hard > disk in an iMac that will be disposed of. I booted from a USB drive with > FreeBSD 14.0-CURRENT, then lazily ran gpart destroy for the internal disk > (probably ada0). A few hours later, the customer realised that the disk > probably held a few years' worth of important emails. > > I don't intend to attempt recovery, or recreation of the partition table, but > I'd like to provide enough technical information for a third party to advise > the customer whether doing so will be economically viable. > > (I see files such as lib/geom/part/geom_part.c and sys/geom/part/g_part.c, but > I have no idea how to interpret them.) > > Thanks > > > > I suppose sysutils/testdisk will be useful for recovering, as most of actual file systems are left intact -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] --------------------------------------------------------------------------- *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- woozle@woozle.net *** ---------------------------------------------------------------------------