• We've upgraded our forums. Please post any issues/requests in this thread.

Formatting vs zero-filling

Joined
Jan 5, 2014
Messages
8 (0.01/day)
Likes
0
System Name win7
Processor G2020
Motherboard H61M-S2PV
Cooling BOX
Memory 4 GB ddr3
Video Card(s) Intel HD graphics (gt710 lies in my drawer)
Storage HDD Baracuda 500GB
Power Supply quality 350 Watt
Mouse MOP-70D
Keyboard KR-85
#1
Hello

I'd like to have a question to a hdd whizz. I can often read that zero-filling is good for slow and bad sectors (not physical bad sectors that can not be repaired). I can't understand why zero-filling is better than just formatting when it comes to dealing with bad sectors.

My chain of thoughts:
After formatting OS sees a disk/partition as free space, free to use. If there were some bad sectors before, logical problems, new data will be written to that space/disk/partition because that space is blank for OS. So why zero-filling would be better when it comes to dealing with bad sectors? Why is this better than just formatting?

Thx
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,905 (6.25/day)
Likes
10,000
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#2
Bad sectors are unusable so they can't be written to. Whatever data is there is what remains when the sectors were marked bad.

I think you're actually talking about three things here:
-Quick Format: writes a new file system to the drive. All data that isn't overwritten still exists but can't easily be accessed.
-Full Format: Writes a new file system to the drive and also attempts to access all sectors on the drive to verify they're good. Data generally doesn't survive this process but could.
-Erase: ignores the file system and writes data to all sectors for the purpose of destroying existing data. If the drive is to be used again, it needs to be formatted.

If you want to destroy data and mark bad sectors, do an erase then full format.

In relation to bad sectors, quick and full format "deal with" them the same. The difference is in whether all bad sectors are found before the drive is put in service or if they are found while the drive is in service.
 
Joined
Jul 28, 2008
Messages
2,525 (0.74/day)
Likes
506
System Name Desktop | Poweredge r410
Processor i5 6500 4.5GHz@1.275V | 2 x E5620 @2.4GHz
Motherboard ASRock Fatal1ty Gaming | Intel 5500
Memory 16GB DDR4 2400MHz | 32GB ECC DDR3
Video Card(s) RX480 8GB |On-Board
Storage 250GB SSD + 512GB SSD|4x320GB
Display(s) 27" Dell + 2 x 24" LCD Setup
Case Fractal Design Define Nano S
Software Windows 10 | Server 2012 r2
#3
Bad sector is just part of the disk that lost the magnetic properties to store data.
Every platter drive has spare dedicated space for relocating bad sectors.
Every time hdd S.M.A.R.T detects bad sector, marks the sector and relocates it to the spare.
As long there is free spare space this bad sectors not gonna be an issue and they can't be detected with application.
Real bad sectors appear after the spare space is used up.
What apps like hdd regenerator do is re-check the marked sectors for the sectors that might be still used, that are still usable or were falsely marked.
Also they try multiple to wright 0/1 multiple times and check if it can store it.
What I've done in the past is if the bad sectors are on the beginning of the disk I would partition the disk in a way that I leave that space as unpartitioned.
I would not use that drive for storing important data.
My advice to you is once they start appearing its time to back up and move on.

Hello

I'd like to have a question to a hdd whizz. I can often read that zero-filling is good for slow and bad sectors (not physical bad sectors that can not be repaired). I can't understand why zero-filling is better than just formatting when it comes to dealing with bad sectors.

My chain of thoughts:
After formatting OS sees a disk/partition as free space, free to use. If there were some bad sectors before, logical problems, new data will be written to that space/disk/partition because that space is blank for OS. So why zero-filling would be better when it comes to dealing with bad sectors? Why is this better than just formatting?

Thx
 
Joined
Jan 5, 2014
Messages
8 (0.01/day)
Likes
0
System Name win7
Processor G2020
Motherboard H61M-S2PV
Cooling BOX
Memory 4 GB ddr3
Video Card(s) Intel HD graphics (gt710 lies in my drawer)
Storage HDD Baracuda 500GB
Power Supply quality 350 Watt
Mouse MOP-70D
Keyboard KR-85
#4
Thanks for additional info. But what I am curious about is:
1. Does it make sense to do zerofilling when there are bad sectors or slow sectors (>500ms) on disk?

Every time hdd S.M.A.R.T detects bad sector, marks the sector and relocates it to the spare.
OK; but it is possible that there are bad sectors not yet detected by SMART system.
2. What does software like mhdd or hdd regenerator do when they find a bad sector during scanning. What is the procedure?
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,905 (6.25/day)
Likes
10,000
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#5
1. Yes if the purpose is erasing it. No otherwise. Erasing software will find bad sectors in the process of erasing and notify the user. The user can ignore those sectors or, the best solution, is to stop the erase and physically shred the drive.

2. They mark the file system (e.g. NTFS) to not use those sectors.
 
