Recovering data from a BTRFS partition

Hey there.
I installed opensuse tumbleweed and while the install worked fine, it somehow created an lvm pv on two completely unrelated partitions. There was some important data on one of them (a gpg encrypted bzip2 backup of my home partition and its corresponding gpg secret key) that I really need to get back.
I ran photorec on that partition, it recovered basically all the videos but it seems like the gpg file is split up into hundreds of smaller files. I ran it again and told it to only recover the gpg, this time It concatenated all files that it found into one big file that far exceeds the size of the original.
If I look at the output of less -f /dev/sdc2 it looks like only the beginning is missing (lets hope the rest is intact). How would I fix this partition to restore at least the archive and its gpg key?
Thanks for the help.

@wendell ping

i hope you already did a dd of the partition to have an image, if not: do so!

There's a tool called testdisc, or testdisk, or something like it. It works by reading freed data on the physical harddrive, but be prepared for hours on in of data sorting.
Usually unless your hardware level destroyed your drive, it will work for alot of your data, usually allmost to much since you can at times recover partitions made years ago.
And it is covered by free and opensource loveliness.

I know about testdisk, it cant recover the partition, thats why I tried to just recover the files. Doesnt look like I will be able to recover the gpg secret key anyways. I grepped the disk for my email because thats in the secret key, I found parts of the key using this but not the whole thing.

Is it a SSD disc by chance?


ughhh it aint happening, trim has deleted that data ages ago.

actually its not lol. I was thinking about my main drive

Testdisc is cabale of recovering partitions, maybe try a backup of your current setup, with clonezilla then recover the partition if it is possible, and see if you can recover your files.
Hands up, recovering data of SSDs is not my specialty, since trim which just destroyes data which isn't needed.
but do you actually have your disc at hand and am just unable to boot of it? or has something gone wrong and your partition table gone broken?

Its not an ssd its a harddrive (i thought of my main os drive in the other post). The answer to the other question is in my original post. I installed opensuse tumbleweed (just to try it, I am a fedora user). I selected manual partitioning and selected my main os drive (an ssd, not the drive with the data) but after the install was complete I noticed that it created an additional lvm pv ontop of my backup drive (maybe a bug in the installer but probably human error).

EDIT: btw testdisk doesnt work, it cant recover the partition

mmmh sounds wierd, if it is a Mechanical drive then testdisc should be able to read old partitions, and files, since no filesystems actually "deletes" data, but rather just removes the inode so it is no longer searchable as a part of the filesystem.
Unless you have some really aggressive software which continuesly overwrites the sector which the data resides in, and/or it is a filesystem which isn't supported by testdisc, i really see no reason.
Even if you created an LVM pool on a mechanical harddrive it should be readable since the data is still there, just not searchable.
Today if you want to remove any trace of any data written on a harddrive, you usually run a format algorithm which fills all bits with 0's several times, usually like 8 times inorder to secure the data is gone, which is why it's wierd if even test disc can't see it.
unless.... you did not add some sort of encryption to the lvm pool right?

testdisk can the see partition, it just tells me that it cant recover it. I didnt create the lvm on the disk, the tumbleweed installer did. I recovered basically all the videos files from the drive with testdisk anyways, just not the gpg key or the gpg encrypted bzip archive that I actually care about. maybe try this, got no idea though, it really sounds like a pickle you got yourself into. It may be you're just unluky and the Data is lost, my worst case ever with data recovery was my ex gf, who had Adhd and a netbook(Who are slooooow). Which appearently is a bad cocktail and cost me 100+ hours of data recovery work since all her pictures were on the disc. But testdisc read that one right off the bat.

foremost does not support gpg encrypted files. I appreciate the help anyways.

anytime. Its what we do :)