bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Disk size wrong?


From: Florian Sedivy
Subject: Re: [Bug-ddrescue] Disk size wrong?
Date: Thu, 07 Jun 2018 12:51:16 +0200

Hello David!

This is expected behavior, when ddrescue can't figure out the input file's size 
in advance. 
The behavior is normal on macOS, because ddrescue being (mostly) strictly POSIX 
figures the size of the drive by using lseek( input, 0, SEEK_END ), which 
unfortunately returns zero for both block (/dev/diskX) and character devices 
(/dev/rdiskX) on macOS. I am currently looking into alternative methods to 
improve that. 

But don't worry, ddrescue will not read beyond the end of the drive, so it is 
mostly a cosmetic issue for the live status display. What can you do to make it 
more accurate? 

1. Let ddrescue reach EOF (normally when Pass 1 finishes), then the map file 
reflects the true size. Use the -C --complete-only option in subsequent runs. 

2. Find out the size of the device yourself, and use -s --size option. 
Looking at the partition table is not the way to go, because that is part of 
the content you are trying to rescue. Better to use 'diskutil info diskX', 
which will show you the true size both in bytes and in sectors. 

BTW, using /dev/rdiskX instead of /dev/diskX, as you do, is actually much 
faster, but you should combine it with -c 256 to have the full effect. 

Greetings, 
Florian 

> Am 06.06.2018 um 02:26 schrieb David Morrison <address@hidden>:
> 
>> Are you sure the disk you want to recover is in /dev/rdisk3 ?
> 
> Yes
> 
>> What fdisk -l /dev/rdisk3 shows ?
> 
> On OS X this is probably what you mean:
> $ fdisk /dev/rdisk3
> fdisk /dev/rdisk3
> Disk: /dev/rdisk3     geometry: 60801/255/63 [976773168 sectors]
> Signature: 0xAA55
>         Starting       Ending
> #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
> ------------------------------------------------------------------------
> 1: EE 1023 254  63 - 1023 254  63 [         1 -  976773167] <Unknown ID>
> 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      3: 00 
>    0   0   0 -    0   0   0 [         0 -          0] unused
> 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused
> 
> The size looks right, and there should be three partitions. But it looks like 
> the partition table is damaged.
> 
>> ----- Original Message ----- From: "David Morrison" <address@hidden>
>> To: <address@hidden>
>> Sent: Tuesday, June 05, 2018 8:16 PM
>> Subject: [Bug-ddrescue] Disk size wrong?
>> 
>>> Hello
>>> 
>>> I am trying to copy a 500GB disk from an iMac that was damaged by a 
>>> lightning strike. I have it in a USB case connected to an iMac running OS X 
>>> 10.6 (Snow Leopard). (It is my disk recovery machine which has all the 
>>> tools set up and ready to go.) ddrescue is 1.23
>>> 
>>> It has been running for about 10 minutes, but the pct rescued is still zero.
>>> 
>>> Then I realised that non-tried is not MB but PB, presumably Petabytes, a 
>>> very, very large number.
>>> 
>>> bash-3.2# time ddrescue -n /dev/rdisk3 ./Orr500GB.dmg Orr500GB.log
>>> GNU ddrescue 1.23
>>> Press Ctrl-C to interrupt
>>>     ipos:   10100 MB, non-trimmed:        0 B,  current rate:  15138 kB/s
>>>     opos:   10100 MB, non-scraped:        0 B,  average rate:  15563 kB/s
>>> non-tried:    9223 PB,  bad-sector:        0 B,    error rate:       0 B/s
>>>  rescued:   10100 MB,   bad areas:        0,        run time:     10m 49s
>>> pct rescued:    0.00%, read errors:        0,  remaining time:         n/a
>>>                              time since last successful read:          0s
>>> Copying non-tried blocks... Pass 1 (forwards)
>>> 
>>> So it seems that somehow the disk is reporting itself as much larger than 
>>> it really is. Presumably this means the controller is damaged?
>>> 
>>> I guess I can leave it going until it has reached at least 500GB in about 9 
>>> hours then stop it?
>>> 
>>> Or if it stops for some reason, I can add -s 520GB to the command line when 
>>> I restart it.
>>> 
>>> Cheers
>>> 
>>> David
>>> 
>>> _______________________________________________
>>> Bug-ddrescue mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/bug-ddrescue
> 
> 
> _______________________________________________
> Bug-ddrescue mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-ddrescue




reply via email to

[Prev in Thread] Current Thread [Next in Thread]