How can I determine what a bad sector affects?

Started Mar 8, 2013 | Discussions
skyglider
Veteran MemberPosts: 3,207Gear list
Like?
How can I determine what a bad sector affects?
Mar 8, 2013

If the number of a bad sector on a spinner hard drive is known, is there any way to determine what is affected by the bad sector?

The sector number is in the form nnn,nnn,nnn, a 9 digit number.  It is revealed when doing a full backup.

malch
Forum ProPosts: 10,805
Like?
Re: How can I determine what a bad sector affects?
In reply to skyglider, Mar 8, 2013

skyglider wrote:

If the number of a bad sector on a spinner hard drive is known, is there any way to determine what is affected by the bad sector?

The sector number is in the form nnn,nnn,nnn, a 9 digit number. It is revealed when doing a full backup.

I'm not sure what backup you're using and what it's really reporting.

If the drive (firmware) knows about this bad sector, it's already been mapped out and isn't being used for data. I rather suspect this is the case or you would have seen an i/o error rather than this warning.

On the other hand, if it's really an in-use sector that is flaky, I guess there are some utilities that will show you what file sits on that sector but I don't have any specific recommendations.

Reply   Reply with quote   Complain
scokill
Senior MemberPosts: 1,786Gear list
Like?
Re: How can I determine what a bad sector affects?
In reply to skyglider, Mar 8, 2013

skyglider wrote:

If the number of a bad sector on a spinner hard drive is known, is there any way to determine what is affected by the bad sector?

The sector number is in the form nnn,nnn,nnn, a 9 digit number. It is revealed when doing a full backup.

Windows should mark the bad sector and not use it for data storage. If it completed the backup then your data should be good, however trying running chkdsk and check the fix system error box and scan for and attempt to correct bad sectors, then run your backup again and see if you get the error.   Having bad sectors isn't the end of the world, but it could be the beginning of the end for the hard drive.

 scokill's gear list:scokill's gear list
Nikon D610 Nikon Df Nikon AF-S DX Nikkor 16-85mm f/3.5-5.6G ED VR Nikon AF-S Nikkor 70-200mm f/2.8G ED VR II Nikon AF Nikkor 50mm f/1.8D +1 more
Reply   Reply with quote   Complain
Jim Cockfield
Forum ProPosts: 14,977
Like?
Zero fill the drive..
In reply to skyglider, Mar 9, 2013

Use the drive manufacturer's utility to zero fill the drive.

If it's a Seagate Drive, I'd use Seatools for DOS (you can download a bootable CD with it on it). Here's a direct link to the .iso you can burn to CD:

http://www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS223ALL.ISO

Here's it's user guide (the Erase Drive> Zero All choice is what I'd use first, then run the diagnostics programs on it to make sure it's OK):

http://www.seagate.com/files/support/seatools/SeaToolsDOSguide.pdf

Or, if it's a WD drive, I'd use their Data Lifeguard Diagnostics for DOS. Pick a drive and you'll see the bootable CD for it in the download list:

http://support.wdc.com/product/download.asp?lang=en

Both can zero fill a drive for you, and also have advanced diagnostics choices that can test all sectors on a drive and mark any with errors as bad in the drive controller's EEPROM (and I'd zero fill them first so that all sectors are written to before using the advanced diagnostics routines).

That way, when you run the extended diagnostics test, you'll have made sure that all sectors have been written to recently with bad sectors remapped to spares.

IOW, after you zero fill them (and the Seagate and WD bootable disks can do that for you), run the manufacturer's diagnostics programs included on them, which will test the drive for any further problems and remap any other problem sectors for you using spares setup for that purpose (doing in the drive controller's EEPROM, whereas file system utilities only mark them at file system level instead)

Then, see what the reports tell you, and if you decide to keep them, repartition the drives and reinstall everything from scratch.

If you're seeing errors from an Operating System (like Windows), then those errors have not been detected by the drive firmware yet.

Once the errors have been mapped out in drive firmware's EEPROM, you will no longer see any errors when using OS utilities (since those sectors have been mapped to spare sectors used for that purpose, versus the OS mapping them out as bad sectors at the file system level instead).

