Published by


Brink's Avatar
Administrator

Join Date: Jul 2009
Posts: 19,918

How to Check a Drive for Errors with "chkdsk" in Windows 8 and 8.1


information   Information
In Windows 8, Microsoft changed the way to approach the health model of NTFS and changed the way we fix corruptions so as to minimize the downtime due to chkdsk. A new file system was also introduced for the future, ReFS, which does not require an offline chkdsk to repair corruptions.

This tutorial will show you how to manually check a drive for file system errors and bad sectors using chkdsk (Check Disk) in Windows 8, Windows RT, Windows 8.1, and Windows RT 8.1.

You must be signed in as an administrator to be able to do the steps in this tutorial.
Note   Note
Redesigning chkdsk and the new NTFS health model in Windows 8
Source: Redesigning chkdsk and the new NTFS health model - Building Windows 8 - Site Home - MSDN Blogs
File system health redone
The incredible growth in storage capacity and user data files has necessitated the redesign of the NTFS health model and chkdsk.

There were three important requirements for file system health that our customers made clear:

  1. Downtime caused by file system corruptions must be zero in continuously available configurations and nearly zero in all other configurations.
  2. A User or Administrator must be made aware of the file system health at all times.
  3. A User or Administrator should be able to easily fix their file system when a corruption occurs in a scheduled manner.

Our design included changes both in the file system and the chkdsk utility to ensure the best availability. The new design splits the process into the following phases to ensure a coordinated, rapid, and transparent resolution to the corruption.

We developed a new method of communication that describes types of corruptions as “verbs” that act upon the key components and points of the design – the file system driver (NTFS), the self-healing module, the spot-verification service, and the chkdsk utility. All file system corruptions are classified as needing one of 18 different “verbs” that we’ve defined in Windows 8. We have also left room for possible new verb definitions that can help us diagnose issues even better in the future.


Key design changes to help improve availability:

  1. Online self-healing: The NTFS self-healing feature was introduced in Windows Vista (and in Windows Server 2008) to reduce the need to run chkdsk. Self-healing is a feature built into NTFS that fixes certain classes of corruptions encountered during normal operation, and can make these fixes while still online. If all issues that are detected are self-healed online, there is no need for an offline repair. In Windows 8 we increased the number of issues that can be handled online and hence reduced any further need for chkdsk.
  2. Online verification: Some corruptions are intermittent due to memory issues and may not be a result of an actual corruption on the disk; so we added a new service to Windows 8, called the spot verification service. It is triggered by the file system driver and it verifies that there is actual corruption on the disk before moving the file system along in the health model. This new service runs in the background and does not affect the normal functioning of the system; it does nothing unless the file system driver triggers it to verify a corruption.
  3. Online identification and logging: When an issue is verified, this triggers an online scan of the file system, which runs as a maintenance task in the file system. In Windows 8, scheduled tasks that are for the maintenance of the computer run only when appropriate (during idle time, etc.). This scan can run as a background task while other programs continue to run in the foreground. As the file system is scanned, all issues that are found are logged for later correction.
  4. Precise and rapid correction – At the user or administrator’s convenience, the volume can be taken offline, and the corruptions logged in the previous step can be fixed. The downtime from this operation, called “Spotfix,” takes only seconds, and on Windows Server 8 systems with cluster shared volumes, we’ve eliminated this downtime completely. With this new model, chkdsk offline run time is now directly proportional to the number of corruptions, rather than being proportional to the number of files as in the old model.
  5. Better manageability – To enable better transparency into the new health model, Windows now exposes the state of the file system via the following interfaces:


  • Action Center – The health of the drive is most visible in the Action Center as the “Drive Status” (see figure below), which tells you when you need to take an action to bring the volume to a healthy state.
  • Explorer: The health state is also exposed in Explorer, under Drive properties.
  • PowerShell: You can also invoke the chkdsk functionality using a new cmdlet in PowerShell, REPAIR-VOLUME, which can be helpful for remote management of file system health.
  • Server Manager: In Windows Server, you can also manage the volume health states directly from the server manager utility.



