4

I have a machine with 180 or so logical volumes as well as an OS partition that were wiped out with a format when reinstalling centOS6. I made a terrible mistake, not being familiar with the interface to not notice that it was formatting the entire disk rather then taking me to the partition manager that I've been used to since the redhat days. I cancelled the formatting with a control alt delete as soon as I noticed the issue but my VolGroup00 is gone from view and in it's place is a new volgroup that the installer created.

Is there anything I can do to recover that data?

user165520
  • 71
  • 2

2 Answers2

1

Testdisk may or may not be able to recover the partition table / LVM metadata. Make backup copy bit for bit using dd before attempting anythine.

If all else fails, recover the file data using foremost, photorec, scalpel, etc.

Install a new disk to make backup, where sdX is your data disk and sdY is the disk to use for the backup.

dd if=/dev/sdX of=/dev/sdY

Now use another disk to recover the file data, ie:

dd if=/dev/sdX | foremost -t all -T -o /path/on/different/disk/for/recovery
egthomas
  • 31
  • 6
0

Probably too late to help in this case... See my answer to this question on Unix & Linux:

unix.stackexchange.com/questions/73924/reading-encrypted-partition-with-broken-lvm2-inside

Hauke Laging
  • 5,157
  • 2
  • 23
  • 40