Hi,
On 5/28/19 8:39 PM, Cesar Strauss wrote:
>
> After a BTRFS partition becoming read-only under use, it cannot be
> mounted anymore.
>
> The output is:
>
> # mount /dev/sdb5 /mnt/disk1
> mount: /mnt/disk1: wrong fs type, bad option, bad superblock on
> /dev/sdb5, missing codepage or helper program, or other error.
>
> Kernel output:
> [ 2042.106654] BTRFS info (device sdb5): disk space caching is enabled
> [ 2042.799537] BTRFS critical (device sdb5): corrupt leaf: root=2
> block=199940210688 slot=31, unexpected item end, have 268450090 expect 14634
bin(14634) ->
'0b11100100101010'
bin(268450090) ->
'0b10000000000000011100100101010'
So, what you're observing here is a bitflip. One of the zeros flipped
into a one, which caused the 14634 to suddenly become 268450090.
Since this is detected as corruption, and not detected using the btrfs
checksums, it means that the bitflip did not happen when the value was
stored on disk, but it happened in your memory chips inside the computer
before the information was written to disk.
> [ 2042.807879] BTRFS critical (device sdb5): corrupt leaf: root=2
> block=199940210688 slot=31, unexpected item end, have 268450090 expect 14634
> [ 2042.807947] BTRFS error (device sdb5): failed to read block groups: -5
> [ 2042.832362] BTRFS error (device sdb5): open_ctree failed
>
> [...]
>
> Before making any recovery attempts, or even restoring from backup, I
> would like to ask for the best option to proceed.
The best thing to do is to not use this phsyical computer for anything
else right now than running a proper program to analyze and check the
memory chips, in order to find out which one is causing the problems.
Hans