Hi Toke,
Toke Lahti wrote:
I'm trying to read it with my macbook(Sonoma).
I'm wondering why Ddrescue thinks the size to be 9223 PETAbytes.
Ddrescue uses the only portable method I know to obtain the size of a
seekable file or block device; calling lseek[1].
[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/lseek.html
"Upon successful completion, the resulting offset, as measured in bytes from
the beginning of the file, shall be returned."
But MacOS's lseek seems to return 0 for block devices (as your report shows
for /dev/rdisk5 and /dev/rdisk4). Ddrescue interprets such 0 size as unknown
(unlimited) size.
Can I do something that it would understand the real size of this disk?
Surely MacOS has some (proprietary) way of reporting the size of a block
device. You may find out what it is. If it is portable enough, I may
incorporate it into ddrescue. If it is _not_ portable enough, you may use it
and pass the reported size to ddrescue with option -s.
If you look at "current sector" might be self explanatory why Ddrescue can't
read that sector...
Reading backwards a device of unknown size is not a good idea.
Best regards,
Antonio.