Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Feb 2021 16:52:16 +0100
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        freebsd-fs@freebsd.org
Subject:   Re: Reading a corrupted file on ZFS
Message-ID:  <20210212165216.2f613482@fabiankeil.de>
In-Reply-To: <899c6b4f-2368-7ec2-4dfe-fa09fab35447@artem.ru>
References:  <da892eeb-233f-551f-2faa-62f42c3c1d5b@artem.ru> <0ca45adf-8f60-a4c3-6264-6122444a3ffd@denninger.net> <899c6b4f-2368-7ec2-4dfe-fa09fab35447@artem.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/WF4+NeBpfYbcLLlvN=cPbGm
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Artem Kuchin <artem@artem.ru> wrote on 2021-02-12:

> 12.02.2021 18:06, Karl Denninger =D0=BF=D0=B8=D1=88=D0=B5=D1=82:

> > Blocking the read forces you to get the good copy off backup media and=
=20
> > thus prevents that from happening.
> >
>=20
> I know what ZFS does and i damaged the same file in the same place on=20
> purpose. Question is: how to read what's left of it. Just for kicks, i=20
> don't have a backup, and i need to read what's left. It could be 1GB=20
> file with only one byte damaged and it is of crazy importance to me. So,=
=20
> how to bypass all the checks and make it read the file no matter what?

The patch from this PR adds a sysctl that allows to send corrupted data:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221909

Using the added sysctl you can send and receive the dataset and then
read the corrupted file from the received dataset. Note that ZFS replaces
corrupted blocks completely with the 0x'zfs badd bloc' pattern instead
of returning the corrupted data as is, thus increasing the amount of
corruption in case of simple bit flips to whole blocks.

Fabian

--Sig_/WF4+NeBpfYbcLLlvN=cPbGm
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQTKUNd6H/m3+ByGULIFiohV/3dUnQUCYCakMQAKCRAFiohV/3dU
nbgHAKCNE42Eg9A9NaTaxXcOHXoN6ovMUwCdFVizioAAGCAH3TBWr8Wwy5BjzCw=
=vdJC
-----END PGP SIGNATURE-----

--Sig_/WF4+NeBpfYbcLLlvN=cPbGm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210212165216.2f613482>