Joined
Jan 5, 2014
Messages
8 (0.01/day)
Likes
0
System Name win7
Processor G2020
Motherboard H61M-S2PV
Cooling BOX
Memory 4 GB ddr3
Video Card(s) Intel HD graphics (gt710 lies in my drawer)
Storage HDD Baracuda 500GB
Power Supply quality 350 Watt
Mouse MOP-70D
Keyboard KR-85
#6
Ad2. but scanning for bad sectors is also possible when there is no file system (parition not formated / no partition tabe etc.).
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,905 (6.25/day)
Likes
10,000
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#7
In which case, it is doing what @r9 said and marking the sectors bad in the device itself.
 
Joined
Jul 28, 2008
Messages
2,525 (0.74/day)
Likes
506
System Name Desktop | Poweredge r410
Processor i5 6500 4.5GHz@1.275V | 2 x E5620 @2.4GHz
Motherboard ASRock Fatal1ty Gaming | Intel 5500
Memory 16GB DDR4 2400MHz | 32GB ECC DDR3
Video Card(s) RX480 8GB |On-Board
Storage 250GB SSD + 512GB SSD|4x320GB
Display(s) 27" Dell + 2 x 24" LCD Setup
Case Fractal Design Define Nano S
Software Windows 10 | Server 2012 r2
#8
Thanks for additional info. But what I am curious about is:
1. Does it make sense to do zerofilling when there are bad sectors or slow sectors (>500ms) on disk?

I don't think that will help.

OK; but it is possible that there are bad sectors not yet detected by SMART system.
2. What does software like mhdd or hdd regenerator do when they find a bad sector during scanning. What is the procedure?
I would assume there is error correction when reading data once it goes above set threshold it get marked as bad and relocated.

Apps like hdd regenerator do what smart does but trying to recover some of the sectors that are not as bad, and its not depended on the hdd have file system or not.
Apps like check disk mark the bad sectors in the partition table. So if you scan and "repair" and then format the drive the bad sectors will became available again.
To prolong the life
1. scan and repair with hdd regenerator.
2. leave the affected area as unpartitioned space.
 
Joined
Jan 5, 2014
Messages
8 (0.01/day)
Likes
0
System Name win7
Processor G2020
Motherboard H61M-S2PV
Cooling BOX
Memory 4 GB ddr3
Video Card(s) Intel HD graphics (gt710 lies in my drawer)
Storage HDD Baracuda 500GB
Power Supply quality 350 Watt
Mouse MOP-70D
Keyboard KR-85
#9
Apps like check disk mark the bad sectors in the partition table. So if you scan and "repair" and then format the drive the bad sectors will became available again.
Sorry for keeping asking, but formatting does not affect partition table. So if the information about bad sectors chkdsk keeps in partition table formatting will not affect them (will not affect info on where bad sectors are). Right?
 
Joined
Jul 28, 2008
Messages
2,525 (0.74/day)
Likes
506
System Name Desktop | Poweredge r410
Processor i5 6500 4.5GHz@1.275V | 2 x E5620 @2.4GHz
Motherboard ASRock Fatal1ty Gaming | Intel 5500
Memory 16GB DDR4 2400MHz | 32GB ECC DDR3
Video Card(s) RX480 8GB |On-Board
Storage 250GB SSD + 512GB SSD|4x320GB
Display(s) 27" Dell + 2 x 24" LCD Setup
Case Fractal Design Define Nano S
Software Windows 10 | Server 2012 r2
#10
Sorry for keeping asking, but formatting does not affect partition table. So if the information about bad sectors chkdsk keeps in partition table formatting will not affect them (will not affect info on where bad sectors are). Right?
Formatting re-wrights the partition table so the bad sectors will not be marked as bad.
So the data that gets saved on that space will get corrupt.
 
Joined
Nov 2, 2008
Messages
766 (0.23/day)
Likes
414
Processor Intel Core i3-4370
Motherboard Gigabyte GA-H97-D3H
Cooling Zalman CNPS9500 AT
Memory 16GB Crucial Ballistix Sport DDR3-1600
Video Card(s) Gigabyte GV-N75TOC-2GI GeForce GTX 750 Ti WindForce
Storage Crucial MX100 256GB SSD
Display(s) Acer G245HQ 23.6" LCD
Case Fractal Design Define R4 Black Pearl
Audio Device(s) Realtek ALC1150
Power Supply Corsair CX600M
Mouse Logitech M500
Keyboard Lenovo KB1021 USB
Software Windows 10 Professional x64
#11
Formatting re-wrights the partition table so the bad sectors will not be marked as bad.
So the data that gets saved on that space will get corrupt.
Uh, no. If a bad sector has already been locked-out by the drive, then formatting the drive will not put that sector back into use. The drive will not let the file system access known bad sectors.

If a bad sector has not been locked out by the drive, then formatting the drive may not detect it. That would leave it in use and could result in corrupted data.

