From nobody Sun Dec 19 16:50:11 2021 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 9BA2E190F844 for ; Sun, 19 Dec 2021 16:52:34 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.18.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JH80K5S9qz3mRt for ; Sun, 19 Dec 2021 16:52:33 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [217.246.54.215] (helo=fabiankeil.de) by smtprelay04.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1myzPW-00084I-Fi for freebsd-hackers@freebsd.org; Sun, 19 Dec 2021 17:51:46 +0100 Date: Sun, 19 Dec 2021 17:50:11 +0100 From: Fabian Keil To: FreeBSD hackers Subject: Patches for GPT and geli recovery Message-ID: <20211219175011.3023a232@fabiankeil.de> 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: multipart/signed; boundary="Sig_/N3ow18usOrcj9SyeyzSv.yO"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Df-Sender: Nzc1MDY3 X-Rspamd-Queue-Id: 4JH80K5S9qz3mRt X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-listen@fabiankeil.de has no SPF policy when checking 80.67.18.16) smtp.mailfrom=freebsd-listen@fabiankeil.de X-Spamd-Result: default: False [1.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[80.67.18.16:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(1.00)[0.999]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[fabiankeil.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.998]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[80.67.18.16:from]; SIGNED_PGP(-2.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:8972, ipnet:80.67.16.0/20, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[217.246.54.215:received] X-ThisMailContainsUnwantedMimeParts: N --Sig_/N3ow18usOrcj9SyeyzSv.yO Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Recently one of my disks "experienced a data corruption event of unknown origin". Additional details are available at: TLDR: I created two patches to recover nearly all the data. The first patch implements a "search" subcommand for geli to look for valid meta data (but unfortunately the meta data on my disk was corrupted or gone): The second patch lets the kernel ignore more issues if kern.geom.part.check_integrity is set to 0: I'm wondering if those patches should be upstreamed. The first patch is probably safe but for the second one I only tested the code paths that were relevant for my issue. BTW, I would also be interested to know if others have experienced similar data corruption and could figure out how it happened. Fabian --Sig_/N3ow18usOrcj9SyeyzSv.yO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTKUNd6H/m3+ByGULIFiohV/3dUnQUCYb9iwwAKCRAFiohV/3dU ndppAJ9ZKp5Rh9LBAgzhwBHmZi7+FPmtlgCfb0wmjgfImPhcPWoY95sR32yK9mc= =EPrJ -----END PGP SIGNATURE----- --Sig_/N3ow18usOrcj9SyeyzSv.yO--