31 Days of Our Favorite Things: Gone in 8 Seconds chkdsk in Windows Server 2012 (Part 29 of 31)

Yes I mean that chkdsk and I mean not only your small volumes but I also mean your very large volumes, up to 64TB.  Traditionally when you created your volumes on your drives you keep them relatively small, because repair operations like chkdsk where taken into consideration.  I know we wanted to have huge drives and volumes but sometimes the performance of chkdsk on volumes would take a long time.  With Windows Server 2012 we have dramatically improved the time chkdsk will run.  However the goal of the file system in Windows Sever 2012 is to be self tuning so you do have to run chkdsk.  There is some great maintenance and reporting done under the covers to not only fix problems automatically but to also inform you better.  You can quickly see the status of your drives in the action center under the maintenance category:

image

Hopefully you will always see OK and drives are working, there may come a time that when you hop into the action center you may see, run online scan.  You read that correctly, I meant online.  Now when chkdsk runs its analysis phase is that it will run online, where as before in Windows Server 2008 R2 the analysis could take the volume off line.  More importantly when you run the commands to fix the volume it should not take longer than 8 seconds to do a spot fix, which is simply going back and fixing the trouble spots.  Additionally if the volume is a part of a Cluster Shared Volume (CSV) you should never see the volume going offline, so you have both analysis and repair while the drive is online!

imageThe analogy that I will borrow from my friend John Savill is based on topic everyone loves, road construction.  Ah can almost smell summer.  So if road construction worked like the file system in Windows Server 2012, it may never need repair.  However if the road did need to be fixed, now the construction crew would drive along the highway at full speed finding all the potholes to repair with no orange barrels.  Now after the road sections in need of repair were found, then the orange barrels would go up for no more than 8 seconds while all the repair on the entire road is done, and if the road happened to be multiple lane highway (CSV), you would see no barrels and the road would be fixed as you drove on it.  Ah dare to dream.   So the new file system and repair technologies can give you a new perspective on how you leverage your storage.  Here are some of the benefits of the new chkdsk:

  • You can confidently deploy large volumes. Corruption-related downtime is now proportional to only the number of corruptions on the volume.
  • If you are using clustered shared volumes do not see any downtime, even for correcting corruption events that would normally require a remount.
  • Windows Server 2012 actively monitors the health state of the file system volume, and it always provides the health state to the administrator.
  • You will not see any downtime for transient corruption events.
  • You will experience significantly fewer corruption events.

There are some new switches you will want to get to know with chkdsk in Windows Server 2012:

  • /scan Runs a online scan on the volume
  • /forceofflinefix  (Must be used with "/scan") Bypass all online repair; all defects found are queued for offline repair (i.e. "chkdsk /spotfix").
  • /perf  (Must be used with "/scan") Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.
  • /spotfix  Runs spot fixing on the volume
  • /sdcleanup  Garbage collect unneeded security descriptor data (implies /F).
  • /offlinescanandfix Runs an offline scan and fix on the volume.

Now when you run chkdsk /scan you will see a screen similar to this one:

clip_image002

Wait, why am I showing you chkdsk, guess what there is now a PowerShell command to take advantage of this new functionality as well, with the Repair-Volume cmdlet.  The cmdlet supports the same functionality with these parameters:

  • -OfflineScanAndFix: equivalent to chkdsk /f. which is the traditional switch to fix errors on the disk
  • -Scan: equivalent to chkdsk /scan.
  • -SpotFix: equivalent to chkdsk /spotfix

Here is what Repair-Volume –DriveLetter C –Scan would look like:

clip_image004

Fundamentally either command will do the same thing, one nice thing about PowerShell is you can leverage the –AsJob parameter and allow this to run as a background job on the system.   Even though the volume does remain online during the scan you can at least move the process to the background.  So taking advantage of the new online capabilities of chkdsk, will save you time and administrative effort.

So what do all this improvements mean, in a word tremendous amount of increased up time for your volumes when you need to repair them, which hopefully is not often.  How big of an improvement is this over Windows Server 2008 R2, check out the results for yourself, yes that is right repairs took <8 seconds (take a look at the article here: NTFS Health and Chkdsk):

clip_image006

We hope you are enjoying the series and check out Windows Server 2012 by taking a look at these downloads:

If you missed any of the parts you can find the rest of the series here: 31 Days of Our Favorite Things in Windows Server 2012.