Hard disks, which many of us still rely on, are mechanically driven and therefore more susceptible to failures. One issue that none of us wish to encounter is a problematic set of drives, commonly known as “bad sectors.” These can appear in both traditional magnetic hard disk drives (HDDs) and modern solid-state drives (SSDs), even affecting portable disks and USB sticks. While SSDs are generally less prone to this issue, hard disks often fall victim to it.
If a specific part of the drive becomes non-functional, it is termed as a bad sector. These unresponsive sectors do not heed read or write requests. Bad sectors can be categorized into two types: those arising from physical damage, which are irreparable, and those caused by software errors, which can be rectified. But what exactly are these bad sectors, and do they indicate impending drive failure? Let’s delve into the details.
A sector is the smallest physical subdivision or the minimal storage unit of a hard disk drive (HDD), solid-state drive (SSD), USB drive, CD-ROM, or any other storage medium. Functionally, a sector is the smallest independently addressable unit of storage on your drive. Problem areas, also referred to as bad blocks, do not respond to system requests, making past data unreadable or unwritable. In essence, they represent defective portions within a drive’s storage space.
We generally classify bad sectors into two categories: Physical Bad Sectors and Logical Bad Sectors.
Physical bad sectors result from damage to the drive’s recording media, including magnetic disks, optical disks, and NAND flash memory cells. Causes include manufacturing defects, magnetic abrasion, dust particles, worn flash memory cells of an SSD, or contact between the read/write heads and the platter. Unfortunately, such bad sectors are beyond repair. You may have encountered these issues on hard disks before if the read/write head has touched and damaged a particular area. This is especially problematic if the drive is moved or dropped while spinning. Additionally, dust may infiltrate a sector and cause malfunctions.
In contrast, logical bad sectors occur when a storage cluster fails to function correctly. Your operating system (OS) might attempt to read data from a drive sector and discover that its contents are inaccessible, with the error correction code (ECC) unable to correct it. These bad sectors, however, can be repaired. A bad sector, also known as a “soft” sector, may appear to malfunction, but some methods can fix it. Windows’ Disk Control tool is also capable of repairing such bad sectors.
Software-related issues are also a factor. For instance, bad sectors can develop if your computer shuts down unexpectedly during a data-writing process, perhaps due to a power outage. Viruses and other malware can also induce such system problems.
Your hard disk may have left the factory with bad sectors without your knowledge. Manufacturing processes are not infallible, and errors can occur, which is why solid-state drives often include some defective blocks. These are marked as defective and remapped to the SSD’s extra memory cells. Conversely, SSD blocks can wear out as data is continuously written to them, leading to remapping with the drive’s extra memory (overprovisioned). When this extra memory is exhausted, the drive’s capacity begins to diminish as sectors become unreadable.
For traditional magnetic hard drives, bad sectors can stem from physical damage. This could be due to manufacturing defects, natural wear and tear, or, in a worst-case scenario, the drive falling to the floor. When the drive head contacts the platter, numerous sectors can be damaged. Additionally, blocks may be harmed if air or dust infiltrates the hard drive’s sealed regions. Clearly, there are many potential causes. Let’s summarize them briefly:
Many drives are shipped with bad sectors. However, low-level formatting and subsequent marking of bad sectors are performed at the factory during the final manufacturing stages, so there’s no need to worry about this. The manufacturer maintains a record of bad sectors in one of two lists (primary defect list, P-LIST) on the drive. The hard drive electronics automatically ignore sectors in the defect list to prevent slowing down drive access.
On the other hand, marking bad sectors doesn’t end in production. Data loss is quite common on hard disks, and to prevent this, the disk checker routinely scans for problems during use. When bad sectors are detected, the controller documents them in the second list, the grown defect list (G-list).
When scanning data within bad sectors, the drive controllers recalculate the ECC of these sectors and compare it with previously recorded codes. If there’s no match, the controller attempts to recover the data. If the error is minimal and correctable, it is repaired using Self-Monitoring, Analysis, and Reporting Technology (SMART) counter 195 (Hardware ECC Correction).
If the controller cannot correct the error, SMART counter 198 (Offline Uncorrectable Sector Count) and counter 197 (Current Pending Sector Count) are applied until an attempt is made to write to the sector. When attempting to transfer data to a bad sector, the hard disk controller replaces it by allocating a new, empty sector from a spare pool. The defect flag and G-list are then updated to reflect that the bad sector has been reallocated.
Meanwhile, a final attempt can be made to read data from the original sector. If this attempt fails, the data is irretrievably lost. Advanced recovery attempts should be conducted before “writing” a suspected bad sector.
Every operating system offers disk scanning tools to detect bad sectors. Some tools can automatically initiate scans when they detect sudden shutdowns.
If you prefer to manually scan for bad sectors, here are some methods. Let’s begin with HD Tune Pro, a widely used tool across operating systems. HD Tune is proficient at this task, allowing you to scan both local drives installed in the system and external drives to detect errors.
Windows chkdsk is a built-in disk checking utility designed to scan your hard disk for bad sectors. It can mark physical bad sectors as bad and repair “soft” bad sectors, making the data within them readable again. The built-in tool is programmed to run automatically when Windows detects an error on your hard disk. You can also run the software manually at any time. Here is how to check for bad sectors:
Once the disk check completes, bad sectors on your hard drive will be marked as unreadable/unusable. Your operating system will then bypass these blocks accordingly.
Windows offers another built-in tool to scan for bad sectors:
You can use Linux badblocks as a standalone utility to detect bad blocks (sectors) on a disk partition. However, e2fsck -c or the appropriate fsck option for your file system is recommended first. This ensures that you check for bad sectors while leveraging your drive’s internal correction mechanisms.
Be cautious, as incorrect parameters can cause irreparable damage to your file system. The -c parameter performs a read-only test on the volume. For a non-destructive read-write test, use the -cc parameter.
When using -c or -cc, the entire list of bad blocks is rebuilt. If you wish to retain existing entries and only add new blocks to the list, enter -k (keep).
If you suspect drive or file system damage, include -p (preen). This command will automatically attempt to repair damage and notify you if it cannot fix detected errors.
You can scan and repair your drive using Mac Disk Utility’s First Aid. Although you may not be able to fix some bad sectors, you can allocate storage space for them to prevent new data from being stored there.
As previously mentioned, physical bad sectors are permanently damaged and irreparable. However, logical bad sectors can be repaired on Windows and other operating systems. Here are some methods to repair them:
It’s wise to take preventive measures to avoid data loss and preserve your drive. Here are steps you can take to prevent bad sectors:
ENGLİSH
8 gün önceSİGORTA
8 gün önceSİGORTA
8 gün önceSİGORTA
11 gün önceSİGORTA
13 gün önceSİGORTA
13 gün önceDÜNYA
22 gün önceVeri politikasındaki amaçlarla sınırlı ve mevzuata uygun şekilde çerez konumlandırmaktayız. Detaylar için veri politikamızı inceleyebilirsiniz.