You are not logged in.

#1 2022-10-14 07:14:37

Registered: 2022-10-14
Posts: 1

Corrupted BTRFS

Hey guys!

I'm facing with the very difficult situation after I tried to install Windows on my PC.
Well, I have some disks on my PC:
- disk #1 - with installed Arch with BTRFS with subvolumes
- disk #2 - with important data with BTRFS without subvolumes
- disk #3 - without any partitions

I'm tried to install Windows on disk #3 but installation was stuck after 1st reboot.

To check what's wrong, I booted Arch and Arch cannot boot since cannot automount disk #2
Then I booted from LiveCD and saw that my disk #2 had some strange partition: 105 MB was overridden by Windows and this 105 MB is FAT32 with EFI folder.

I tried to restore BTRFS using btrfs-progs but did not get success. As an example

mount /dev/sdc /mnt/disk_2tb 
mount: /mnt/disk_2tb: wrong fs type, bad option, bad superblock on /dev/sdc, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
➜  ~ dmesg| grep sdc

[ 4253.244072] BTRFS: device label Disk 2TB devid 1 transid 5113 /dev/sdc scanned by systemd-udevd (17293)
[ 4260.709988]  sdc: sdc1
[ 4438.692603]  sdc: sdc1
[ 4551.237692] BTRFS info (device sdc): using free space tree
[ 4551.237697] BTRFS info (device sdc): has skinny extents
[ 4551.238345] BTRFS error (device sdc): bad tree block start, want 27230208 have 5227060755056173072
[ 4551.238460] BTRFS error (device sdc): bad tree block start, want 27230208 have 0
[ 4551.238466] BTRFS error (device sdc): failed to read chunk root
[ 4551.239223] BTRFS error (device sdc): open_ctree failed

So, question is - is any way to restore (even partially) data from disk #2 with corrupted BTRFS?


#2 2022-10-17 01:27:24

From: Cymru
Registered: 2011-11-27
Posts: 7,127

Re: Corrupted BTRFS Not sure how current this is, though.

CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L


#3 2022-10-17 06:34:04

Registered: 2012-09-03
Posts: 38,737

Re: Corrupted BTRFS

disk #2 - with important data

That you hopefully have backups for?
Because windows has probably shredded the filesystem header…

Post the output of "lsblk -f" and reference the disk in there that you're concerned about.
But you hopefully have backups.


Board footer

Powered by FluxBB