Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have accidentally deleted a file that I want to recover. The partition is an ext4 partition inside an LVM partition that is encrypted with dm-crypt/LUKS.

The encrypted LUKS partition is: /dev/sda2
which contains a physical volume, with a single volume group, mapped to: /dev/mapper/system
And the logical volume, the ext4 partition is mapped to: /dev/mapper/system-home

A # testdisk /dev/mapper/system-home will notice it as an ext4 partition but tells me that the partition seems damaged when I try to list the files. If I # testdisk /dev/mapper/system it will detect all the partitions, but the same happens if I try to list their files.

Am I doing something wrong or is it a known bug? I have searched but haven’t found any clue.

share|improve this question

1 Answer 1

You're doing something wrong.

testdisk is meant to operate on and recover disk partitions, which is not the problem you're having. Most likely you want to use its companion tool photorec instead, which recovers deleted files (and not just photos).

share|improve this answer
    
df says that /dev/mapper/system-home is mounted at home. blkid tells me that /dev/mapper/system-home has TYPE="ext4", do you know what can be wrong in this case? I have listed files from ext4 partitions before, I do not see why testdisk won’t let me now. –  user1598585 Sep 25 '12 at 1:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.