IOW, as far as the OS is concerned, you will no have any bad sectors once they're mapped out in the drive's firmware.

-- hide signature --

JimC
------

Reply   Reply with quote   Complain
skyglider
Veteran MemberPosts: 3,207Gear list
Like?
Re: How can I determine what a bad sector affects?
In reply to skyglider, Mar 9, 2013

skyglider wrote:

If the number of a bad sector on a spinner hard drive is known, is there any way to determine what is affected by the bad sector?

The sector number is in the form nnn,nnn,nnn, a 9 digit number. It is revealed when doing a full backup.

Malch, Scokill and Jim,

Thanks for your responses.

The backup program used is Acronis TrueImage 8, full backup of a Seagate IDE spinner done by a friend on his P4 PC.  My plan is to run Seagate's Seatools to determine the condition of the drive.  If it looks like only one sector (or a group of sectors in the same spot) is bad, then I'll do a long format and restore the backup.  If the test indicates that the drive is getting marginal, then I'll give him a used good Seagate IDE drive that I have.

When he did a backup a few days ago, Acronis indicated a bad sector and retries wouldn't work so he did an "ignore" error and the backup completed successfully.

The current question is what data is affected by the bad sector.

  1. If we know that, and the data is not important, then we can long format the drive and then restore the last backup with the ignored error. 
  2. If the data is important, then he can save all important data that was saved since his last "error free" backup, do a long format of the drive, and then restore his last "error free" backup.

So I just want to find out what that bad sector affects so we can decide on which course of action to take.  If we can't find what is affected by the bad sector, then I'll help him do step-2.

Thanks,
Sky

Reply   Reply with quote   Complain
malch
Forum ProPosts: 10,805
Like?
Re: How can I determine what a bad sector affects?
In reply to skyglider, Mar 9, 2013

skyglider wrote:

The current question is what data is affected by the bad sector.

Assuming the partition is NTFS, try downloading this package:

http://support.microsoft.com/kb/253066/en-us

Then extract:

Windows NT File System (NTFS) File Sector Information Utility.
A tool used to dump information about an NTFS volume, and determine which volume and file contains a particular sector.

I'm guessing that you may have some issues reconciling the manner in which the different programs reference/number the disk sectors but maybe they'll agree on some convention or another

Reply   Reply with quote   Complain
skyglider
Veteran MemberPosts: 3,207Gear list
Like?
Re: How can I determine what a bad sector affects?
In reply to malch, Mar 9, 2013

malch wrote:

skyglider wrote:

The current question is what data is affected by the bad sector.

Assuming the partition is NTFS, try downloading this package:

http://support.microsoft.com/kb/253066/en-us

Then extract:

Windows NT File System (NTFS) File Sector Information Utility.
A tool used to dump information about an NTFS volume, and determine which volume and file contains a particular sector.

I'm guessing that you may have some issues reconciling the manner in which the different programs reference/number the disk sectors but maybe they'll agree on some convention or another

Thanks Malch.  Was hoping for something simple that would just tell us which file is affected by the bad sector.  I'll give that software a try and see if it's not too complicated.

Thanks for the help,
Sky

Reply   Reply with quote   Complain
Randalluh796
New MemberPosts: 4
Like?
Re: How can I determine what a bad sector affects?
In reply to skyglider, Mar 27, 2013

From now on, you should learn to back up your data regularly, if you don't want to loss your data as this drive is failing.

Hope these words could help you.

Reply   Reply with quote   Complain
skyglider
Veteran MemberPosts: 3,207Gear list
Like?
Re: How can I determine what a bad sector affects?
In reply to Randalluh796, Mar 27, 2013

Randalluh796 wrote:

From now on, you should learn to back up your data regularly, if you don't want to loss your data as this drive is failing.

Hope these words could help you.

Evidently you did not read this thread.  It's a friend that had the bad sector problem, not me.  And BTW, he does do regular backups so he did have a recent one to fall back on.  I won't explain further since the data is already in this thread.  Maybe reading the entire thread before giving a lecture might be a good idea.

Sky (Who does do regular backups and taught friends I support to do the same.)

