Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'One method of skipping bad sectors on an iPod's drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One method of skipping bad sectors on an iPod's drive
Authored by: kaih on Mar 09, '06 01:13:16PM

OK, as one poster said, the contents of the file don't matter one bit.

Now, to clear up a misunderstanding about modern drives - all modern hard drives (ATA, SATA, SCSI etc) have a list of bad blocks stored in their firmware. No, you can't access this list. Every drive made has bad sectors. Every drive made has spare capacity so it can automatically remap bad sectors.

What happens is when a drive sees a bad sector, it tries to silently remap that sector to somewhere nearby, in an area reserved for this purpose. This happens without you being told anything. I personally think that the SMART status should indicate that this is happening...

Once you are seeing bad sectors at the higher level, that means that the drive has run out of spare sectors to remap these bad sectors and you're really in trouble. The drive will go pear-shaped in the near future. No, really, it will.

Having said all that, there is a service mode for iPods, which can be found at the following page:
http://www.methodshop.com/mp3/ipodsupport/diagnosticmode/index.shtml

When in diagnostic mode, you can do a hard drive scan, and re-initialise the hard drive - this also has the side-effect of remapping what bad sectors it can

---
k:.



[ Reply to This | # ]
One method of skipping bad sectors on an iPod's drive
Authored by: tbo on Mar 09, '06 01:59:34PM

Sorry, but that's not quite right. The drive does maintain a set of "spare" sectors as you said, but the remapping process is more complicated. If a sector fails to read, it does not immediately get remapped. Rather, it is added to the Current_Pending_Sector list, and the read fails. The drive leaves the sector as-is in the hope that some future attempt to read it will succeed, thus avoiding data loss. If the sector was remapped on a failed read, it would mean definitely losing data. If a later read attempt succeeds, the sector is generally removed from the Current_Pending_Sector list and is considered "good" again.

Only if a write fails to a sector in the Current_Pending_Sector list does a sector get remapped (most drives don't verify writes to "good" sectors by default for performance reasons, so the only chance to catch a failed write is when the sector is in the Current_Pending_Sector list). In this case, the drive can try again, this time writing to a spare sector, without losing the data to be written. Now the bad sector gets remapped. The drive's Current_Pending_Sector count will decrease, and the Reallocated_Event_Count will increase by a corresponding amount.

In fact, things can be even more complicated than this, as some drives don't like to remap individual sectors (for performance reasons), and will try to remap larger chunks or do other fancy things.

Anyway, the point is that forcing the OS to write some junk data to sectors in the Current_Pending_Sector list will usually force them to be remapped. Even if they're not remapped, they at least won't accidentally get used for your important data*.

* Again, there are subtleties. The OS sometimes moves active files to different parts of the disk (see Apple dev docs on "hot files"), and this could in principle re-expose the bad sectors if they weren't actually remapped. In practice, this is very unlikely, as there shouldn't be many requests for this junk data (and so it will never be "hot").

You can use smartmontools to see all sorts of really detailed information on your drive, including the Current_Pending_Sector count and the Reallocated_Event_Count. If a drive has dozens of Current_Pending_Sectors and Reallocated_Event_Counts, I usually take it as a sign that the drive is getting older, and should be backed up frequently if it contains important data. For a music-only iPod, however, I wouldn't worry about it.



[ Reply to This | # ]