Question Software for formatting an HDD with bad sectors

Pimpom

Distinguished
This is essentially a technical exercise. I'm not trying to use a defective HDD for storing important data.

Someone handed me a 1TB WD hard disk that was given to him by someone else. It obviously has some bad sectors, maybe a lot of them. We're both curious to see what can be done with it and are willing to allocate some computer time to it. I have a spare system for such experiments.

The question is about the best program for the job. Ideally, I'd like to use a program that will format the drive, mark bad sectors as bad and move on without making a valiant effort to recover/repair the bad sectors - in other words, without wasting a lot of time on the bad sectors.

Can anyone please suggest such a program?
 
If I were doing data recovery under Linux, then I'd start by using "dd" to read all sectors and to insert NULL for missing or unreadable data. Then loopback mount the image and clone it to an actual hard drive or repair it (you can treat loopback as if it is a real disk, which means you can loopback entire disks or partitions; you can even use "dd" to clone a partition of a loopback mounted entire disk). It would be possible to automate this with a simple bash script. Reading will not be fast though, this takes a long time since it is all synchronous.
 
This is essentially a technical exercise. I'm not trying to use a defective HDD for storing important data.

Someone handed me a 1TB WD hard disk that was given to him by someone else. It obviously has some bad sectors, maybe a lot of them. We're both curious to see what can be done with it and are willing to allocate some computer time to it. I have a spare system for such experiments.

The question is about the best program for the job. Ideally, I'd like to use a program that will format the drive, mark bad sectors as bad and move on without making a valiant effort to recover/repair the bad sectors - in other words, without wasting a lot of time on the bad sectors.

Can anyone please suggest such a program?
Why not just start with a Full format in Windows File Explorer?

Ultimately, though, this is a wasted exercise.

If <whatever software> marks 100 sectors as 'bad' today....that will grow to 200 by this time tomorrow.
 
Can anyone please suggest such a program?
Victoria - scan with remap option.

remont-gestkogo-diska.jpg


Download link at the bottom of the page.
 
I would just delete the partitions using diskpart.exe
then do a full format (it might take hours)

but do note: even if you quick format the drive, windows will start a background process after 5 minutes of idle and it will attempt to read each sector and will mark the bad sectors as bad. So you could just turn off sleep and leave the system powered overnight and windows should have finished looking for bad sectors by the next day. if sleep is enabled it can take days to complete. if you have any data on the drive, windows will attempt to recover the data before marking the sectors as bad. deleting the partitions and creating a new partition will speed up the process since windows will not have to attempt to reread bad sectors over and over to get a clean copy.
 
If I were doing data recovery under Linux, then I'd start by using "dd" to read all sectors and to insert NULL for missing or unreadable data. Then loopback mount the image and clone it to an actual hard drive or repair it (you can treat loopback as if it is a real disk, which means you can loopback entire disks or partitions; you can even use "dd" to clone a partition of a loopback mounted entire disk). It would be possible to automate this with a simple bash script. Reading will not be fast though, this takes a long time since it is all synchronous.
Interesting, but this is not about recovering data. There's nothing in the drive that means anything to me or the present owner. It's an experiment about restoring the drive as a storage medium. Not that I'll use it to store anything remotely important.
 
Why not just start with a Full format in Windows File Explorer?
The problem is that, from past experience, Windows full format seems to spend a lot of time when it encounters a bad sector, probably making sure it really is bad beyond restoring. Surface scanning spends even more time trying to recover data from bad sectors.
Ultimately, though, this is a wasted exercise.

If <whatever software> marks 100 sectors as 'bad' today....that will grow to 200 by this time tomorrow.
Sure, that happens with a disk that's been subjected to abuse or is simply worn out. But there are cases where a few bad sectors are created by improper shutdown, unexpected loss of power to the drive, etc. I've known cases where such drives went on to serve faithfully for several more years.
 
Sure, that happens with a disk that's been subjected to abuse or is simply worn out. But there are cases where a few bad sectors are created by improper shutdown, unexpected loss of power to the drive, etc. I've known cases where such drives went on to serve faithfully for several more years.
I've had that happen on a 16TB Toshiba Enterprise that was 7 months old.
Sitting in my QNAP NAS, never abused.
Went from 0 to 14k+ bad sectors in about a week.

The above linked Victoria software would be a good place to start.
 
I would just delete the partitions using diskpart.exe
then do a full format (it might take hours)

but do note: even if you quick format the drive, windows will start a background process after 5 minutes of idle and it will attempt to read each sector and will mark the bad sectors as bad. So you could just turn off sleep and leave the system powered overnight and windows should have finished looking for bad sectors by the next day. if sleep is enabled it can take days to complete. if you have any data on the drive, windows will attempt to recover the data before marking the sectors as bad. deleting the partitions and creating a new partition will speed up the process since windows will not have to attempt to reread bad sectors over and over to get a clean copy.
Agree with all that. I was wondering if there's a program that could be instructed to ignore existing data and also not try to refresh or recover bad sectors.
 
