Re: Help with ddrescue
On Fri, 08 May 2015 19:52:04 -0400
The Wanderer <email@example.com> wrote:
> On 05/08/2015 at 07:33 PM, German wrote:
> > On Fri, 08 May 2015 19:20:37 -0400
> > The Wanderer <firstname.lastname@example.org> wrote:
> >> On 05/08/2015 at 07:08 PM, German wrote:
> >>> That's what I got:
> >>> spore@asterius:~$ lsblk
> >>> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
> >>> sda 8:0 0 119.2G 0 disk
> >>> ├─sda1 8:1 0 512M 0 part /boot/efi
> >>> ├─sda2 8:2 0 111.3G 0 part /
> >>> └─sda3 8:3 0 7.4G 0 part [SWAP]
> >>> sdb 8:16 0 465.8G 0 disk
> >>> sdc 8:32 0 1.8T 0 disk /media/spore/9F86-0131
> >>> sdd 8:48 0 1.8T 0 disk
> >>> └─sdd1 8:49 0 1.8T 0 part
> >>> Where sdd is my failed drive. sdc is my spare drive. The correct
> >>> procedure will be ddrescue if=/dev/sdd1 of=/dev/sdc ?
> >> No. That might potentially work (except that, if I'm reading the
> >> ddrescue man page correctly, the syntax is wrong), but it wouldn't
> >> be correct.
> >> First, unmount /dev/sdc.
> Note for the record: The other steps will erase any data which is
> presently on /dev/sdc. I figure you probably already know that, but I
> just want to be explicit about it.
> >> Then do one of two things:
> >> 1) Create /dev/sdc1 (as an unformatted partition, using fdisk or
> >> parted or whatever partitioning tool you choose), and then run
> >> ddrescue /dev/sdd1 /dev/sdc1 /any/path/you/want/ddrescue.log
> >> 2) run
> >> ddrescue /dev/sdd /dev/sdc /any/path/you/want/ddrescue.log
> > Ok, I think I am getting closer. How big is a log file?
> The size of the log file depends on two things: the size of the data
> source which is being copied/rescued, and the number of errors which
> occur while attempting to read that data source.
> It can be very small, or it can be moderately large. Even in a
> ridiculous case, however, I wouldn't expect it to be more than a few
> hundred megs - unless the source drive is so bad that you're not going
> to be getting any data back off of it anyway.
> > Can it be anywhere on all drives that have enough space? For
> > instance:
> > ddrescue /dev/sdd /dev/sdc /dev/sda2/ddrescue.log will work?
> Not quite. /dev/sda2/ is not a directory; it's a device node.
> Since /dev/sda2 is mounted to / (the root filesystem), the correct
> equivalent to this command would be:
> ddrescue /dev/sdd /dev/sdc /ddrescue.log
> and although I wouldn't advise storing a log file in the root
> directory, the command should work.
> The log file itself can be placed in any writable location which has
> enough space.
UPDATE: Digging into it more, I found out Gentoo small tutorial and it
was almost as you suggested, but with -f and -n flag. Here it is:
Disk to Disk
In this scenario the hard disk drive /dev/sdb is about to fail and we want to create an exact copy on a new hard disk drive /dev/sdc, which should be at least the same size as the source drive.
First round, we just copy every block without read error and log the errors into /root/rescue.log
All data on /dev/sdc will be lost and also are the partitions or partition table, if any.
root #ddrescue -f -n /dev/sdb /dev/sdc /root/rescue.log
Second round, we copy only the bad blocks and try 3 times to read from source before we give up
root #ddrescue -d -f -r3 /dev/sdb /dev/sdc /root/rescue.log
Now the new drive could be mounted and the file system checked for corruption
I am running ddrescue now for 7 hours. 595000 mb rescued. The speed
fell off for some reason. In the beginning, it was about 54000, now
just 6000. Have no idea why this is.