Hard drives are doomed to fail resulting in data loss. Regular maintenance with a Windows 11 utility can prevent a major disaster.
There is one undeniable and unavoidable truth about storage technology: it will eventually fail. Whether it’s through normal use, misuse, or the passage of time, our storage devices are doomed to fail and/or become obsolete. The careful maintenance of our storage equipment and the systematic backup of data is still important for Windows 11 users, even in the age of solid state drives (SSDs) and cloud servers.
TO SEE: Quick Glossary: Storage (Tech Republic Premium)
For those who use Windows and use mechanical hard drives, the importance is even more important because that storage medium remains the most vulnerable to immediate failure.
In the history of the modern personal computer, the mechanical hard drive is notorious for failing at the most inopportune moments. This is why Windows users with mechanical hard drives should take a moment once a month to perform basic maintenance and run a reliable utility called chkdsk.
An overview of the chkdsk utility in Windows 11
The chkdsk utility, short for “check disk”, scans the file system and file system metadata of a hard drive for logical and physical errors. Chkdsk is a remnant of disk operating systems (DOS) and has been part of every Windows operating system since the beginning.
When used without parameters, chkdsk only displays the status of the volume and does not fix errors. While chkdsk can be used from within the Windows graphical user interface (GUI), it is most commonly associated with the Command Prompt.
The base chkdsk syntax and its parameters and switches include:
:Specifies the drive letter (followed by a colon), mount point, or volume name.
:Only use with file allocation table (FAT) and FAT32. Specifies the location and name of a file or set of files that chkdsk will check for fragmentation. You can use the ? and * wildcards to specify multiple files.
- /f: Fixes errors on the disk. The drive must be locked. If chkdsk cannot lock the drive, a message will appear asking if you want to check the drive the next time you restart your computer.
- /v: Displays the name of each file in each folder when the disk is checked.
- /r: Locates bad sectors and recovers readable information. The drive must be locked. /r contains the functionality of /f, with the additional analysis of physical disk errors.
- /X: Forces the volume to unmount first, if necessary. Any open levers to the drive will be invalidated. /x also contains the functionality of /f.
- /i: Use only with the new technology file system (NTFS). Performs a less thorough check of index entries, reducing the time required to run chkdsk.
- /c: Only use with NTFS. Does not check cycles within the directory tree, reducing the amount of time it takes to run chkdsk.
- /l[:<size>]: Only use with NTFS. Changes the size of the log file to the size you type. If you omit the size parameter, /l displays the current size.
- /b: Only use with NTFS. Clears the list of bad clusters on the volume and rescans all allocated and free clusters for errors. /b contains the functionality of /r. Use this parameter after you have copied a volume to a new hard drive.
- /scan: Only use with NTFS. Performs an online scan on the volume.
- /forceofflinefix: Only use with NTFS. /forceofflinefix must be used with /scan. Bypass all online repairs; any defects found are queued for offline repair (e.g. chkdsk /spotfix).
- /perf: Only use with NTFS. /perf must be used with /scan. Uses more system resources to complete a scan as quickly as possible. This can negatively affect the performance of other tasks running on the system.
- /spotfix: Only use with NTFS. Runs spot fixing on the volume.
- /sdcleanup: Only use with NTFS. Garbage collects unnecessary security descriptor data (implies /f).
- /offline scan and repair: Runs an offline scan and restores the volume.
- /free orphan chains: Only use with FAT/FAT32/exFAT. Free all orphaned cluster chains instead of restoring their contents.
- /markclean: Only use with FAT/FAT32/exFAT. Marks the volume as clean if no corruption is detected, even if /f is not specified.
- /?: Displays help at the command prompt.
The most commonly used chkdsk command is:
This command scans for errors and then fixes the errors and marks the bad sectors so that they are never used again. To perform this task, the drive must be locked. In other words, no other applications can access the disk while chkdsk is running. If it is not possible to lock the drive, the utility will ask if you want to run chkdsk on the next system boot.
You can run chkdsk on an SSD hard drive without damaging it, but it is generally not necessary. Modern SSD drives have their own built-in maintenance software to deal with bad sectors and archiving errors. Chkdsk is usually unnecessary in those situations.
TO SEE: Checklist: Cloud Storage Management (Tech Republic Premium)
Run chkdsk to repair a Windows 11 hard drive
To run chkdsk using the Windows 11 GUI, open Windows Explorer, navigate to the volume of the hard drive you want to scan for errors and right-click. From the context menu, select Properties and then select the Tools tab (Image A).
On the Tools tab, click the Check button. Windows 11 may warn you that it found no errors, but you can still scan. This process is the common chkdsk /f command we discussed earlier. To apply other parameters, you need to switch to Command Prompt.
Find “command prompt” in the Windows 11 desktop search app and select Run as administrator from the list of options. From the resulting Command Prompt screen (Figure B), you can enter an executable chkdsk command with the appropriate parameters and switches.
It is important to note that if chkdsk finds errors and bad sectors on a hard drive, it will try to recover lost data before making repairs and marking sectors. This recovered data will not be in a form that can be used by the default application. It will probably just be bits of text or encoded data that can be read with Notepad or another text editor. Data damaged by a failed hard drive is generally lost data. That is why it is so important to back up your data and perform regular maintenance on your storage devices.