I wonder if the problem you are having is that Testdisk is looking for useable partitions and not recognizing it as an LVM partition.
One thing which might be worth looking at (although not sure if it will help epubs, although it should be able to recover PDFs) is "Photorec" - which will scan the raw disk and try and recognise content based on signatures and recover it.
Another question is are you able to add the volume back into LVM - have you played arround with the "pvscan" tool, and if so, what output have you received ?
Also have a look at this, this and this link about recovering LVM partitions. (Of-course, you really want to do a backup first - maybe DD everything to free disks if you have them)
Also, can you tell us a bit more about your setup, ie was this disk part of a single larger volume, or was each disk a separate volume, and provide the output of "pvs;vgs" - which might give some additional clues based on how other volumes were set up.
This is how I finally managed to recover some files from the disk. I know that part of the answer will be off-topic (since I used many windows programs) but for the sake of completeness I wish to share my experience for future users.
The most important lesson I learnt is BACKUP YOUR DATA BEFORE RESIZING A PARTITION.
Since TestDisk was not helping me, even with deep scan, I decided to use PhotoRec. Luckily I had a disk backup that was 3-4 months old, so I aimed to recover all files from the disk and filter only useful ones, the ones that were created after my last backup.
1st scan with PhotoRec was for the whole disk. It recovered 5700 files (2,12 GB) but then started looping and sector count was going backward.
In the 2nd scan I set to scan only the NTFS half. It recovered 56800 files (40 GB).
I needed to scan the 2nd half of the disk, so I started a whole disk scan again, I stopped it and I edited the session log file. I manually entered a number that was a few million sectors before the end of the part it was already done. I started again PhotoRec, I told it to resume session and.. magically! It managed to scan only the 2nd half of the disk. 128400 files were found (43,5 GB).
I copied the 3 scans in a folder named “PR_scans” using FreeFileSync.
I installed Cygwin. I created another empty folder named “Processing” that I used to catch some useful files and to compare them against the backup.
In Cygwin I used commands like:
find PR_scans/ -iname '*.jpg' -size +250k -exec mv -vi {} Processing/ \;
to find useful files. I found 250k was a good cut-off size to separate personal photos from internet cache files. For other kinds of files I set no minimum size:
find PR_scans/ -iname '*.docx' -exec mv -vi {} Processing/ \;
I repeated this operation for all meaningful file extensions (doc, xls, xlsx, pdf, png, mov, avi, etc.)
I finally used Duplicate Cleaner Free to remove all files from Processing folder that were already present in my old Backup.
The creator of RecuperaBit contacted me on this site so I decided to test this tool that seems quite magic.
RecuperaBit found a total of 13772 files (22,2 GB), against 13500, 30,8 GB that was the size of my 3 months old backup. This seems pretty good. Of these files:
- 8700 files were exact duplicates of files in my old backup
- 4000+ files had same name but different content, because they have been modified in the meanwhile or because RecuperaBit recovered damaged content.
- most interestingly: 395 were duplicates of PhotoRec files not in my backup, this means that PhotoRec recovered the content, but RecuperaBit recovered filename and path!!
Best Answer
[I've posted this as an answer as its to long for a comment. It may also be particularly helpful to solving your problem]
Once you have backed up your data, you might be able to rebuild the partition and get it back (but it is high risk - so back up all data you can first). I might use sfdisk -d /dev/sda > filename to dump the current layout, then delete partitions 2 and 3. Using the values from sfdisk as a guide I would then create partition 2 covering exactly the empty space, then partitions 3 and 4 for sda2 and sda3 respectively. With some luck this should recreate the missing partition.
Alternatively, and more simply, just delete partitions 2 and 3 and create a new partition 2 covering the unallocated space and the space of partition 2 and 3. This will wipe out the Recovery partition and HP_TOOLS partition, but, I suspect, is likely to make your data partition available - albeit smaller then the actual space available to it as you have grown that partition.