Date: Fri, 12 Feb 2021 18:41:57 +0300 From: Artem Kuchin <artem@artem.ru> To: freebsd-fs@freebsd.org Subject: Re: Reading a corrupted file on ZFS Message-ID: <899c6b4f-2368-7ec2-4dfe-fa09fab35447@artem.ru> In-Reply-To: <0ca45adf-8f60-a4c3-6264-6122444a3ffd@denninger.net> References: <da892eeb-233f-551f-2faa-62f42c3c1d5b@artem.ru> <0ca45adf-8f60-a4c3-6264-6122444a3ffd@denninger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
12.02.2021 18:06, Karl Denninger пишет: > On 2/12/2021 09:53, Artem Kuchin wrote: >> >> Now i am stuck in worst situation that with UFS - i cannot read >> what's left of this file. >> >> I deleted the file and the scrubbed - error went away. But i lost the >> file. >> >> So, the question is how to read the file with an error ? I googled >> for 2 hours and still did not find a solution. >> >> >> >> > With what you did both copies are damaged and non-repairable. > > Neither block on the two mirror copies has a correct checksum > therefore neither copy is good; both were damaged "at the same time". > The system knows the file is corrupt and thus the contents are not > usable, but it has no way to fix it because both copies are damaged > with no means of correction. > > The correct answer to what to do is IMHO what ZFS does. The only > solution in such a case is to restore from a backup. > > You *definitely* do not want the system to silently let you proceed in > such an instance because now you will *propagate* the damaged file > without knowing it was damaged, which will then wind up in your backup > copies. Over time even with a robust backup scheme this will > eventually lead to you losing all "good" copies of the file since the > backup media will be rotated and ultimately the data will be > permanently lost with no means of recovery. > > Blocking the read forces you to get the good copy off backup media and > thus prevents that from happening. > I know what ZFS does and i damaged the same file in the same place on purpose. Question is: how to read what's left of it. Just for kicks, i don't have a backup, and i need to read what's left. It could be 1GB file with only one byte damaged and it is of crazy importance to me. So, how to bypass all the checks and make it read the file no matter what? Artem
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?899c6b4f-2368-7ec2-4dfe-fa09fab35447>