I made an oopsie- insofar as a filesystem with important data was overwritten as an LVM volume. I never actually wrote any data to the disk though, only hosed enough of the partition table to mark it as LVM. Is there any way to recover the contents of the disk?
Anything is better than nothing.
If you only overwrote the partition table, and remember the previous layout, you can just restore it. (Tip: always use
sfdisk -O
to save the partition table before doing anything possibly destructive.) As long as the start is the same and the end is at least as far as the filesystem extended, it will be fine.If you can't remember the previous layout, TestDisk can automatically find the locations of your partitions.
If you've managed to write over part of the filesystem, then it becomes a little more challenging and depends on what the filesystem was.