But there are cases where a few bad sectors are created by improper shutdown, unexpected loss of power to the drive, etc. I've known cases where such drives went on to serve faithfully for several more years.
Those are not bad sectors, they are flagged as weak or even bad sectors but running scans on them will "recover" them, make the drives firmware realise that they are fine.

Also another good app is hd sentinel, you can do a surface scan which will show you where the bad sectors are, if they are all together you can just partition around them, make partitions but leave the damaged area as un allocated.
 
Those are not bad sectors, they are flagged as weak or even bad sectors but running scans on them will "recover" them, make the drives firmware realise that they are fine.
I beg to differ. Besides my experiences with other people's HDDs, I once had a drive that was damaged by a severe power fluctuation that got past the UPS while I was using it. A surface scan detected and marked them so that they didn't cause any problem afterwards.

HDTune still showed them in two spots on the 50x50 grid. The two spots probably represented many sectors each. I used the drive for a couple of years more until I felt that it was prudent to replace it. It still serves as a backup.
Also another good app is hd sentinel, you can do a surface scan which will show you where the bad sectors are, if they are all together you can just partition around them, make partitions but leave the damaged area as un allocated.
Thanks for the suggestion. I've heard about HD Sentinel and probably have a copy somewhere.
 
In my experience, if lots of bad sectors are scattered throughout a drive, they tend to grow over time. I always thought this could be because bits of loose media were bouncing around in there, eventually sandblasting other areas.

But often, a huge number of bad sectors are located in one area, even the entire side of one platter (which could be due to a misaligned or defective head on that side, which should not affect the reliability or performance of the rest). You can format the drive, then note where it fails to progress further. Create a partition up to just before that point and trial-and-error try to find the end of the bad area to make a 2nd partition which will never be formatted, then a 3rd partition for the rest of the good space.

If you know the basic configuration of the drive, as in how many platters it has from datasheets or reviews and can arrive at the drive capacity using some number of sides (note that not every side may be used so a three-platter disk may only be using 5 sides and have 5 heads), then it would be simple to use a little math to exclude an entire side of a platter from the 1st and 3rd partitions if you find it fails starting right at where the leading edge of a platter side should be. This technique may require some time but not anything more than the usual format and partitioning tools.

If you just hammer the drive with something like SpinRite trying to use bad areas until the firmware uses up all spare sectors for remapping, then it will just trip a SMART failure
 
I beg to differ. Besides my experiences with other people's HDDs, I once had a drive that was damaged by a severe power fluctuation that got past the UPS while I was using it.
Nobody said that all bad sectors are the same, also power surge is much different from the examples that I responded to which where just system shut down or power off.

I'm just saying that if you have bad sectors due to power or disconnects in general it's worth it to do some scans, because those can be fixed, that doesn't mean that actual bad sectors will be fixed.
 
Something to keep in mind: unless the software performs a remapping to spare sectors, marking the sectors as bad is "volatile". It just gets stored in the file allocation table. If you format the drive again later with a quick format or repartition it, those bad sectors are no longer marked bad and you have to do a full format again or run a full disk check (chkdsk /r) so they can be flagged in the table again. Normal disk checking software like chkdsk doesn't do any physical remapping/reallocation. A full SMART scan might do it, too, but you have little visibility into what happens with those.

Most scanning software is going to attempt at least some re-reads to determine whether a sector is actually bad. They won't just check it once and if there's an error assume it's bad, since other factors could cause an error. It's just a matter of how determined the software is about trying to read it. (Apparently chkdsk doesn't have a set number of retries, and Microsoft doesn't make public how the software determines the number in any particular scan.) Plus the drive itself makes some attempts to re-read a sector if there's an error, the number of which will vary by manufacturer.

SpinRite simply pounds on a sector that it thinks is bad until the drive's own firmware kicks in and remaps it. The descriptions of Victoria that I find aren't specific, but it really sounds like that's all it does as well for the remap option. If you don't use the remap option, it just does the same type of volatile marking of the sector that chkdsk does. Victoria though is maybe a bit more sensitive as it uses response times to judge whether a sector is weak (which probably indicates only that the drive itself had to re-read the sector), while chkdsk depends on the data being unreadable or corrupted entirely.
 
Interesting, but this is not about recovering data. There's nothing in the drive that means anything to me or the present owner. It's an experiment about restoring the drive as a storage medium. Not that I'll use it to store anything remotely important.
Long ago I worked on testing of mainframe hard drives (back when Fred Flintstone was young). It is rare that there is a sector failure or bad block without the disk surface itself failing. That failure means microscopic chips are coming off of the surface. In and of itself, that could leave the rest of the disk platter functional, but in reality...since the platters are mechanical and spinning...it means that the failed material is now an abrasive. Once this starts, if you have a way to view inside of the drive, you can literally watch parts of the surface suddenly go shiny, which means an entire cylinder failing. The rate of failing blocks or sectors would be expected to grow exponentially. You could do this just as an experiment, but the reality is that you can no longer trust such a device.
 

TRENDING THREADS