May, 2012

Windows 8 to Better Detect And Repair Hard Drive Problems

In Windows 8, Microsoft has redesigned the chkdsk utility - the tool for hard disk corruption detection and fixing - in an effort to make the diagnostic and repair process less intrusive and disruptive.
In Windows 8 Microsoft increased the number of issues that can be handled online and hence reduced any further need for chkdsk.
Some corruptions are intermittent due to memory issues and may not be a result of an actual corruption on the disk; so Microsoft 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.
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.
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, Microsoft's engineers have 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.
Windows 8 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", 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.
In the OS's new 'health model', the file system health status transitions through four states:
  • Online and healthy
  • Online spot verification needed
  • Online scan needed
  • Spot fix needed

Online and healthy - In this state there are no detected file system corruptions and there is no action required of you.
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.
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. 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.
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.
For more advanced users who want to avoid restarting their system to fix a non-system volume corruption, they can open the Properties dialog for the affected volume, and on the Tools tab, they'll see an option to check the drive for file system errors. Corruption on drives that are not currently in use can be fixed without needing a full restart of the computer.