how to recover unmountable partition (crash while resizing)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

due to a crash while resizing my / btrfs partition with gparted, my HD was left in a unmountable state.

This is on me: resizing a partition moving it to the right via gparted is a risky operation per se.

I am confident that all my data is still in the HD, and with proper guidance from the tools it will be possible to mount back the fs. The UI of the tools is a bit hard for me to understand.


```
# mount -t btrfs /dev/sda7 /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda7, missing codepage or helper program, or other error.

dmesg output:
[ 3417.869264] BTRFS info (device sda7): disk space caching is enabled
[ 3417.869268] BTRFS info (device sda7): has skinny extents
[ 3417.882863] BTRFS error (device sda7): bad tree block start, want 83301548032 have 83284770816
[ 3417.882873] BTRFS error (device sda7): failed to read block groups: -5
[ 3417.953867] BTRFS error (device sda7): open_ctree failed
```

Find root maybe complains and maybe not:
```
# btrfs-find-root /dev/sda7 
Superblock thinks the generation is 107621
Superblock thinks the level is 1
Found tree root at 25657344 gen 107621 level 1
Well block 22315008(gen: 107620 level: 1) seems good, but generation/level doesn't match, want gen: 107621 level: 1
```

What is the most reasonable next step?

Many thanks!
Antonio


===============

This is the current sw versions on my LiveUSB.
I could upgrade to ubuntu it 20.04 (kernel 5.4), and I am comfortable in recompiling btrfs-progs if needed.

# uname -a
Linux kubuntu 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

# btrfs --version
btrfs-progs v5.2.1



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux