How to Check Hard Drive Health on Windows, Mac & Linux
Hard drive health is the overall condition of your storage device, indicating its ability to reliably read, write, and store data without errors. This includes the physical integrity of components like platters and read/write heads in HDDs or memory cells in SSDs, as well as the stability of the file system. A healthy drive performs efficiently within its design limits, while a failing drive may show symptoms such as slow data access, bad sectors, or frequent errors.
Hard drive health directly impacts performance because physical damage or logical errors cause slower read/write speeds and increased chances of data loss. To monitor health, Windows users can utilize tools like CHKDSK, Error Checking, or WMIC for SMART status; Mac OS offers Disk Utility’s First Aid to scan and repair drives; and Linux users typically rely on smartctl and badblocks commands. Additionally, third-party apps such as CrystalDiskInfo for Windows, DriveDx for Mac, and GSmartControl for Linux provide detailed health reports and early warnings of potential failure.
How to Check Hard Drive Health on Windows?
To check hard drive health on Windows, follow these methods:

Use CHKDSK (Check Disk Utility)
To check hard drive health on Windows, follow these methods:
Pre-checks
-
Back up important data if you suspect drive issues.
- Close apps using the target drive to avoid access conflicts.
- Run terminals as administrator for consistent results.
How to Check Hard Drive Health on Windows?
- Built into Windows, no extra software needed
- Can repair file system errors and mark bad sectors
- Works on both internal and external drives
- Can run at boot to fix locked system files
- Provides detailed logs in Event Viewer
Cons of Using CHKDSK
-
Full scans are time‑consuming on large drives
- Requires administrator privileges
- Command syntax may be difficult for beginners
- Cannot fix severe physical hardware damage
- May cause data loss if files are already corrupted and unrecoverable
Use Windows SMART Status Check
Pre-checks
-
Back up important data if you suspect drive issues.
- Close apps using the target drive to avoid access conflicts.
- Run terminals as administrator for consistent results.
Pros of Using Windows SMART Status Check
- Built into Windows, no extra software needed
- Can repair file system errors and mark bad sectors
- Works on both internal and external drives
- Can run at boot to fix locked system files
- Provides detailed logs in Event Viewer
Cons of Using Windows SMART Status Check
-
Limited detail compared to full SMART attribute readouts
- Output and availability vary by driver and hardware
- WMIC is deprecated on newer Windows versions
- Does not perform surface tests or repairs
- May require administrator privileges for consistent results
Use CHKDSK (Check Disk Utility)
To check hard drive health on Windows, follow these methods:
Pre-checks
-
Back up important data if you suspect drive issues.
- Close apps using the target drive to avoid access conflicts.
- Run terminals as administrator for consistent results.
How to Check Hard Drive Health on Windows?
- Built into Windows, no extra software needed
- Can repair file system errors and mark bad sectors
- Works on both internal and external drives
- Can run at boot to fix locked system files
- Provides detailed logs in Event Viewer
Cons of Using CHKDSK
-
Full scans are time‑consuming on large drives
- Requires administrator privileges
- Command syntax may be difficult for beginners
- Cannot fix severe physical hardware damage
- May cause data loss if files are already corrupted and unrecoverable
Use Disk Management
1. Pre-checks
-
Back up important data if you suspect drive issues.
- Close apps using the target drive to avoid access conflicts.
- Run terminals as administrator for consistent results.
2. Open Disk Management
-
Method: Press Windows + R, type diskmgmt.msc, press Enter.
- Alternate: Right-click Start and select Disk Management.
- Verify target: Identify the disk by capacity, model, and connection type to avoid
3. Check drive and volume status
-
Visual health: Look for Healthy in the volume status bars and list.
- Layout and file system: Confirm partition layout, file system type, and presence of unallocated space.
- Mounting issues: If a volume does not have a drive letter, right-click and choose Change Drive Letter and Paths to add one.
4. Open Properties for more details
-
Access: Right-click the disk or volume and select Properties.
- Volumes tab: Review partition style (MBR or GPT), capacity, and assignment.
- Tools tab: Use Error checking to scan the volume for file system errors. Click Check and follow prompts.
- Hardware or Events tab: Review device information and recent logs for disk-related issues.
- Run an error check from Disk Management
- Invoke scan: Right-click the volume, select Properties, Tools, then Check.
- Repair option: If prompted, choose to scan and repair. You may need to schedule at restart for system volumes.
- Review results: After completion, Windows will report whether errors were found and fixed.
5. Initialize and format a new disk
-
Initialize: If a disk shows as Not Initialized, right-click the disk label and choose Initialize Disk. Select GPT for modern systems, MBR for legacy.
- Create volume: Right-click Unallocated space, select New Simple Volume, follow the wizard to set size, file system (NTFS or exFAT), allocation unit size, and label.
- Finish: Assign a drive letter and complete the wizard. The volume should show Healthy and mount in File Explorer.
6. Check for disk-level issues
-
Offline or missing: If a disk is Offline, right-click and bring it Online, then investigate cables or power if it fails.
- Read-only flags: For removable media stuck read-only, check the device’s physical lock switch and Properties > Policies settings.
7. Cross-check with Event Viewer when needed
-
Open: Press Windows + R, type eventvwr.msc, press Enter.
- Navigate: Windows Logs > System. Filter for Disk, Disk Controller, or Ntfs sources to find related errors.
Pros of Using Disk Management
-
Visual overview of disks, partitions, file systems, and drive letters
- Easy to create, delete, resize, and format volumes
- Built into Windows with no additional software required
- Quick at spotting unallocated space and basic status like Healthy
Cons of Using Disk Management
-
Does not show detailed S.M.A.R.T. health or wear metrics
- Limited diagnostic depth compared to dedicated tools
- Some operations require reboots for system volumes
- Risk of data loss if wrong disk or partition is modified
Use Windows Error Checking Tool
To check hard drive health on Windows, follow these methods:
1. Pre-checks
-
Back up important data if you suspect drive issues.
- Close apps using the target drive to avoid access conflicts.
- Run terminals as administrator for consistent results.
2. Open the tool from File Explorer
-
Open File Explorer, right-click the target drive, and select Properties.
- Go to the Tools tab and locate Error checking.
- Click Check. If Windows says you do not need to scan, you can still choose to scan.
3. Choose scan or repair options
- Click Scan drive for a read-only check of file system errors.
- If prompted after a scan, select Repair drive to fix detected issues.
- For system drives, you may be asked to Schedule on next restart. Confirm, then restart to run the check before Windows loads.
4. Review results and logs
-
After completion, Windows reports whether errors were found and fixed.
- For detailed logs, open Event Viewer, navigate to Windows Logs > Application, and look for entries from Wininit or Chkdsk that summarize actions taken.
Pros of Using Windows Error Checking Tool
-
Easy graphical workflow that does not require command syntax
- Integrated with Windows and available on any drive with a letter
- Can schedule a boot-time repair for system volumes
- Provides a quick yes or no on whether repairs are needed
Cons of Using Windows Error Checking Tool
-
Less detailed output than command-line CHKDSK logs
- Limited control over scan parameters compared to command flags
- May require a restart for system drive repairs
- Does not show S.M.A.R.T. health metrics or perform surface tests
Use PowerShell to Check SMART Status
1. Pre-checks
-
Back up important data if you suspect issues. Close apps using the target drive.
- Open PowerShell as administrator for consistent access to storage data.
2. Quick health view with Get-PhysicalDisk
-
Open Start, type PowerShell, right-click Windows PowerShell, select Run as administrator.
- Run:
- Get-PhysicalDisk | Select FriendlyName, MediaType, HealthStatus, OperationalStatus
- Review HealthStatus. Healthy indicates no detected issues. Investigate any warning or unknown states.
3. Failure prediction via WMI
-
Run:
- Get-WmiObject -Namespace rootwmi -Class MSStorageDriver_FailurePredictStatus | Select InstanceName, PredictFailure
- Check PredictFailure. False means no predicted failure. True signals the drive is predicting a failure and needs attention.
4. Detailed reliability counters
-
Identify the disk number:
- Get-Disk | Select Number, FriendlyName, SerialNumber
- Get counters:
- Get-StorageReliabilityCounter -Disk (Get-Disk -Number 0) | Select *
- Look for attributes such as Wear, Temperature, ReadErrorsTotal, ReallocatedSectors, and MediaErrors if exposed by your hardware driver.
5. NVMe focused snapshot
-
Run:
- Get-PhysicalDisk | Select FriendlyName, MediaType, HealthStatus, Usage, Size
- If your driver exposes it, also check:
- Get-StorageReliabilityCounter -Disk (Get-Disk -Number 0) | Select Temperature, Wear, PowerOnHours
- Review Wear or percentage used to gauge SSD lifespan.
6. Export a quick report
-
Run:
- Get-PhysicalDisk | Select FriendlyName, HealthStatus, OperationalStatus | Export-Csv -NoTypeInformation .disk_health.csv
- Open the CSV to archive results or share with support.
7. Interpret common fields
-
Healthy or OK means no current flags. Warning or predictive failure suggests backup and replacement planning.
- Rising media errors, reallocated sectors, or high temperature indicate deteriorating health even if the overall status is still healthy.
Pros of Using PowerShell
-
Built in and scriptable for multiple disks and remote checks
- Fast to run with low overhead
- Can expose predictive failure flags and detailed counters on supported hardware
Cons of Using PowerShell
-
Detail depends on drivers and hardware support
- Some cmdlets are unavailable on older Windows editions
- Does not perform repairs or surface scans
- Interpreting counters require vendor documentation
How to Check Hard Drive Health on Mac OS?
To check hard drive health on Mac OS, follow the 4 methods below.
-
Use Disk Utility
- Use SMART Status in Disk Utility
- Use Terminal
- Use Third-Party Tools
Use Disk Utility
1. Pre-checks
-
Back up important data before running repairs.
- Quit apps that might be using the disk and ensure the Mac has stable power.
2. Open Disk Utility and reveal devices
-
Open Applications > Utilities > Disk Utility.
- In the menu bar, select View > Show All Devices so you can select the physical disk (not just volumes).
- This view helps you target the correct device and its containers/volumes.
3. Check SMART status in Disk Utility
-
Select the physical disk in the sidebar, then click the Info button (i) in the toolbar to view SMART status.
- If you see a fatal hardware error, back up what you can and plan to replace the drive; Disk Utility cannot repair hardware faults.
- If there’s no hardware error but issues persist, proceed with First Aid.
4. Run First Aid to verify and repair
-
In Disk Utility, select the lowest item under the disk (the last volume), click First Aid, then Run.
- Repeat First Aid upward: run it on each higher item (container, then disk) until you reach the top.
- For startup volumes, run First Aid from macOS Recovery for a more thorough check:
- Intel: restart and hold Command-R to enter Recovery.
- Apple silicon: shut down, then hold the power button until Options appears, and choose Disk Utility.
Pros of Using Disk Utility
-
Built-in and free; no installation required.
- User-friendly GUI for verify/repair with First Aid.
- Shows a basic SMART status to flag impending hard disk drive failure.
Cons of Using Disk Utility
-
SMART detail is limited compared to third-party tools; no per-attribute view.
- Cannot repair physical hardware faults; severe errors require drive replacement.
- For startup disks, best results often require running from Recovery, which adds downtime.
Use PowerShell to Check SMART Status
1. Pre-checks
-
Back up important data if you suspect any drive issues.
- Quit apps that might be using the disk and ensure stable power.
2. Open Disk Utility
-
Go to Applications > Utilities > Disk Utility.
- In the menu bar, select View > Show All Devices so you can select the physical disk, not just a volume.
3. Select the physical disk
- In the sidebar, click the topmost entry for the device you want to check. Confirm by capacity and model to avoid confusion with volumes or containers.
4. View SMART status
-
Click the Info button in the toolbar. Find the SMART status field in the details panel.
- Typical results include:
- Verified: No SMART-reported hardware problems.
- Failing: The disk reports impending hardware failure. Back up immediately and plan to replace the drive.
- Not supported: The enclosure or interface is not passing SMART data to macOS.
5. Decide next steps
-
If status is Failing, copy critical data off the drive as soon as possible, then replace the hardware.
- If status is Verified but you still see issues, run First Aid on the volume, check cables and ports, and consider deeper diagnostics.
- If status is Not supported, try a different enclosure or interface, or use a tool that can read SMART through your controller.
Pros of Using SMART Status in Disk Utility
-
Built in and quick to access.
- Very easy to interpret at a glance.
- Works without installing any extra software.
Cons of Using SMART Status in Disk Utility
-
Only shows a high-level pass or fail, not detailed attributes.
- Often unavailable for disks in some USB enclosures or docks.
- Cannot repair hardware faults; it only reports them.
Use Terminal
1. Pre-checks
-
Back up data: If you suspect issues, copy critical files first.
- Quit apps: Close anything using the disk to avoid locks.
- Use Recovery for startup disks:
- Intel: Restart, hold Command+R → Utilities > Terminal.
- Apple silicon: Shut down, hold power → Options > Continue → Utilities > Terminal.
2. Identify the correct disk and volumes
-
List devices:
- diskutil list
- Confirm targets: Note identifiers (for example, disk0, disk2s1) by size, type, and connection.
- Check APFS layout:
- diskutil apfs list
3. Check basic SMART status (if exposed)
-
View SMART via diskutil:
- diskutil info disk0 | grep -i SMART
- Interpretation: “Verified” indicates no SMART-reported faults; “Failing” means imminent hardware failure; “Not Supported” often occurs with some USB enclosures.
4. Verify and repair volumes
-
Verify a volume (non-destructive):
- diskutil verifyVolume /dev/diskXsY
- Repair a volume (First Aid equivalent):
- diskutil repairVolume /dev/diskXsY
- APFS-specific repair (if needed):
- diskutil apfs repairVolume /dev/diskXsY
Tip: Work bottom-up, run on the lowest volume, then container, then the physical disk.
5. Verify and repair entire disks and partition maps
-
Verify partition map:
- diskutil verifyDisk /dev/diskX
- Repair partition map (from Recovery if it’s the boot disk):
- diskutil repairDisk /dev/diskX
6. Deep checks from Recovery with fsck (advanced)
-
APFS check (read-only device node is faster):
- fsck_apfs -y /dev/rdiskXsY
- HFS+ check:
- fsck_hfs -fy /dev/rdiskXsY
- Run until “The volume … appears to be OK.” If repairs are reported, re-run once more to confirm.
7. Review recent disk errors
-
System log scan (optional):
- log show --predicate 'subsystem == "com.apple.filesystems"' --last 1d
- Look for I/O errors, unmounted volumes, or repeated repair messages as signs of deeper issues.
Pros of Using Terminal
-
Powerful: Full verify/repair coverage for volumes, containers, and partition maps.
- Precise: Clear, actionable output with specific error messages.
- No extra apps: Uses built-in tools suitable for scripting and remote work.
Cons of Using Terminal
-
Learning curve: Requires comfort with disk identifiers and command syntax.
- Limited SMART detail: Only high-level status; no per-attribute view.
- Recovery requirement: Startup disk repairs often require booting into Recovery, adding downtime.
Use Third-Party Tools
Pre-checks
-
Back up data: If you suspect issues, copy critical files first.
- Quit apps: Close anything using the disk to avoid locks.
- Use Recovery for startup disks:
- Intel: Restart, hold Command+R → Utilities > Terminal.
- Apple silicon: Shut down, hold power → Options > Continue → Utilities > Terminal.
Option 1: Install a SMART monitor with alerts
-
Pick a tool: DriveDx or SMART Utility are popular for detailed SMART attributes and warnings.
- Install and launch: Follow the installer, then open the app.
- Review dashboard: Check overall health, temperature, power‑on hours, and key attributes.
- Run tests: Start a Short Self‑Test for quick screening; run an Extended/Long Self‑Test for deeper checks.
- Set alerts: Enable notifications for threshold changes, rising reallocated or pending sectors, or SSD wear indicators.
Option 2: Use a free GUI for SMART self‑tests
-
Pick a tool: GSmartControl provides a graphical view over smartctl.
- Open the drive: Select your disk to view attributes, error logs, and capabilities.
- Run tests: Start Short, Extended, or Conveyance tests and monitor progress and results.
- Interpret results: Watch for increases in Reallocated Sector Count, Current Pending Sector, UDMA CRC errors, or SSD Percentage Used.
Option 3: Add speed and surface checks
-
Speed test: Use Blackmagic Disk Speed Test to spot sudden throughput drops that may hint at failing media or throttling.
- Surface scan (read‑only): Choose tools that perform sequential read checks to detect unreadable sectors without writing.
- Correlate findings: If speed is fine but SMART flags rise, trust SMART. If speed is poor with clean SMART, check cabling, ports, trim, or filesystem.
Decide next steps
-
If SMART is failing: Back up immediately and replace the drive; do not attempt repeated repairs.
- If SMART is verified but errors persist: Run First Aid in Disk Utility, test cables/ports, then re‑test. Consider a different enclosure for external drives.
- Trend monitoring: Enable periodic reports to catch early degradation before data loss.
Pros of Using Third-Party Tools
-
Most detailed: Full SMART attributes, error logs, temperatures, SSD wear indicators, and trend graphs.
- Proactive alerts: Background monitoring warns you before failures.
- Self‑tests: One‑click Short/Long tests with clear pass/fail results.
Cons of Using Third-Party Tools
-
Cost or setup: Some apps are paid; free options may require extra setup.
- Hardware limits: Many USB enclosures do not expose SMART, reducing visibility.
- No repairs: These tools diagnose; they do not fix physical faults.
How to Check Hard Drive Health on Linux?
To check hard drive health on Mac OS, follow the 4 methods below.
-
Use fsck (File System Consistency Check)
- Use SMART Tools
- Use Disk Utility (on Ubuntu and other distributions with GNOME)
- Using badblocks
Use fsck (File System Consistency Check)
1. Pre-checks
-
Back up data: Repairs modify metadata and may risk data loss if corruption is severe.
- Do not run on mounted filesystems: Plan to unmount the target volume, or use recovery/single‑user mode for the root filesystem.
2. Identify the correct device
-
List block devices:
- lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,FSTYPE,UUID
- Confirm target: Match by size, mount point, and filesystem (for example, /dev/sdb1 with ext4).
3. Unmount the target
-
Unmount safely:
- sudo umount /dev/sdXn
- If busy: Stop services or use lazy unmount as last resort:
- sudo umount -l /dev/sdXn
4. Run a read-only check first
-
Generic fsck wrapper:
- sudo fsck -n /dev/sdXn
- ext2/3/4 explicitly (more options):
- sudo e2fsck -n /dev/sdXn
5. Run repairs if needed
-
Interactive repair:
- sudo fsck -f /dev/sdXn
- Automatic yes to fixes (non‑interactive):
- sudo fsck -y /dev/sdXn
- ext4 with explicit tool:
- sudo e2fsck -f -y /dev/sdXn
- Re-run until it reports “clean” to confirm all issues are fixed.
6. Handle the root filesystem
-
Reboot into rescue mode: Choose “Advanced options” → recovery or single‑user mode, or boot from live media.
- Run read-only device node for speed:
- sudo e2fsck -f -y /dev/rdisk0p2 (adapt device)
- Reboot normally when done.
7. Filesystem-specific notes
-
XFS: fsck.xfs is a no-op; use xfs_repair on an unmounted XFS volume.
- sudo xfs_repair /dev/sdXn
- Btrfs: Prefer scrub/check instead of fsck.
- sudo btrfs scrub start -Bd /mountpoint
- sudo btrfs check --readonly /dev/sdXn
- FAT/NTFS: fsck.vfat and ntfsfix provide limited repairs. For NTFS, full repairs are best done on Windows.
8. Verify and remount
-
Quick integrity check:
- sudo fsck -n /dev/sdXn (should show clean)
- Mount back:
- sudo mount /dev/sdXn /mnt
- Confirm status:
- dmesg | tail and sudo blkid /dev/sdXn
Pros of Using fsck
-
Direct repairs: Fixes many metadata and journal issues that cause mounting failures.
- Granular control: Flags like -n, -f, -y enable safe checks, forced scans, or unattended repairs.
- Universal availability: Installed by default and works across many filesystems via specific fsck helpers.
Cons of Using fsck
-
Risk on mounted volumes: Running on mounted filesystems risks additional corruption.
- Filesystem variance: Different filesystems need different tools (XFS, Btrfs), which can be confusing.
- No hardware insight: Does not test media health; pair with SMART tools or badblocks for surface issues.
Use SMART Tools
1. Pre-checks
-
Back up data: If SMART warns of failure, copy critical files before deeper tests.
- Ensure passthrough: Some USB/SATA enclosures do not expose SMART; test with a direct SATA/NVMe connection or a known‑good enclosure.
- Install tools:
- Debian/Ubuntu: sudo apt-get install smartmontools
- Fedora/RHEL: sudo dnf install smartmontools
- Arch: sudo pacman -S smartmontools
2. Identify the device
-
List disks: lsblk -o NAME,SIZE,MODEL,TYPE
- Target device: Note identifiers like /dev/sda, /dev/nvme0n1.
3. Unmount the target
-
Enable SMART: sudo smartctl -s on /dev/sdX
- Check info: sudo smartctl -i /dev/sdX (confirms SMART availability, model, firmware)
4. View overall health and attributes
-
Full report: sudo smartctl -a /dev/sdX (or /dev/nvme0 for NVMe)
- Key fields to review:
- Overall-health: PASSED/FAILED summary
- Temperature and throttling: Overheat events are red flags
- Reallocated/Pending sectors (HDD): Rising counts indicate media decay
- CRC errors: Often cabling/port issues
- Percentage used/Wear level (SSD/NVMe): Approaching limits suggests replacement planning
5. Run SMART self-tests
-
Short test (1-3 min): sudo smartctl -t short /dev/sdX
- Extended test (can take hours): sudo smartctl -t long /dev/sdX
- Conveyance test (HDD shipping damage): sudo smartctl -t conveyance /dev/sdX
- Check results: sudo smartctl -a /dev/sdX and review Self‑test log for PASS/FAIL and LBA of first error
- Abort a running test: sudo smartctl -X /dev/sdX
6. NVMe specifics
-
Health summary: sudo smartctl -a /dev/nvme0
- Important NVMe fields: Percentage Used, Data Units Written, Media and Data Integrity Errors, Critical Warnings, Temperature
7. Set up background monitoring (optional)
-
Enable daemon: sudo systemctl enable --now smartd
- Configure alerts: Edit /etc/smartd.conf to schedule tests and email warnings on threshold changes.
Pros of Using SMART Tools
-
Detailed diagnostics: Full SMART attributes, error logs, and self‑test history.
- Predictive alerts: Can warn before catastrophic failure.
- Broad coverage: Works for both HDDs and SSDs, including NVMe with rich wear metrics.
- Automatable: Daemon and scripts support continuous monitoring and notifications.
Cons of Using SMART Tools
-
Passthrough limitations: Some USB enclosures hide SMART data.
- Interpretation required: Attribute meanings vary by vendor; false positives are possible without context.
- No repairs: SMART reports health but does not fix file system or media errors.
- Time cost: Extended tests take hours and may reduce performance while running.
Use Disk Utility (on Ubuntu and other distributions with GNOME)
1. Pre-checks
-
Back up data: Repairs or formatting risks data loss if issues are severe.
- Use direct connections: Connect external drives directly to USB or SATA. Some docks hide SMART data.
- Close apps: Ensure no programs are using the target volume.
2. Open GNOME Disks
-
Launch Disks: Open Activities and search for Disks, or run gnome-disks.
- Select the drive: Choose the physical device in the left pane. Confirm by model and capacity.
3. View health and SMART data
-
Open SMART data: Click the menu button for the drive and choose SMART Data and Self-Tests.
- Review key fields: Overall Assessment, Power-on Hours, Temperature, Reallocated or Pending sectors for HDDs, Percentage Used or Media Errors for SSDs and NVMe.
- Decide action: If failing is indicated, back up immediately and plan a replacement.
4. Run SMART self-tests
-
Quick screen: Start a Short Self-Test for a few minutes of checks.
- Deeper check: Run an Extended Self-Test to scan the surface. This can take hours.
- Review results: Check the self-test log for pass or fail and any first error LBA.
5. Check filesystem integrity
-
Run check: Click the partition, then the gear icon, and choose Check Filesystem.
- Repair if offered: Approve repairs if errors are found. For system partitions, perform from live media.
6. Benchmark and performance clues
-
Run benchmark: Use the Benchmark option to measure read and write speeds.
- Interpret results: Sudden slowdowns or unstable curves hint at failing media or cable issues.
7. Common follow-ups
-
If SMART fails: Stop heavy use, clone or back up data, replace the drive.
- If SMART is OK but errors persist: Re-seat cables, try a different port, recheck filesystem, and retest.
Pros of Using Disk Utility (on Ubuntu and other distributions with GNOME)
-
Detailed diagnostics: Full SMART attributes, error logs, and self‑test history.
- Predictive alerts: Can warn before catastrophic failure.
- Broad coverage: Works for both HDDs and SSDs, including NVMe with rich wear metrics.
- Automatable: Daemon and scripts support continuous monitoring and notifications.
Cons of Using Disk Utility (on Ubuntu and other distributions with GNOME)
-
Detail limits: Less granular than smartctl for raw attributes and logs.
- Hardware passthrough: Some USB enclosures do not expose SMART to the OS.
- No deep repairs: Filesystem fixes are basic and hardware faults cannot be repaired.
Using badblocks
1. Pre-checks
-
Back up data: Any write-mode tests will destroy data. Even read-only scans can stress failing disks.
- Unmount target: Do not run on a mounted filesystem. If needed, stop services and unmount the partition first.
- Confirm device path: Identify the correct disk/partition before proceeding to avoid data loss.
2. Identify the correct device
-
List disks and partitions:
- lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,FSTYPE,UUID
- Match the target: Note the device (for example, /dev/sdb or /dev/sdb1) by size, mount point, and filesystem.
3. Run a non-destructive read-only scan
-
Basic scan with verbose output:
- sudo badblocks -v /dev/sdXn > badblocks.txt
- What it does: Reads through the device to detect unreadable sectors and saves their LBAs to badblocks.txt for later use.
Tip: Scanning a whole disk (sdX) is slower than a single partition (sdXn); choose based on your goal.
4. Optionally run a destructive write-mode scan (use with extreme caution)
-
Four-pass write-read test:
- sudo badblocks -wsv /dev/sdX
- Warning: This overwrites the entire device and erases all data. Useful only when you intend to wipe, stress-test, or prepare a drive for fresh use.
5. Mark bad sectors as unusable (ext2/3/4)
-
Use e2fsck with the bad block list:
- sudo e2fsck -l badblocks.txt /dev/sdXn
- Alternative: have e2fsck call badblocks itself:
- sudo e2fsck -c /dev/sdXn
- Result: The filesystem records those sectors so the OS avoids them going forward. Ensure the volume is unmounted when running these commands.
6. Review and re-check
-
Re-run a read-only pass: Confirm that previously reported sectors are no longer used and that no new errors appear.
- Consider SMART: For ongoing health monitoring and failure prediction, pair badblocks with SMART tools for a fuller picture.
Pros of Using badblocks
-
Surface-level verification: Detects unreadable sectors directly by testing I/O on the media.
- Actionable integration: Works with e2fsck to mark bad sectors on ext-family filesystems.
- Flexible modes: Read-only for safe checks; write-mode for thorough stress tests when wiping or refurbishing drives.
Cons of Using badblocks
-
Time-consuming: Full-disk scans can take many hours on large drives.
- Data-destructive in write-mode: The -w test erases all data.
- Not predictive: Does not forecast failure; should be combined with SMART monitoring for health trends.
- Limited via some enclosures: USB/SATA bridges may throttle or distort results; direct connections are more reliable.

