Why is e2fsck-c flag causing slow performance?

Abstract: Resolve slow e2fsck performance caused by the -c flag's full disk surface scan.

Created: 2026-07-28 by
Running e2fsck with the -c flag triggers a full surface scan of the disk to identify bad blocks, which significantly slows down the process because it reads every single sector sequentially. This operation is I/O intensive and can take hours or days depending on drive size and speed, especially on mechanical hard drives where random head movement adds latency. The slowness is not a bug but a necessary consequence of verifying physical media integrity across the entire storage device.

Understanding the e2fsck -c Flag Behavior

The -c flag in e2fsck stands for "check bad blocks." When you invoke e2fsck -c /dev/sdX, the tool does not just check the filesystem metadata or inode tables; it actively attempts to read every block on the partition. If a read fails or returns incorrect data, that block is marked as bad in the filesystem's bad block inode, preventing future writes to that area. This comprehensive verification is why the process appears to hang or progress very slowly compared to standard checks. Standard e2fsck runs without flags primarily validate logical consistency: checking directory structures, file sizes, and link counts. These operations are fast because they only touch used portions of the filesystem. In contrast, the -c flag ignores logical structure and focuses entirely on physical readability. It performs a sequential read of the entire device, which saturates the I/O bandwidth and prevents other system operations from proceeding smoothly if the filesystem is mounted read-only or if the system is idle during the scan.

Distinguishing Between -c and -cc Flags

It is important to note that there are two variations of this flag. The single -c flag uses a non-destructive read-only test, meaning it only reads the blocks to check for errors without attempting to write anything. The double -cc flag performs a destructive write-read-write test, which actually writes patterns to the blocks to detect latent defects more thoroughly. Both are slow, but -cc is even slower due to the additional write cycles. For most users, the single -c is sufficient for detecting existing bad sectors, while -cc is reserved for critical data recovery scenarios or when suspecting severe media degradation.

Factors Influencing Performance Speed

Several hardware and configuration factors determine how long the -c scan will take. The type of storage medium is the primary determinant. Mechanical Hard Disk Drives (HDDs) suffer from physical seek times and rotational latency, making sequential scans slow but predictable. Solid State Drives (SSDs), however, handle sequential reads differently. While SSDs have high throughput, some controllers may throttle performance during prolonged heavy I/O loads to manage heat or wear leveling. Additionally, the size of the partition directly correlates with time; scanning a 4TB drive will naturally take much longer than a 500GB drive. Another factor is the current state of the filesystem. If the filesystem is heavily fragmented or has many small files, the overhead of managing the I/O requests might slightly increase processing time, though this is negligible compared to the raw disk read speed. Network-attached storage (NAS) or iSCSI targets add network latency to each block read, potentially turning a hour-long scan into a multi-day process. Understanding these variables helps in planning maintenance windows appropriately.

Solutions and Best Practices

To mitigate the impact of slow performance, consider alternative approaches or optimizations. First, assess whether the -c flag is truly necessary. Modern filesystems like ext4 rely on journaling and checksums to detect logical corruption. Physical bad blocks are rare in healthy drives and are usually handled by the drive's firmware via remapping. Unless you are experiencing specific read errors or suspect hardware failure, running e2fsck without -c is the standard procedure for routine maintenance. If you must run the check, do so during off-hours. Use the nice command to lower the priority of the process, ensuring it does not starve other critical system tasks of CPU and I/O resources. For example:
nice -n 19 ionice -c 3 e2fsck -c /dev/sdX
This sets the process to lowest priority and best-effort I/O scheduling. Furthermore, ensure the filesystem is unmounted before running the check. Running e2fsck on a mounted filesystem, even in read-only mode, can lead to inconsistent results if background processes modify data concurrently. For SSDs, refer to our guide on Optimizing File System Usage with SSDs to understand how different storage technologies react to intensive I/O workloads. Regular monitoring using tools like SMART data can help predict failures before they require a full surface scan, allowing you to replace drives proactively rather than reacting to slow performance issues.

When to Avoid the -c Flag

Avoid using -c on large enterprise arrays or RAID configurations unless specifically instructed by hardware diagnostics. RAID controllers often handle bad block management at the array level, and individual filesystem checks may interfere with parity calculations or cause unnecessary load on the controller. Similarly, avoid it on virtual machines unless the underlying host storage is showing signs of failure. The virtualization layer abstracts the physical blocks, so reading them through the VM guest may not provide accurate insights into the host's physical health. In summary, the slowness caused by e2fsck -c is expected behavior due to the exhaustive nature of the bad block check. Plan accordingly, use appropriate scheduling priorities, and reserve this tool for situations where physical media integrity is genuinely in question.

Frequently Asked Questions

Can I run e2fsck -c on a mounted filesystem?

No, you should never run e2fsck on a mounted filesystem unless it is in a strict read-only emergency scenario, and even then, results may be unreliable. The tool requires exclusive access to the block device to ensure data consistency during the scan. Always unmount the partition first to prevent race conditions between the checker and active I/O operations.

How long does e2fsck -c typically take on a 1TB HDD?

On a typical 7200 RPM mechanical hard drive, a full bad block scan can take anywhere from 4 to 8 hours, depending on the drive's age and condition. Faster drives or those with larger caches may complete the task quicker, but expect significant I/O wait times. Always plan for a multi-hour window and monitor progress via logs or console output.

Is e2fsck -c safe for SSDs?

Yes, it is safe, but it may trigger excessive wear leveling activities on some SSD controllers, potentially impacting performance temporarily. Since SSDs do not have moving parts, the scan relies on electronic read speeds, which are generally faster than HDDs but still substantial for large capacities. However, frequent bad block scans are rarely needed for SSDs due to their internal error correction mechanisms.

What is the difference between e2fsck -c and smartctl?

e2fsck -c checks the filesystem's view of the disk by reading logical blocks mapped by the OS, while smartctl queries the drive's internal self-monitoring attributes directly from the hardware firmware. smartctl is faster and provides predictive failure data, whereas e2fsck -c verifies actual data retrievability from the perspective of the operating system. Using both provides a comprehensive health assessment.

Why does my system freeze during e2fsck -c?

The system may appear to freeze because the -c flag saturates the I/O subsystem, leaving few resources available for other processes. This is particularly noticeable on systems with limited RAM or slower storage interfaces. Using nice and ionice commands can alleviate this by deprioritizing the scan, allowing the system to remain responsive for basic tasks.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More