• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Formatting vs zero-filling

Joined
Jan 5, 2014
Messages
8 (0.00/day)
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
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
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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.
 

r9

Joined
Jul 28, 2008
Messages
3,300 (0.57/day)
System Name Primary|Secondary|Poweredge r410|Dell XPS|SteamDeck
Processor i7 11700k|i7 9700k|2 x E5620 |i5 5500U|Zen 2 4c/8t
Memory 32GB DDR4|16GB DDR4|16GB DDR4|32GB ECC DDR3|8GB DDR4|16GB LPDDR5
Video Card(s) RX 7800xt|RX 6700xt |On-Board|On-Board|8 RDNA 2 CUs
Storage 2TB m.2|512GB SSD+1TB SSD|2x256GBSSD 2x2TBGB|256GB sata|512GB nvme
Display(s) 50" 4k TV | Dell 27" |22" |3.3"|7"
VR HMD Samsung Odyssey+ | Oculus Quest 2
Software Windows 11 Pro|Windows 10 Pro|Windows 10 Home| Server 2012 r2|Windows 10 Pro
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.00/day)
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
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
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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.00/day)
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
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
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
In which case, it is doing what @r9 said and marking the sectors bad in the device itself.
 

r9

Joined
Jul 28, 2008
Messages
3,300 (0.57/day)
System Name Primary|Secondary|Poweredge r410|Dell XPS|SteamDeck
Processor i7 11700k|i7 9700k|2 x E5620 |i5 5500U|Zen 2 4c/8t
Memory 32GB DDR4|16GB DDR4|16GB DDR4|32GB ECC DDR3|8GB DDR4|16GB LPDDR5
Video Card(s) RX 7800xt|RX 6700xt |On-Board|On-Board|8 RDNA 2 CUs
Storage 2TB m.2|512GB SSD+1TB SSD|2x256GBSSD 2x2TBGB|256GB sata|512GB nvme
Display(s) 50" 4k TV | Dell 27" |22" |3.3"|7"
VR HMD Samsung Odyssey+ | Oculus Quest 2
Software Windows 11 Pro|Windows 10 Pro|Windows 10 Home| Server 2012 r2|Windows 10 Pro
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.00/day)
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
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?
 

r9

Joined
Jul 28, 2008
Messages
3,300 (0.57/day)
System Name Primary|Secondary|Poweredge r410|Dell XPS|SteamDeck
Processor i7 11700k|i7 9700k|2 x E5620 |i5 5500U|Zen 2 4c/8t
Memory 32GB DDR4|16GB DDR4|16GB DDR4|32GB ECC DDR3|8GB DDR4|16GB LPDDR5
Video Card(s) RX 7800xt|RX 6700xt |On-Board|On-Board|8 RDNA 2 CUs
Storage 2TB m.2|512GB SSD+1TB SSD|2x256GBSSD 2x2TBGB|256GB sata|512GB nvme
Display(s) 50" 4k TV | Dell 27" |22" |3.3"|7"
VR HMD Samsung Odyssey+ | Oculus Quest 2
Software Windows 11 Pro|Windows 10 Pro|Windows 10 Home| Server 2012 r2|Windows 10 Pro
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
887 (0.16/day)
Processor Intel Core i3-8100
Motherboard ASRock H370 Pro4
Cooling Cryorig M9i
Memory 16GB G.Skill Aegis DDR4-2400
Video Card(s) Gigabyte GeForce GTX 1060 WindForce OC 3GB
Storage Crucial MX500 512GB SSD
Display(s) Dell S2316M LCD
Case Fractal Design Define R4 Black Pearl
Audio Device(s) Realtek ALC892
Power Supply Corsair CX600M
Mouse Logitech M500
Keyboard Lenovo KB1021 USB
Software Windows 10 Professional x64
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
2,323 (0.52/day)
System Name msdos
Processor 8086
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
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".
 

r9

Joined
Jul 28, 2008
Messages
3,300 (0.57/day)
System Name Primary|Secondary|Poweredge r410|Dell XPS|SteamDeck
Processor i7 11700k|i7 9700k|2 x E5620 |i5 5500U|Zen 2 4c/8t
Memory 32GB DDR4|16GB DDR4|16GB DDR4|32GB ECC DDR3|8GB DDR4|16GB LPDDR5
Video Card(s) RX 7800xt|RX 6700xt |On-Board|On-Board|8 RDNA 2 CUs
Storage 2TB m.2|512GB SSD+1TB SSD|2x256GBSSD 2x2TBGB|256GB sata|512GB nvme
Display(s) 50" 4k TV | Dell 27" |22" |3.3"|7"
VR HMD Samsung Odyssey+ | Oculus Quest 2
Software Windows 11 Pro|Windows 10 Pro|Windows 10 Home| Server 2012 r2|Windows 10 Pro
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.
 

r9

Joined
Jul 28, 2008
Messages
3,300 (0.57/day)
System Name Primary|Secondary|Poweredge r410|Dell XPS|SteamDeck
Processor i7 11700k|i7 9700k|2 x E5620 |i5 5500U|Zen 2 4c/8t
Memory 32GB DDR4|16GB DDR4|16GB DDR4|32GB ECC DDR3|8GB DDR4|16GB LPDDR5
Video Card(s) RX 7800xt|RX 6700xt |On-Board|On-Board|8 RDNA 2 CUs
Storage 2TB m.2|512GB SSD+1TB SSD|2x256GBSSD 2x2TBGB|256GB sata|512GB nvme
Display(s) 50" 4k TV | Dell 27" |22" |3.3"|7"
VR HMD Samsung Odyssey+ | Oculus Quest 2
Software Windows 11 Pro|Windows 10 Pro|Windows 10 Home| Server 2012 r2|Windows 10 Pro
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
2,323 (0.52/day)
System Name msdos
Processor 8086
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
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.
 

NviGate Systems

New Member
Joined
Oct 24, 2015
Messages
7 (0.00/day)
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.
 
Top