Page 1 of 1

zero out harddisk sectors

Posted: Mon Mar 15, 2010 5:44 am
by blackoil
Does anyone ever use write long command to zero out sectors in modern hard disk?
there are annoying bad sectors in my harddisk.

I didn't find write long command in recent ATA-ATAPI documents.

Re: zero out harddisk sectors

Posted: Mon Mar 15, 2010 8:12 am
by Owen
Bad sectors means the hard disk is dying. Get a new one now.

(Oh, and once that's done, turn on SMART monitoring. It doesn't work all, or even most of the time, but when it does tell you the HDD is dying, it gets it right)

Re: zero out harddisk sectors

Posted: Mon Mar 15, 2010 8:21 am
by Solar
Mapping out bad sectors should be done by the HD firmware. Once you start to actually see them in everyday use:

Shut down your computer, get a new hard drive, and only boot up your computer again when you're ready to do the backup.

You might not have even that much time before something critical goes to digital nirvana.

Re: zero out harddisk sectors

Posted: Mon Mar 15, 2010 9:52 am
by blackoil
I think it's not real bad sectors.
if power loss occurs, when harddisk is writing, the sector ecc field may be bad.

I read a article from google, says there are 6 reasons caused bad sectors, only 2 of them are soft error.

I have ever fixed bad sectors in my old harddisk a few years ago.
Just call BIOS INT#13 writelong.

Re: zero out harddisk sectors

Posted: Mon Mar 15, 2010 10:10 am
by Owen
The hard disk will complete the sector write when it looses power on it's own stored energy & platter momentum. Preventing that from happening involves crowbaring the disk's power supply, something which is not very good for it in the first place.

On modern HDDs, visible bad sectors mean two possibilities:
  • Drive has ran out of space to remap bad sectors
  • The drive has been unable to remap that sector because it's completely unreadable
Both are indicators of a heavily degraded disk. If you want to know which, look at the SMART log; it will likely contain a message telling you what error the disk has encountered. I cannot stress enough, however, that the drive is not in good health.

EDIT: I suppose I should mention what crowbaring a power supply entails: Creating a dead short across a power supply. This is liable to discharge any capacitors powering any components, and any motors are going to stop instantly. Why the name? It's like dropping a crowbar across them ;-)

The effects on the disk? Firstly, massive strain on the motor and it's mounts (Slowing from rotating ~200g of metal from 7200RPM to stand still in a couple of milliseconds). Secondly, the heads do not get correctly parked, so any shocks can quite easily cause them to touch the drives surface. Finally, because the heads are free-floating as the disk comes to a halt, they can quite easily crash into and gouge the disk's surface.

Re: zero out harddisk sectors

Posted: Mon Mar 15, 2010 6:55 pm
by blackoil
so, that's why there is no write long command available.

Re: zero out harddisk sectors

Posted: Mon Mar 15, 2010 10:48 pm
by earlz
Owen wrote:The hard disk will complete the sector write when it looses power on it's own stored energy & platter momentum. Preventing that from happening involves crowbaring the disk's power supply, something which is not very good for it in the first place.

On modern HDDs, visible bad sectors mean two possibilities:
  • Drive has ran out of space to remap bad sectors
  • The drive has been unable to remap that sector because it's completely unreadable
Both are indicators of a heavily degraded disk. If you want to know which, look at the SMART log; it will likely contain a message telling you what error the disk has encountered. I cannot stress enough, however, that the drive is not in good health.

EDIT: I suppose I should mention what crowbaring a power supply entails: Creating a dead short across a power supply. This is liable to discharge any capacitors powering any components, and any motors are going to stop instantly. Why the name? It's like dropping a crowbar across them ;-)

The effects on the disk? Firstly, massive strain on the motor and it's mounts (Slowing from rotating ~200g of metal from 7200RPM to stand still in a couple of milliseconds). Secondly, the heads do not get correctly parked, so any shocks can quite easily cause them to touch the drives surface. Finally, because the heads are free-floating as the disk comes to a halt, they can quite easily crash into and gouge the disk's surface.
Your suppose to type `park` first(or that int13h command for parking the heads used by pre286 hardware) !! :P

Re: zero out harddisk sectors

Posted: Tue Mar 16, 2010 12:45 am
by Solar
Actually quite some research has gone into making HDD's parking their heads no matter what. But that's one of the things you should be happy about, not rely on.