DOLAR 38,2602 0.12%
EURO 43,8491 -0.53%
ALTIN 4.238,340,70
BITCOIN 34356533.03581%
İstanbul
21°

AÇIK

SABAHA KALAN SÜRE

Resim Yükle
Resim Yükle
120x600_gif.gif
Understanding and Managing Bad Sectors on Hard Drives

Understanding and Managing Bad Sectors on Hard Drives

ABONE OL
Nisan 22, 2025 13:48
Understanding and Managing Bad Sectors on Hard Drives
0

BEĞENDİM

ABONE OL

Introduction to Bad Sectors

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.

Introduction to Bad Sectors

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.

Resim Yükle Resim Yükle

What Exactly is a Bad Sector?

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.

Resim Yükle Resim Yükle

What Exactly is a Bad Sector?

Types of Bad Sectors

We generally classify bad sectors into two categories: Physical Bad Sectors and Logical Bad Sectors.

Types of Bad Sectors

Physical Bad Sector

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.

Physical Bad Sector

Logical Bad Sector

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.

İlgili Haber  H.W. International B.V. Secures New Investment Through Management Buyout

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.

Logical Bad Sector

Causes of Bad Sectors

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:

Causes of Bad Sectors

  • Factory production errors.
  • Wear and tear from continuous data writing.
  • Damage from impacts or falls, especially while the drive is operational.
  • Operation at extremely high temperatures.
  • Exposure to air or dust.
  • Use in high-humidity environments.

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.

Detecting and Managing Bad Sectors

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).

Detecting and Managing Bad Sectors

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.

İlgili Haber  The Standard Completes Acquisition of Allstate’s Employer Voluntary Benefits Business

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.

Tools for Detecting Bad Sectors

Every operating system offers disk scanning tools to detect bad sectors. Some tools can automatically initiate scans when they detect sudden shutdowns.

Tools for Detecting Bad Sectors

HD Tune Pro

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.

HD Tune Pro

  • Download HD Tune Pro.
  • Run the program and click “Error Scan” in the “Start Test” section above.
  • If the test doesn’t start automatically, initiate it manually. The “Quick Scan” option denotes a superficial scan, but we recommend a thorough scan without enabling it. The Quick Scan option typically highlights significant and hazardous faults.
  • Press the Start button to initiate the scan, which may take some time to complete. The duration depends on the drive type, size, and speed.
  • Once the scan finishes, if all fields appear green, your disk is in good condition.
  • If red dots indicating damaged sections appear, these areas are problematic.
  • If you observe a green screen, this is positive news, indicating a healthy disk.

Windows Built-in Tools

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:

Windows Built-in Tools

  • Type cmd in your Start menu search box.
  • Right-click on Command Prompt and select Run as Administrator. A pop-up command line window will appear.
  • Type chkdsk and press Enter to run chkdsk in read-only mode. Any errors found this way will not be automatically corrected.
  • Now for other commands:
    • chkdsk /f: Repairs errors without scanning for bad partitions on the volume. Enter the command “chkdsk disk name: /f”, such as chkdsk C: /f.
    • chkdsk /r: Repairs errors, locates corrupted partitions, and recovers readable information. It also checks the health of each physical sector on the disk. Use chkdsk C: /r.
    • chkdsk /b: Reevaluates previously flagged bad sectors.
    • chkdsk /i: Performs a faster but less thorough check.
  • If you aren’t running chkdsk in read-only mode, you’ll receive a warning that chkdsk cannot be run because another process is using the volume. Press “Y” and then Enter.
  • Restart your device, and the disk scan will commence.

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.

İlgili Haber  Cryptocurrency Market Shows Recovery as Altcoins Surge

Alternative Windows Error Checking

Windows offers another built-in tool to scan for bad sectors:

  • Press Windows + E, then click This computer.
  • Right-click on the hard disk you wish to scan for bad sectors and click Properties.
  • Go to Tools > Error Checking > Check. Windows will scan your hard drive, and upon completion, a message will indicate whether your drive has errors.
  • If errors are detected, you can attempt to fix them by clicking “Repair Drive”. When the repair or scan is complete, click Details to see the issues detected and resolved.

Linux

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.

macOS

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.

  • Start your device in macOS recovery mode by pressing Command + R at startup. Hold until a tab featuring the Apple logo appears.
  • Navigate to the macOS Utilities tab and click Disk Utility.
  • Click Continue.
  • In the Disk Utility sidebar, select the relevant hard drive, then click the First Aid tab.
  • Click Run to repair the hard drive. If the repair fails, reinstalling macOS might address some issues.

Repairing Logical Bad Sectors

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:

  • Utilize chkdsk (Windows) and badblocks (Linux) tools available in operating systems.
  • Recover data from bad sectors using third-party software like EaseUS Data Recovery Wizard and Drill Data Recovery Software.
  • Try restoring your computer to a previous healthy state using system restore.
  • If the operating system is installed on the problematic disk, perform a clean installation (high-level format).
  • Format the problematic disk (low-level format).
  • Restore the operating system to factory settings. Remember to back up data before formatting.

Preventing Bad Sectors

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:

  • Handle devices carefully to avoid bumps or drops, and ensure proper shutdowns.
  • Avoid using drives in extreme environmental conditions such as high temperature, excessive dust, or high-frequency sound.
  • Prevent exposure to static electricity.
  • Use supported or official data cables and power supplies for stable power delivery.
  • Utilize disk software from trusted developers.
Resim Yükle

En az 10 karakter gerekli
Resim Yükle
Resim Yükle
Resim Yükle

Veri politikasındaki amaçlarla sınırlı ve mevzuata uygun şekilde çerez konumlandırmaktayız. Detaylar için veri politikamızı inceleyebilirsiniz.