Advanced hard disk tools: Difference between revisions
No edit summary |
(→MHDD) |
||
Line 16: | Line 16: | ||
==MHDD== | ==MHDD== | ||
MHDD is a low level diagnostic and maintenance tool that runs under MSDOS or FreeDOS. It's best run from a DOS bootable USB memory stick. If you have Spinrite on a memory stick, add this to it too. | MHDD is a low level diagnostic and maintenance tool that runs under MSDOS or FreeDOS. It's best run from a DOS bootable USB memory stick. If you have Spinrite on a memory stick, add this to it too. | ||
Faced with a slow running computer, MHDD will show very clearly whether the problem is a failing hard disk, performing many retries in order to read data. | |||
Note that MHDD '''will destroy data''' if not used with care. | Note that MHDD '''will destroy data''' if not used with care. | ||
Line 54: | Line 56: | ||
* Erase delays - Erase sectors which take a long time to read, whether or not correctly. This should cause them to be remapped, but the data is lost. | * Erase delays - Erase sectors which take a long time to read, whether or not correctly. This should cause them to be remapped, but the data is lost. | ||
Blocks of 255 sectors are each represented by a single blob. A brighter greyscale or coloured blob indicates a slow read, suggesting the disk had trouble reading a sector. An "x" indicates a sector was unreadable. | The criteria for a drive to automatically remap (or relocate) a sector vary, but are normally roughly as follows: | ||
# If a read is eventually successful after retries and/or error correction, then if the retries and/or error correction were below a certain threshold, do nothing. | |||
# If the retries and/or error correction were above that threshold, but the data was eventually recovered, remap the sector (rewrite the data to a spare sector and mark the original unreadable). | |||
# If the data couldn't be recovered, mark the sector as "unstable", increment the count of "pending" sectors and return an error to the host computer. | |||
# If the sector had already been marked unstable but is now read correctly, remap it and decrement the "pending sectors" count. | |||
# If a write occurs to a sector marked as "unstable", remap it by diverting the write to a spare sector and decrement the "pending sectors" count. | |||
Blocks of 255 sectors are each represented n the graphic display by a single blob. A brighter greyscale or a coloured blob indicates a slow read, suggesting the disk had trouble reading a sector. An "x" indicates a sector was unreadable. | |||
===Log files=== | ===Log files=== |
Revision as of 14:42, 10 July 2014
Advanced tools for diagnosing and recovering hard disk problems. (This page is work in progress. Please refrain from editing until the first draft is complete and this note has been removed. Comments under Discussion are nevertheless welcome. And if you think there are plenty of other topics of higher priority than this then you're right - but I just need to do a brain dump of what I've recently learnt before I forget it all.)
Summary
The S.M.A.R.T. data returned by a hard disk can give a useful indication of its health but there are other tools that can be used which go well beyond this. WARNING: some of these tools are DANGEROUS and should only be used in a kill-or-cure situation or if you are certain that a full system backup is available.
ddrescue
Spinrite
gdisk
MHDD
MHDD is a low level diagnostic and maintenance tool that runs under MSDOS or FreeDOS. It's best run from a DOS bootable USB memory stick. If you have Spinrite on a memory stick, add this to it too.
Faced with a slow running computer, MHDD will show very clearly whether the problem is a failing hard disk, performing many retries in order to read data.
Note that MHDD will destroy data if not used with care.
MHDD is basically a user interface to the ATA command set and more. A key feature is that it accesses the disk direct rather than going through the BIOS and hence gets a more accurate and uncensored view. For example it can read the SMART data even if the BIOS hides it. The following is a very brief survival guide to the most useful functions.
Command line flags
\ENABLEPRIMARY
Normally MHDD disables access to the primary disk on the assumption that this may well be what DOD is running from. Use this command line flag when running from a bootable USB memory stick if it's the primary disk you need to access.
Commands
MHDD issues a prompt, to which you can type a range of commands, a few of which are listed here. (Commands are case-insensitive.)
HELP - Gives a list of commands and brief descriptions
MAN <command> - Gives a fuller description of the named command.
PORT - Issue this command first to get a list of disks, then select the one you want by number.
EID - Report extended ID information from the disk.
SMART ATT - Report values of SMART attributes. (The F8 key is a synonym for this command.) Pay special attention to:
- Read error rate
- Relocated sectors count
- Relocate event count
- Current pending sectors
See the Wikipedia S.M.A.R.T. article for further details.
SCAN - Scan the disk
The disk is scanned, giving a graphic display of its state, and with the option of remapping bad sectors.
Several options are offered in a pop-up menu, in particular:
- Start, End - Start and end sectors for the scan, defaulting to the entire disk.
- Remap - Attempt to remap bad sectors, provided they can be read correctly (with difficulty).
- Erase delays - Erase sectors which take a long time to read, whether or not correctly. This should cause them to be remapped, but the data is lost.
The criteria for a drive to automatically remap (or relocate) a sector vary, but are normally roughly as follows:
- If a read is eventually successful after retries and/or error correction, then if the retries and/or error correction were below a certain threshold, do nothing.
- If the retries and/or error correction were above that threshold, but the data was eventually recovered, remap the sector (rewrite the data to a spare sector and mark the original unreadable).
- If the data couldn't be recovered, mark the sector as "unstable", increment the count of "pending" sectors and return an error to the host computer.
- If the sector had already been marked unstable but is now read correctly, remap it and decrement the "pending sectors" count.
- If a write occurs to a sector marked as "unstable", remap it by diverting the write to a spare sector and decrement the "pending sectors" count.
Blocks of 255 sectors are each represented n the graphic display by a single blob. A brighter greyscale or a coloured blob indicates a slow read, suggesting the disk had trouble reading a sector. An "x" indicates a sector was unreadable.
Log files
Log files of a session are created in a sub-folder LOG in text format. Rename the LOG directory after a session so that a new session on a different disk and on another occasion will create new log files.
References
External links
- External links as bullet points