Reply   Reply with quote   Complain
Sean Nelson
Forum ProPosts: 10,531
Like?
Re: How can I determine what a bad sector affects?
In reply to malch, Mar 27, 2013

malch wrote:

If the drive (firmware) knows about this bad sector, it's already been mapped out and isn't being used for data.

scokill wrote:

Windows should mark the bad sector and not use it for data storage.

If data in a sector has "gone bad" since it was written, then the drive will report an error whenever you try to read the data.   The drive marks the sector as "pending", which means it needs to be remapped but still contains data that hasn't been read.   The sector will remain in this "pending" status until new data is written into it.

This is done because there's still the chance that the data in the sector can be successfully read, and until the sector is overwritten the drive's responsibility is to retain the data.  So it won't remap sectors until it's able to either (a) successfully read the data from the sector (at which time it will copy it to a spare), or (b) overwrite the sector with the new data supplied by the user/software/OS (at which time it will also write the data to a spare).

You can tell if a drive has bad sectors like this by looking at the SMART data and checking the "pending sector" count.

The way to identify the bad file is to read all of the files on the disk and see which one gives an error message.   You'd need to do this using a file-based read method, as opposed to an image-read method.  A backup program that does file-by-file backups should tell you, as long as you can force it to back up every file on the disk.

Reply   Reply with quote   Complain
MikeFromMesa
Senior MemberPosts: 2,849
Like?
Re: How can I determine what a bad sector affects?
In reply to skyglider, Mar 27, 2013

skyglider wrote:

If the number of a bad sector on a spinner hard drive is known, is there any way to determine what is affected by the bad sector?

That is a very interesting question.

Files are stored on a hard disc in linked list format. Pick up the FAT file entry and you can follow it to each sector on the disc and determine what sector it is. I don't know if the file blocks are stored as a singly linked list or a doubly linked list. If the latter, then you should be able to start at any block and follow it back to the file name for that block. If the former you will have to follow each file to find out what blocks make up that file.

There should be a utility available somewhere on the internet to do this, but I don't know. I will do some searching. What OS are you using (you mentioned Acronis TI 8 so I am guessing it is something before Windows 7).

Reply   Reply with quote   Complain
MikeFromMesa
Senior MemberPosts: 2,849
Like?
Re: How can I determine what a bad sector affects?
In reply to MikeFromMesa, Mar 27, 2013

MikeFromMesa wrote:

There should be a utility available somewhere on the internet to do this, but I don't know. I will do some searching.

http://www.tomshardware.com/forum/116723-45-relate-physical-disk-block-segment-file-name

http://smartmontools.sourceforge.net/badblockhowto.html

The second entry is somewhat technical and may be of limited use to you.

Don't know if either of these will actually help.

Reply   Reply with quote   Complain
skyglider
Veteran MemberPosts: 3,207Gear list
Like?
Final results
In reply to skyglider, Mar 27, 2013

Not having found a simple program that would just scan the entire hard drive and then list file names that contained bad sectors, here's what we ended up doing:

  1. My friend noted the date of his last error free backup (which was recent).
  2. He saved any files that he worked on since the last good backup.
  3. Located and saved his Outlook Express folder (WinXP).
  4. Gave him a known good IDE hard drive that I had, and replaced the problem HDD with it.
  5. Restored his last good Acronis backup on the replacement HDD.
  6. Manually restored the files he saved in step-2.
  7. Renamed the restored Outlook Express folder (step-5) with an "Old" suffix.
  8. Copied the saved Outlook Express folder (step-3) to the replacement HDD.
  9. Back up and running.
  10. Did a full hard drive backup and no errors or bad sectors were detected.

STEPS 7 & 8:
I renamed the Outlook Express folder in step-7 to keep that known good folder (but with outdated emails) in case the restored Outlook Express folder with all latest emails (step-8) has problems.  But since the Outlook Express folder was saved in step-3 without any sector read errors, it should be fine.  He can delete the old Outlook Express folder later when he wants to.

Thanks to all for your input, and to MikeFromMesa for taking the time to research and post his links,
Sky

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads