Recover partition table for Linux LVM2

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read
Posts: 6
Joined: 31 May 2012, 21:43

Re: Recover partition table for Linux LVM2

#11 Post by kiper »

Thank you so much, Remy. I understand better the LVM.

Mi time is over. I reinstalled Ubuntu Server, lost my data, and reconfigured all again. I wrote every step so I know exactly how to get the old configuration.

I would love to know how to solve this "issue", because it could happen again, but I'm on the deadline and this time is better to rebuild...

I reboot with Alt + Print Scr and R + E + I + S + U + B because e2fsck didn't work in normal reboot. Then I did run e2fsck -f -b 32768 /dev/mapper/grupoprincipal-volumenlogicohome and the output was:

/dev/sda1: recovering journal
e2fsck: unable to set superblock flags on /dev/mapper/grupoprincipal-volumenlogicohome

It's a shame :cry:

Remy, thank you for your time and your wise words :)

See you soon.

User avatar
Posts: 457
Joined: 25 Mar 2012, 10:21
Location: Strasbourg, France.

Re: Recover partition table for Linux LVM2

#12 Post by remy »

You're welcome, sorry that we didn't found the solution in time. You weren't so far : e2fsck is telling that he recognized a filesystem, but wasn't able to repair with THIS superblock. Just like if you were in front of the good door, but with the wrong key. In that case, better solution is sometimes to try another key, instead of rebuilding a whole house ;)

(Waoouuuuu :geek: )

Possible solutions to try next time : Whith testdisk or with mkfs -n you should have been able to determine what were the other superblocks positions, and try to repair with other superblock. You may also try to recover with ext3grep or extundelete (even files that were not deleted).

EDIT : next time you loose data, first step is to do bit to bit copy of every disk. You can then reconfigure your server and continue searching on the copies.