LVM2 recovery ?

Using PhotoRec to recover lost data
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: 3
Joined: 09 Jun 2012, 19:56

LVM2 recovery ?

#1 Post by yoduh »

I pulled an old amd barton box out of storage a few weeks ago, it wouldnt boot.
So I tried to upgrade the Fedora 11 installed there, that fell over (some python exceptions iirc),
so I tried a fresh install.

while running installer, I foolishly chose to include all the LVM2 partitions in the upgrade,
rather than just one, without reading the fine print - so I fear Ive trashed the contents of
all those other partitions. I aborted the process (dont remember how - whether it was
orderly ^C or panic'd reset button). At that point I just stopped, figuring Id at least not
do any further harm..

So, I pulled a copy of RecoveryIsPossible, and ran TestDisk 6.14-WIP.

I plugged in USB drive, told testdisk to write the log there, prog ran for a while,
and wrote a 4gb image.dd file then paused/stopped) with:

No space left for the file image.

> [Ok]

Ive tried several times, USB drive has 86G free, so its not whats full...

the 4GB images (image.dd in 2 different directories) are both
4294967295 bytes long, which is exactly 4*2^30-1, which makes me
suspicious of the LARGE_FILES setting on the kernel or executable
(or maybe its the damn fat partition on the USB drive)

So, Im thinking that a FAT limitation is the problem, not the kernel or program.
But it does seem that TestDisk could recognize the limits imposed by the
destination filesystem..

Have I missed something ?

(partition is

Posts: 3
Joined: 09 Jun 2012, 19:56

Re: LVM2 recovery ?

#2 Post by yoduh »

nobody ?

ISTM that testdisk is reaching the VFAT filesize limit, then giving up.
It should be closing the file, renaming it with a number suffix (say file-X),
then opening file-X+1 to start over.

Is testdisk the right tool for the job ?
Its now over a month since I looked at the dead box,
and having forgotten what I knew about RIP, the tool name
suggests that its primary purpose is not recovering data.

Is the enhancement I suggested above a practical and generally useful
addition ? With some feedback and guidance, I could be cajoled into
trying to do it, and submitting the patch.

wrt the LVM aspects, Im hoping that the aborted Fedora reinstall just
rewrote the LVs and PVs, but left the filesystems stored in them largely
intact, such that full recovery is practical. Can anyone shed some light
on this, even if its wild speculation ?

User avatar
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France

Re: LVM2 recovery ?

#3 Post by cgrenier »

There is no need to create an image of the disk. Search for the lost filesystems using Analyse, Quick Search and Deeper Search. Try to list the content of each partition found and copy the files if necessary.