I ran ddrescue last night and came up with an image of the drive with everything except 4096 bytes. I guess next I'll need to figure out which file(s) lives in the damaged area sector and try to repair the image if it's important. I used the SystemRescueCD project to run ddrescue.
root@debian /mnt/external % ddrescue /dev/sdc /mnt/external/hdimagefile logfile
Press Ctrl-C to interrupt
rescued: 500107 MB, errsize: 4096 B, current rate: 0 B/s
ipos: 1256 kB, errors: 1, average rate: 36284 kB/s
opos: 1256 kB, time from last successful read: 1.6 m
Finished
# Rescue Logfile. Created by GNU ddrescue version 1.15
# Command line: ddrescue /dev/sdc /mnt/external/hdimagefile logfile
# current_pos current_status
0x00132C00 +
# pos size status
0x00000000 0x00132000 +
0x00132000 0x00001000 -
0x00133000 0x7470AD3000 +
http://grover.open2space.com/content...rive-partition
I found this tidbit of gold from someone else who had to recover data from a corrupted lvm partition.
With LVM
If the partition you are trying to recover data from is an LVM partition, then the process is different. First, you need to have the LVM management tools installed, which may mean a change to the kernel. I would also recommend disconnecting the suspect drive before continuing - just to avoid any inadvertent changes to it.
Here is the process in summary, and we'll discuss the commands below:
view sourceprint?
1.losetup -a
2.losetup /dev/loop2 /the/image/file
3.vgscan
4.vgchange -a y
5.vgdisplay -v
6.mount -t ext3 /dev/VolGroup00/LogVol01 /the/mount/point•losetup -a - this tells what loop devices are already in use. We need to find a loop device that is NOT in use. (i.e. a number that is not listed).
•losetup /dev/loop2 /the/image/file - this will treat the image file as a loop device, and assign the loop device number (in this sample, it would be loop device 2). Chang the number to be something that is not already running - i.e. /dev/loop5.
•vgscan - the LVM system will scan the devices, including the loop devices, for volumes and report what is there. We want to make sure the volume on the image file is seen.
•vgchange -a y - this will activate the volume(s).
•vgdisplay -v - this will list the known volumes. We are interested in the "LV NAME" value for the suspect partition/volume. We use this value in the mount command.
•mount -t ext3 /dev/VolGroup00/LogVol01 /the/mount/point - this will mount the volume at the given mount point.
At that point you can change into the /the/mount/point directory, and access the files as if the drive was operating fine. The mounting process is the only part that is different for LVM