The idea behind zero-filling the sectors is two fold. First, it overwrites any data in the sectors. Second, if a sector is bad but not already locked out, then attempting to write zeros to it should bring the bad sector to the drive's attention, and it will be locked out then.
 
Joined
Feb 14, 2012
Messages
1,679 (0.79/day)
Likes
571
System Name msdos
Processor 8088
Motherboard mainboard
Cooling passive
Memory 640KB + 384KB extended
Video Card(s) EGA
Storage 5.25"
Display(s) 80x25
Case plastic
Audio Device(s) modchip
Power Supply 45 watts
Mouse serial
Keyboard yes
Software disk commander
Benchmark Scores still running
#12
If the HDD knows about a bad sector, when it is written again, it is remapped. Quick formatting doesn't write all the sectors. The sectors are not "locked out", they are remapped, until the remap table is full, then the drive "fails".
 
Joined
Jul 28, 2008
Messages
2,525 (0.74/day)
Likes
506
System Name Desktop | Poweredge r410
Processor i5 6500 4.5GHz@1.275V | 2 x E5620 @2.4GHz
Motherboard ASRock Fatal1ty Gaming | Intel 5500
Memory 16GB DDR4 2400MHz | 32GB ECC DDR3
Video Card(s) RX480 8GB |On-Board
Storage 250GB SSD + 512GB SSD|4x320GB
Display(s) 27" Dell + 2 x 24" LCD Setup
Case Fractal Design Define Nano S
Software Windows 10 | Server 2012 r2
#13
Uh, no. If a bad sector has already been locked-out by the drive, then formatting the drive will not put that sector back into use. The drive will not let the file system access known bad sectors.

If a bad sector has not been locked out by the drive, then formatting the drive may not detect it. That would leave it in use and could result in corrupted data.

The idea behind zero-filling the sectors is two fold. First, it overwrites any data in the sectors. Second, if a sector is bad but not already locked out, then attempting to write zeros to it should bring the bad sector to the drive's attention, and it will be locked out then.
I was referring to sectors that being mapped as bad by the apps like chkdsk not the drive it self.
I already said that drive mapped bad sectors can't be detected by diagnostic app.
You can read the SMART status but thats different.
 
Joined
Jul 28, 2008
Messages
2,525 (0.74/day)
Likes
506
System Name Desktop | Poweredge r410
Processor i5 6500 4.5GHz@1.275V | 2 x E5620 @2.4GHz
Motherboard ASRock Fatal1ty Gaming | Intel 5500
Memory 16GB DDR4 2400MHz | 32GB ECC DDR3
Video Card(s) RX480 8GB |On-Board
Storage 250GB SSD + 512GB SSD|4x320GB
Display(s) 27" Dell + 2 x 24" LCD Setup
Case Fractal Design Define Nano S
Software Windows 10 | Server 2012 r2
#14
If the HDD knows about a bad sector, when it is written again, it is remapped. Quick formatting doesn't write all the sectors. The sectors are not "locked out", they are remapped, until the remap table is full, then the drive "fails".
I will quite myself on this one.
Bad sector is just part of the disk that lost the magnetic properties to store data.
Every time hdd S.M.A.R.T detects bad sector, marks the sector and relocates it to the spare.
As long there is free spare space this bad sectors not gonna be an issue and they can't be detected with application.
Real bad sectors appear after the spare space is used up.
 
Joined
Feb 14, 2012
Messages
1,679 (0.79/day)
Likes
571
System Name msdos
Processor 8088
Motherboard mainboard
Cooling passive
Memory 640KB + 384KB extended
Video Card(s) EGA
Storage 5.25"
Display(s) 80x25
Case plastic
Audio Device(s) modchip
Power Supply 45 watts
Mouse serial
Keyboard yes
Software disk commander
Benchmark Scores still running
#15
I will quite myself on this one ... Every time hdd S.M.A.R.T detects bad sector, marks the sector and relocates it to the spare.
That relocation happens when the sector is written, afaik.
 
Joined
Oct 24, 2015
Messages
7 (0.01/day)
Likes
4
#16
The SATA specification only allows a sector to be re-mapped once the drive is told to write data to a sector. The reason for this is that if valuable information is held in that sector, there is still a chance ECC can recover the data.

There are utilities which read the data, then write it to a different sector, then force writing data to the bad sector, making the controller disable that bad spot.

If you have a drive that is slow with weak sectors (bad sectors that are pending re-map) then a full format (not quick format) will force the drive to remap those sectors because by writing to the drive, you in essence telling the drive: "I am writing to this area so I obviously no longer need whatever data is there", in which case the drive marks the area(s) as bad and never uses them again.

I've seen drives with pending sectors (anywhere from 6 to 32) after a full format to have thousands of pending sectors. So my best advice is to backup all data, do a full format of the disk then look at the SMART values again. If it remapped those sectors and no further sectors were found bad, then it likely was just an area that went bad. If suddenly more sectors start going pending, that tells you the drive is on it's way out.