How to check badblocks on HDD and SSD?
Published: May 19, 2023 • Updated: November 24, 2026
Unexpected storage drive failure is one of the most common causes of data loss and service downtime. For any business, this translates directly into financial losses and breached SLAs. Timely diagnostics help you detect drive degradation before the disk becomes completely unreadable by the operating system.
In this guide, we will cover the key differences between diagnosing HDDs and modern solid-state drives, and show how to check drive health using built-in Windows and Linux tools without installing third-party software.
Why Storage Drives Fail: HDD vs. SSD and NVMe
The underlying hardware architecture directly dictates how a drive fails and which diagnostic methods you should use:
HDD (Hard Disk Drives). Store data on spinning magnetic platters. Their main enemies are mechanical wear, vibration, overheating, and physical shocks. Over time, unreadable areas—known as bad sectors (bad blocks)—appear on the platter surface.
SSD and NVMe (Solid-State Drives). Have no moving parts and are immune to physical jolts, but their NAND flash memory cells have a finite number of program/erase cycles (TBW). As cells wear out, the controller remaps degrading blocks to spare over-provisioned space until that reserve is exhausted.
Important: Traditional surface scanning for bad sectors (
chkdsk /rorbadblocks) is primarily relevant for mechanical HDDs. On modern SSDs and NVMe drives, scanning every block is unnecessary and needlessly consumes flash write endurance—instead, focus on checking S.M.A.R.T. telemetry (media wearout, temperature, and controller media errors).
Checking Drive Health on Windows (10, 11, and Windows Server)
In modern Windows environments, diagnostics consist of two stages: a quick hardware health check via PowerShell and file system verification via Command Prompt.
1. Quick Health Check (S.M.A.R.T.) via PowerShell
Before running a deep scan, check whether the drive controller itself is reporting critical wear:
Right-click the Start menu and select Terminal (Admin) or PowerShell (Admin).
Run the following command:
PowerShellGet-PhysicalDisk | Select-Object FriendlyName, MediaType, HealthStatus, OperationalStatusInspect the
HealthStatuscolumn: Healthy means no critical hardware issues were detected. If it displays Warning or Unhealthy, back up your data immediately.
2. Checking File System and Sectors with CHKDSK
The CHKDSK (Check Disk) utility verifies the logical integrity of the NTFS file system and (for HDDs) locates damaged sectors.
Open Command Prompt or Terminal as Administrator.
Run a read-only check on the target volume without making changes (for example, drive
C:):DOSchkdsk C:If file system errors are found, run the utility with the repair flag:
DOSchkdsk C: /f
Key CHKDSK parameters:
/f— Fixes logical file system errors on the disk./r— Locates bad physical sectors and recovers readable information (use only for HDDs, as the scan can take several hours)./x— Forces the volume to dismount before checking (all open file handles to the volume are invalidated).
If you scan the system drive C:, Windows will report that the volume is in use and ask to schedule the check on the next reboot. Type Y, press Enter, and restart your server or PC.
Checking Drive Health on Linux (Ubuntu, Debian, AlmaLinux)
In Linux, the right diagnostic tool depends on whether you are managing a physical drive on a dedicated server or a virtual volume on a VPS.
1. Identifying the Drive Name
First, find out how the storage device is named in the system. Open your terminal and run:
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,MODEL
(Alternatively, you can use the classic sudo fdisk -l command—note the lowercase letter l).
In the output, you will see device identifiers such as:
/dev/sda,/dev/sdb— Standard SATA/SAS drives;/dev/nvme0n1— NVMe drives;/dev/vda— Virtual disks on KVM/VPS instances.
2. Scanning for Bad Sectors (Physical HDDs)
If you have a dedicated server equipped with a mechanical hard drive, you can scan the surface for unreadable blocks using the built-in badblocks utility in non-destructive read-only mode:
sudo badblocks -sv /dev/sda
What the flags mean:
-s— Displays real-time progress as a percentage;-v— Enables verbose output, printing a summary of read, write, and data corruption errors.
While running, the terminal displays completion progress alongside an error counter formatted as (0/0/0 errors). Ideally, all three numbers should remain zero once the scan finishes.
Note for VPS users: On a virtual private server,
/dev/vdais a virtual disk image backed by an enterprise RAID array. You do not need to runbadblocksinside a VPS—physical drive health is continuously monitored by the hypervisor and hosting infrastructure.
3. Checking File System Integrity (fsck)
If a server experienced an unexpected power loss resulting in file system corruption (e.g., on ext4), use the fsck utility. Note that fsck must only be run on an unmounted partition (or from Rescue mode):
sudo umount /dev/sdb1
sudo fsck -y /dev/sdb1
What to Do If a Drive Is Failing?
If diagnostics reveal a growing number of bad sectors on an HDD or critical cell wear on an SSD, attempting to repair the drive via software is futile. Sector reallocation only masks physical degradation temporarily, leaving your databases and production workloads at severe risk of permanent data loss. The only reliable solution is to migrate your data immediately and replace the drive.
To ensure a single drive failure never disrupts your operations, MivoCloud cloud and dedicated servers run on fault-tolerant RAID arrays backed by 24/7 hardware S.M.A.R.T. monitoring. If any drive in an array begins to degrade, our data center engineers hot-swap it immediately with zero data loss and zero downtime for your infrastructure.
Article Author - Anatolice Cohaniuc

