Yesterday I was trying to shrink my Gentoo Linux partition with LUKS encryption to make place for another distribution, but because it was an LVM partition I was just trying random commands from the internet not knowing what they did which was fairly stupid. I have 3 Logical volumes, /dev/mapper/vg0-root, /dev/mapper/vg0-var and /dev/mapper/vg0-home.

I ended up accidentally running mke2fs on my /dev/mapper/vg0-home partition, and afterwards I found out that this formatted my partition to an ext2 partition and that I lost all my data.

Testdisk didn't find anything because I don't think it can recover files on logical volumes and vgcfgrestore didn't result in any luck either.


You are largely out of luck. Photorec can help you recover some fragments of your disk (mainly images and documents in known formats), but not filenames, directory structure or files where they span fragments.

Photorec is part of the testdisk suite. Testdisk itself does not look for documents, it looks for partitions, which is why it didn't find any files.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.