7

I have a Western Digital RE4 1.5TB that has just reallocated 56 sectors.

  Reallocated Sectors Count,140,193,193,OK,56,0,Enabled

I want to know if it is possible to find out which are the files affected by these reallocated sectors, and if they got corrupted bits because of this reallocation.

Nick
  • 181
  • 4

2 Answers2

6

Not easily.
the sector reallocation happens inside the drive (which is why it's reported to you by SMART) -- your filesystem has no clue it's happening. As far as it's concerned sector 12345 is still sector 12345, that's what it asks the drive for. Internally the drive knows 12345 is now 67890 and returns the contents of the remapped sector.

The only way I know of that you could do this would be to get the physical sector map of the drive (from the drive's electronics), combine it with the reallocation map, translate it to the logical sector map (that is presented to the OS/filesystem), and then determine what files were using the reallocated sectors at the time they were remapped (which may not be the file(s) currently using it.


So for all practical purposes you can't do this - and you shouldn't have to.
Modern hard drives are pessimistic when reallocating sectors and will reallocate when a sector is marginal rather than waiting for it to be totally unusable (so if the reallocation is successful and transparent no data is lost: The write was redirected, or the read retried until it succeeded and the data subsequently moved). If the reallocation failed the OS would have gotten an error back from the drive and reported it to you.

About the only things you should concern yourself with are:

  • Are there visible bad sectors on my drive (being reported to the OS)?
    If the answer is yes, the drive is dead. OS-visible bad sectors mean that the reallocation space the drive has is used up, and you're starting to lose accessible disk. Failure is usually imminent and the drive should be replaced ASAP.

  • Is the sector reallocation count above the threshold, or steadily growing at a rapid rate?
    This could indicate a failure in progress - Again, plan to replace the drive ASAP.

voretaq7
  • 79,345
  • 17
  • 128
  • 213
  • voretaq, so you think that in general no data is lost? This wasn't even an OS HDD, I just used it to store data, and rarely accessed it. When I bought it, in late 2010, within a short period of time, 1 month maybe, I received 25 reallocated sectors, but did not bother at that time. Now, 2 years later, another 31 sectors. – Nick Aug 16 '13 at 19:51
  • http://arstechnica.com/civis/viewtopic.php?t=1155702 "Realloacted Sector Count = INVISIBLE bad sectors that have been swapped with reserve sectors. These sectors are NO LONGER VISIBLE to your operating system and as such can NEVER cause any more problems." – mfinni Aug 16 '13 at 19:57
  • @Nick Generally if data is lost the drive will return an error (which your OS will report to you). You say the reallocation count increasing (which it will do as drives age) -- if it's getting close to the SMART threshold or going up s and not leveling off I'd consider replacing the drive as cheap insurance. Your data is probably worth at least $200. (Incidentally, this is part of why we have [RAID](http://serverfault.com/q/339128/32986).) – voretaq7 Aug 16 '13 at 19:57
  • It's also why we have SMART. If a counter like this starts climbing, doesn't that lead to a PREDICTIVE FAILURE status? – mfinni Aug 16 '13 at 19:59
  • voretaq7, I've checked, nothing appeared in Windows Event Logs. However, I'm still afraid not to have some corrupted data due to those reallocations. I also understand that it's hard to check if this is the case or not. – Nick Aug 16 '13 at 20:05
  • mfinni, it does lead to a PREDICTIVE FAILURE, indeed. Hard Disk Sentinel is showing 205 days remaining, after this reallocation, but it's a simple arithmetical prediction, based on the number of events and the period of time that passed between them. – Nick Aug 16 '13 at 20:09
  • @Nick If you want to ensure data integrity, you need to keep checksums of your files. Then you can use the checksums to answer "has anything been corrupted?" (And replace with another copy, which you can confirm is correct using the checksum) – derobert Aug 19 '13 at 20:59
5

This is SMART counter. Reallocated sectors are not exposed to the software. Physically, all drives have spare space reserve for reallocation, so, HDD is internally doing all the things, process is transparent to the outside world. While reallocated sector count is low enough - you don't have to worry about it, performance decrease won't be significant. Probably, some vendor-specific tools can show you the internal structure of HDD, but with generic utilities - it's not really possible, there is no such standard, only SMART.

GioMac
  • 4,444
  • 3
  • 24
  • 41
  • Western Digital used to have such a utility available (for their old Parallel ATA drives) -- I'm not aware of one for SATA. – voretaq7 Aug 16 '13 at 19:51
  • 1
    Data LifeGuard Diagnostic, but it does the same via SMART. or... http://www.acelaboratory.com/products.php#002 – GioMac Aug 16 '13 at 21:51
  • I've scanned the whole drive with Hard Disk Sentinel - Surface Scan, which is able to tell if there are sectors that had more than one attempts to be read(weak sectors), and there wasn't a single weak sector. – Nick Aug 17 '13 at 05:26
  • This won't show anything until HDD is in very bad condition. Reallocation is transparent for this application - real physical sector might be relocated, but hd sentinel will see the situation unchanged. There is no 100% guarantee that file consistency won't be lost, but there are internal recovery and checksum mechanisms to prevent this. Anyway, OS might be notified about this, or RSC will increase. Only proven way to detect this is upper level chechsuming mechanism, which is not widely available in today's filesystems yet. – GioMac Aug 17 '13 at 09:39