The new file system health modelIn the new health model, the file system health status transitions through four states – some that are simply informational, and others that require you to act. The health states are:

  1. Online and healthy – In this state there are no detected file system corruptions and there is no action required of you. The file system remains in this state most of the time.
  2. Online spot verification needed– The file system stays in this transient state only for a brief instant after the file system finds a corruption that it cannot self-heal; it puts the volume in this state until the spot verification service verifies the corruption. Again, there is no user action required.
  3. Online scan needed– When the spot-verification service confirms the corruption, it puts the file system in the “online scan needed” state. In the next maintenance window, an online scan is performed; there is no user action required. This state is reflected in the Action Center, so you can run the scan manually if you want to do that before the next maintenance window. The scan is run as a background operation, which means that you can continue using the computer while the scan is performed. During this online scan, all verified issues and fixes are logged for later repair. On Windows Server 8 systems, idle time is determined by monitoring the CPU and storage idle times.
  4. Spot fix needed– The file system puts the volume in this state after the online scan is completed, if required, and this state is reflected in the Action Center. On client systems, you can restart the PC to fix all the file system issues logged in the previous step. The restart is quick (adding just a few additional seconds) and the PC is returned to a healthy state. For Windows Server 8 systems, a restart is unnecessary to fix corruptions on data volumes. Administrators can simply schedule a spot fix during the next maintenance window.





OPTION ONE
To Run "Check Disk" from Properties of Drive

1. Open the This PC window (Windows + E).

2. Right click the drive that you want to check for errors, and click/tap on Properties. (see screenshot below)

Click image for larger version

3. Click/tap on the Tools tab, and click on the Check button under Error checking. (see screenshot below)

Name:  Step-2.jpg
Views: 212730
Size:  52.5 KB

4. Do either step 5 or 6 below for what you would like to do.

5. If No Errors are Found on Drive

A) You could click/tap on on Cancel to not run chkdsk on the drive.

OR

B) You could click/tap on Scan drive to run chkdsk on the drive anyways. Go to step 7 below. (see screenshot below)

Name:  Option-1.jpg
Views: 212204
Size:  50.1 KB

6. If Errors are Found on Drive

A) Click/tap on Repair drive, and go to step 7 below. (see screenshot below)

Name:  Option-2.png
Views: 211883
Size:  27.5 KB

7.
When the scan or repair is complete, you can click/tap on Show Details to have Event Viewer open to view the chkdsk logs of these results. (see screenshot below)

Click image for larger version




OPTION TWO
To Run "chkdsk" in a Command Prompt

NOTE: The chkdsk command can be used on a FAT32 or NTFS formatted disk.


1. Open an elevated command prompt or a command prompt at startup.

2. In the command prompt, type in the following command below followed by one or more switches that you would like to use below with a space between each switch and press Enter.

chkdsk [drive letter]: [switches with space inbetween]


Switches that you can use in the command:

NOTE: The switches in red below are new to Windows 8.

  • /F - Fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer. For example, on the C: drive.
  • /V - On FAT or FAT32 volumes, displays the name of each file in every directory as the disk is checked.
  • /R - Locates bad sectors and recovers readable information. The disk must be locked. Includes the functionality of /f, with the additional analysis of physical disk errors.
  • /L:[size in KB] - Can only be used with a NTFS disk. Changes the chkdsk log file size to the number size in KB you type. If you omit the size parameter, typing /L by itself will display the current chkdsk log file size. For example, to have the default 65536 KB log file for the C: drive, you would type: chkdsk C: /F /L:65536
  • /X - Forces the volume to dismount first, if necessary. All open handles to the drive are invalidated. Includes the functionality of /f.
  • /I - Can only be used with a NTFS disk. Performs a less vigorous check of index entries, which reduces the amount of time required to run chkdsk.
  • /C - Can only be used with a NTFS disk. Does not check cycles within the folder structure, which reduces the amount of time required to run chkdsk.
  • /B - Can only be used with a NTFS disk. Clears the list of bad clusters on the volume and rescans all allocated and free clusters for errors. Includes the functionality of /r. Use this parameter after imaging a volume to a new hard disk drive.
  • /scan - Can only be used with a NTFS disk. Runs a online scan on the volume.
    • /forceofflinefix - Can only be used with a NTFS disk. Must be used with /scan switch. Bypass all online repair; all defects found are queued for offlne repair (ex: "chkdsk /spotfix").
    • /perf - Can only be used with a NTFS disk. Must be used with /scan switch. Uses more system resources to complete a scan as a fast as possible. This may have a negative performance impact on other tasks running on your system.
  • /spotfix - Can only be used with a NTFS disk. Runs spot fixxing on the volume.
  • sdccleanup - Can only be used with a NTFS disk. Garbage collect unneeded security desciptor data. Includes the functionality of /f.
  • offlinescanandfix - Runs an offline scan and fix on the volume.



Click image for larger version
Click image for larger version


That's it,
Shawn