[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ddrescue] SMART, reallocation, and retries
From: |
Franc Zabkar |
Subject: |
Re: [Bug-ddrescue] SMART, reallocation, and retries |
Date: |
Thu, 15 Aug 2013 08:01:55 +1000 |
Many thanks for your replies.
Firstly, I have been recommending ddrescue for many years. IMHO it is
indeed the best freeware DIY tool for cloning HDDs with media problems.
To answer your questions/objections, Seagate's most recent Product Manuals
still list several obsolete ATA "Retry" commands as being currently supported.
For example, here is their Gen 14 manual dated October 2011:
http://www.cclonline.com/content/pdfs/SL80RhkeUlBGrwJRZ-2bmY9w-3d-3d.pdf
See the "Supported ATA commands" in Section 4.3 on page 31.
Read DMA Without Retries (C9H)
Read Sectors Without Retries (21H)
Read Verify Sectors Without Retries (41H)
I'm not a programmer (although I have written programs for head alignment
and data recovery), so I don't understand the difficulty in using such
commands. However, if it were at all possible, it would add some seriously
important functionality to ddrescue. I cannot emphasise enough the
importance of limiting the number of retries. Even though ddrescue may
issue an ATA read command only once, the drive itself may retry the command
several times internally and transparently. I don't know how modern drives
behave in this regard, but 30 years ago one could command a drive to seek
slightly off-track, with either a positive or negative offset, and one
could also strobe the data either early or late. This gave the controller 8
possible retry combinations. I suspect that modern drives do similar
things. In fact I believe it is called "microjogging".
You can see the servo structure in the following article:
http://hddscan.com/doc/HDD_Tracks_and_Zones.html
As for ERC, could it not be incorporated into ddrescue without using
smartctl as a front-end? I participate in several storage forums and the
typical user ideally wants something like
"fix-my-hard-drive-with-a-single-click.exe". :-)
As for why disabling reallocation is important, if it can be done at all,
it is because drives maintain several dynamic firmware modules in a hidden
System Area (SA) on the platters. For example, there are modules related to
SMART, G-list (grown defects), LBA-to-physical-CHS translator, and so on.
As absurd as it may sound, when these modules become corrupt or when they
overflow, the drive stops functioning. It can then no longer be accessed
via ATA commands. The annoying thing is that a professional "data recovery"
often involves a single-click from behind a keyboard using commercial
software that relies on vendor specific commands, either via the SATA/PATA
interface, or via a serial terminal console. The solution in a great number
of cases is simply to clear the SMART and G-list modules. I don't
understand why a firmware programmer would write such brain-dead software,
but this nonsense has been going on for several HDD generations, and it
occurs in HDDs from several vendors. ISTM that, if there are no more spare
sectors, then the logical approach should be to report an error and leave
it at that. But that's not how it seems to work. :-(
-Franc Zabkar
At 02:49 AM 15/08/13, you wrote:
Franc Zabkar wrote:
May I suggest that ddrescue disable SMART by default, if it does not
already do so.
The SMART DISABLE command does not necessarily disable internal monitoring
and sector reallocation. It only disables the SMART related ATA commands.
Also I believe that there may be ATA commands that allow retries to be
disabled at the drive level, at least in earlier versions of the standard.
Read DMA Without Retries
Read Sectors Without Retry
Set Features Disable Retry
All the above commands were declared obsolete in ATA-5 (~2000). Do you
have any evidence that these commands are still supported by a reasonable
number of recent (ATA-8 ACS and later) drive models?
Ddrescue currently builds and works out of the box on most POSIX platforms
(including Windows thanks to Cygwin). It does not require platform
specific hacks.
Adding things like disable SMART or specific ATA READ commands would
introduce the full "there is no standard ATA/SCSI pass-through
functionality (and the existing non-standard functions do not work with
all controllers)" problem to ddrescue. This makes e.g. smartmontools
rather complex and prevents that Linux hdparm could be easily ported.
Perhaps Error Recovery Control (ERC) and the ATA Streaming feature set
might be useful in the above regard.
Try "smartctl -l scterc,R,W /dev/ice" before using ddrescue. Many recent
disks support ERC/TLER, even normal "desktop" (non-RAID) series.
Regards,
Christian
- [Bug-ddrescue] SMART, reallocation, and retries, Franc Zabkar, 2013/08/14
- Re: [Bug-ddrescue] SMART, reallocation, and retries, Antonio Diaz Diaz, 2013/08/14
- Re: [Bug-ddrescue] SMART, reallocation, and retries, Christian Franke, 2013/08/14
- Re: [Bug-ddrescue] SMART, reallocation, and retries,
Franc Zabkar <=