On 2020/5/11 下午9:11, Jason Clara wrote: > I woke up this morning and my system had crashed and my root filesystem was readonly. > > Reboot failed when mounting the root filesystem, and now my system will not boot. > > I had a USB I setup for recovery and booted into that and to help with recovery but I am currently stuck. > > Some background into. > Root file system is RAID 1 with two 1TB drives (Both M.2 one is NVME and one is SATA) > Original system is Ubuntu 18.04 with kernel 5.5.7 and btrfs-progs I think was version 5.6 > I think last scrub on the pool was maybe 1-2 months ago. But sure exact timing. > > My recovery environment is ubuntu 20.04 with kernel 5.6.7 and btrfs-progs 5.6 and that is what I am running under at the moment > > When I try to mount the filesystem I get the following error. > boot@boot-live-usb:~$ sudo mount /dev/sdm2 /media/root/ > [sudo] password for boot: > mount: /media/root: wrong fs type, bad option, bad superblock on /dev/sdm2, missing codepage or helper program, or other error. > > With dmesg showing > [Mon May 11 08:56:47 2020] BTRFS info (device nvme0n1p2): disk space caching is enabled > [Mon May 11 08:56:47 2020] BTRFS info (device nvme0n1p2): has skinny extents > [Mon May 11 08:56:47 2020] BTRFS error (device nvme0n1p2): bad tree block start, want 2728265449472 have 5440864628575810330 > [Mon May 11 08:56:47 2020] BTRFS error (device nvme0n1p2): bad tree block start, want 2728265449472 have 0 This means both copy is corrupted. Furthermore, the second copy looks like being completely trimmed. Are you using discard mount option? > [Mon May 11 08:56:47 2020] BTRFS error (device nvme0n1p2): failed to read block groups: -5 Again, extent tree corruption. Normally we'd recommend to do restore (already done), or go skipbg mount option (out of tree, need to compile kernel). But considering the data loss is from wiped tree blocks, I believe it won't be the only corruption. > [Mon May 11 08:56:47 2020] BTRFS error (device nvme0n1p2): open_ctree failed > > > Trying a readonly check on the filesystem gave me the following error > boot@boot-live-usb:~$ sudo btrfs check --readonly /dev/sdm2 > Opening filesystem to check... > checksum verify failed on 2728265449472 found 0000008B wanted 00000017 > checksum verify failed on 2728265449472 found 000000B6 wanted 00000000 > checksum verify failed on 2728265449472 found 0000008B wanted 00000017 > bad tree block 2728265449472, bytenr mismatch, want=2728265449472, have=5440864628575810330 > ERROR: failed to read block groups: Input/output error > ERROR: cannot open file system > > I tried a restore (with -io options) to at least get as much data as I could off just to be safe and it finished but there was a number of checksum errors, bad tree block error and loop errors. So not sure how good the backup will be. > > Any help would be appreciated. I have backups so I could format and setup the system again, but would rather not if I don’t have too. > Another very dangerous try is, btrfs check --init-extent-tree. But it won't end up well due to the data loss. Thanks, Qu
Attachment:
signature.asc
Description: OpenPGP digital signature
