-   Linux - Software (
-   -   LVM partition lost after power outage (

Dagwyn 10-27-2008 05:51 PM

LVM partition lost after power outage
Hi folks.

Once upon a time I had created an encrypted lvm partition on my /dev/sdb disk following the guide at using one primary partition using the whole disk.
Everything was running smoothly until just an hour ago when the power disappeared for a while.
After reboot system can't find ANY partition info on sdb.

Also, after viewing some other threads here I looked in /etc/lvm/archive but didn't find any referene to my lost partition.

Question: is all lost?

JZL240I-U 10-28-2008 07:52 AM


Originally Posted by Dagwyn (Post 3323508)
Question: is all lost?

Good question ;).

No, seriously, it depends from what happened during power going down. From what you describe something has overwritten the MBR / partition table.

I'd suggest the following:

dd if=/dev/sdb of=/some/place/on/a/different/disk/sdb.mbr count=1 bs=512
That will preserve the original MBR of /dev/sdb.

Then call "fdisk /dev/sdb" and create a partition of the type "linux LVM" on the whole disk (fdisk will propose the appropriate cylinder numbers). Write the new partition table and cross your fingers during reboot.

The validity of the data on the disk will depend from how far the process of overwriting things had run during that crash.

Need I stress the point that you best clone the entire drive if it contains valuable data before you start experimenting? Good luck...

Dagwyn 10-28-2008 04:32 PM

Worked like a charm.
You're my hero :D

JZL240I-U 10-30-2008 06:09 AM

Glad to hear it. And thanks for coming back and telling us the result :).

All times are GMT -5. The time now is 02:59 PM.