Tech

How and why to run chkdsk to scan and repair hard drive Windows 11


Hard drive failure leads to data loss. Regular maintenance with a Windows 11 utility can prevent a major disaster.

Windows 11 . Hard Drive Scan and Repair
Image: Mark Kaelin

There is one indisputable and inevitable truth about storage technology: It will eventually fail. Whether it is due to normal use, mishandling, or just over time, our storage devices can fail and/or become obsolete. Careful maintenance of our storage devices and systematic data backup are still important to Windows 11 users, even in age solid state drive (SSD) and cloud server.

UNDERSTAND: Quick Glossary: ​​Archive (TechRepublic Premium)

For those who run Windows and use mechanical hard drives, the importance is even more pressing as that storage medium is still most susceptible to immediate failure.

Throughout the history of modern personal computers, mechanical hard drives have had a reputation for failing at the most inopportune times. This is why Windows users with mechanical hard drives should take some time once a month to perform basic maintenance and run a reliable utility called chkdsk.

Summary of chkdsk utility in Windows 11

The chkdsk utility, which stands for “check disk,” will scan the hard drive’s file system and file system metadata for logical and physical errors. Chkdsk is a disk operating system (DOS) management software and has been included as part of every Windows operating system since the beginning.

When used without parameters, chkdsk only shows the status of the volume and does not correct any errors. Although chkdsk can be used from the Windows graphical user interface (GUI), it is usually associated with the command prompt.

Basic chkdsk syntax and related parameters and switches include:

chkdsk [<volume>[[<path>]]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:<size>]] [/b]

  • : Specify the drive letter (followed by a colon), the mount point, or the drive letter.
  • [<path>]: Use only with file allocation tables (FAT) and FAT32. Specify the location and name of the file or set of files that chkdsk will check for fragmentation. You can use ? and * wildcard to specify multiple files.
  • /f: Fix disk errors. The disc must be locked. If chkdsk is unable to 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 every directory when the disk is checked.
  • /r: Locate bad sectors and recover readable information. The disc must be locked. /r includes functionality of /f, with additional analysis of physical disk failures.
  • /x: Force remove the drive first, if necessary. All open latches of the drive are disabled. /x also includes the functionality of /f.
  • /I: Use only with the new technology file system (NTFS). Perform less robust checks on index entries, which reduces the amount of time it takes to run chkdsk.
  • /c: Use only with NTFS. Don’t check for cycles in the directory structure, which reduces the amount of time it takes to run chkdsk.
  • /l[:<size>]: Use only with NTFS. Resize the log file to the size you enter. If you omit the size parameter, /l will display the current size.
  • /b: Use only with NTFS. Clear the list of failed clusters on the drive and rescan all free and allocated clusters for errors. /b includes the functionality of /r. Use this parameter after writing a drive to the new hard drive.
  • /to scan: Use only with NTFS. Run an online scan on the drive.
  • /forceofflinefix: Use only with NTFS. /forceofflinefix must be used with /scan. Skip all online repair; all found bugs are queued for offline repair (e.g. chkdsk/spotfix).
  • /perf: Use only with NTFS. /perf must be used with /scan. Use more system resources to complete the scan as quickly as possible. This can have a negative performance impact on other tasks running on the system.
  • /spotfix: Use only with NTFS. Run in-place repair on the volume.
  • /sdcleanup: Use only with NTFS. Garbage collects unnecessary security descriptors (implicit /f).
  • / offlinescanandfix: Run an offline scan and fix the volume.
  • /freeorphanedchains: Only use with FAT / FAT32 / exFAT. Frees any orphaned cluster strings instead of restoring their contents.
  • /markclean: Only use with FAT / FAT32 / exFAT. Mark the volume clean if no errors are found, even if /f is not specified.
  • / ?: Show help at the command prompt.

The most used chkdsk command is:

chkdsk / f

This command scans for errors, then fixes and marks bad sectors so they are never used again. To perform this task, the drive must be locked. In other words, no other application can access the drive while chkdsk is running. If the drive cannot be locked, the utility will ask if you want to run chkdsk on the next system boot.

You can run chkdsk on an SSD without damaging it, but it’s generally not necessary. Modern SSDs have their own built-in maintenance software to deal with bad sectors and storage failures. Chkdsk is mostly redundant in those situations.

UNDERSTAND: Checklist: Managing Cloud Storage (TechRepublic Premium)

Run chkdsk to repair the hard drive Windows 11

To run chkdsk using the Windows 11 GUI, open Windows File Explorer, navigate to the hard drive you want to scan for errors, and right-click. From the context menu, select Properties, then the Tools tab (Picture A).

Picture A

Tools menu in Windows 11 Data Properties pop-up (D:)
Figure A: Scan your hard drive for any errors via the Tools tab on the drive’s Properties menu.

On the Tools tab, click the Test 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 before. To apply other parameters, you will have to switch to the command prompt.

Search for “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 BUG), you can enter a possible chkdsk command with the appropriate parameters and switches.

Figure BUG

administrator command prompt on Windows 11
Figure B: Entering a possible chkdsk command in the command prompt.

It is important to note that if chkdsk finds errors and bad sectors on the hard drive, it will attempt to recover the lost data before performing repairs and marking the sectors. This recovered data will not be in a usable form by its default application. It will probably just be bits of text or encrypted data that can be read with Notepad or another text editor. Damaged data due to hard drive failure is usually mostly lost data, that’s why it’s so important to back up your data and perform regular maintenance on your storage devices.



Source link

news7g

News7g: Update the world's latest breaking news online of the day, breaking news, politics, society today, international mainstream news .Updated news 24/7: Entertainment, Sports...at the World everyday world. Hot news, images, video clips that are updated quickly and reliably

Related Articles

Back to top button