btrfs recovery

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
lplazav
Posts: 1
Joined: 11 Mar 2022, 09:04

btrfs recovery

#1 Post by lplazav »

Hello community,

I had a problem with my external drive 2TB with GPT from which I uses to boot using fedora workstation 35.

One, and the last to the end of the disk, btrfs partition of that external drive without volumes named "backup" was for archive old files.

The external drive started to fail ( hw fail in some sectors ) and the corrupted sectors affected the btrfs "backup". It was impossible for me to mount ro the partition but gparted showed % of data used, the data was still there.
I ruin it with a last step mistake, doing a mkfs.btrfs format of that partition...and that was my last step...yes, I could mount it now and obviously there is no shown filesystem structure.

NEXT:
I do not boot nor use any more the external drive to do not do any i/o operations on that partition, I boot from the internal drive ( another fedora 35 workstation) and to try the recovery, always without mounting the sdb5 ( "backup" btrfs partition of the external drive )

I have made a img file of that partition with ddrescue saving it to another 2TB external drive.

I am using photoreq to restore files using the second 2TB external drive and using photoreq to find files from the backup raw image of the partition to another folder, but without a tree of folders and random names.

I would like to know if you know if there is a way in btrfs to rocover from the btrfs partition or GPT or another way that could help me try to rescue the tree of folders and files.

Many thanks in advance,
Luis

recuperation
Posts: 2760
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: btrfs recovery

#2 Post by recuperation »

Testdisk can find lost BTRFS partitions but cannot read out the internals of a BTRFS partition.

Please come back and describe your experience if you manage to find and use any recovery software for your broken BTRFS partition other than the built-in repair features of BTRFS.

Locked