0

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.

1
  • "just trying random commands from the internet not knowing what they did which was fairly stupid": That is correct. Occasionally you can even find articles that deliberately provide disastrous instructions.
    – U. Windl
    Apr 28, 2021 at 9:43

1 Answer 1

0

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .