View Full Version : deleted LVM!

9th December 2008, 10:18 PM
hi all,
this afternoon i accidentally deleted the partition (just one lvm) of my laptop.
I was using fdisk to prepare a usb key and for a BIG mistake I have deleted my fedora installation. I have realized that just after reboot... :(
I use fedora8 (i can't remember well but I think I have followed dvd standard installation)
Now i tried to boot from fedora 8 dvd and rescue cd but they give me "boot failed error" when trying to rescue my system.
With knoppix, fdisk -l return nothing, on knoppix desktop i can only see hda1 (boot partition) with grub and other few files (kernel and maps). In fact when trying to boot normally i can see grub screen and the choice of kernel, but then i have the "can't find lvm volume" error.
When trying to access hda with fdisk it tells me unable to open hda..

please help!!! what can i do? Is there some lvm rescue tool, i'm sure my data are still on the hd, i've "just":eek: deleted the partition table!!

10th December 2008, 01:19 AM
Hello andorreJR,

You're right. Deleting a partition with fdisk only removes its information from the partition table. The raw binary data is still sitting there on the disk platters provided nothing has been done to harm it in the meantime. That Knoppix LiveCD probably has the utility TestDisk (http://www.cgsecurity.org/wiki/TestDisk) on it. It can find and recover deleted (but still intact) partitions including LVM physical volumes. TestDisk is not a beautiful GUI app. It runs in a terminal window and is menu driven, but it can be exceedingly handy. It is also easy to learn on-the-fly. If it is not on your Knoppix LiveCD, it is available for download in many forms. I keep the DOS version handy on a bootable CD at all times.

10th December 2008, 01:38 PM
Thanks Stoat for your reply,
it seems you point me to the right direction :)
I'm trying testdisk right now and it recognized the lost LVM!.
now i'm trying to repair it and let you know.

Thanks again!

p.s. if someone else will try this with the current Knoppix release (5.1), there's a little bug in testdisk.
testdisk can't find libntfs.so.9 and quit with error. Searching into /usr/lib returns with a libntfs.so.10.0.0, just create symlink to this file (ln -s /usr/lib/libntfs.so.10.0.0 /usr/lib/libntfs.so.9) and let testdisk do its work :)