Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

How to Perform Check Disk on Cluster Shared Volume on StarWind VSAN

  • May 24, 2018
  • 7 min read
Vitalii is a Post-Sales Support Engineer at StarWind about 2 years. Has a broad knowledge of storage, virtualization, backup, and infrastructure implementation. Ping pong as a hobby.
Vitalii is a Post-Sales Support Engineer at StarWind about 2 years. Has a broad knowledge of storage, virtualization, backup, and infrastructure implementation. Ping pong as a hobby.

Introduction

Sometimes, you can see an error in Failover Cluster Manager as “Chkdsk scan needed on volume”. It might happen due to some potential problems on a disk. To fix the issue, the system advices you to run a Chkdsk which is the well-known command for every system administrator.

Problem

So, I have built a 2-node hyperconverged environment on Hyper-V with VSAN from StarWind used to create HA devices for Cluster Shared Volume (CSV) and Witness disk. The Cluster Shared Volume reported that Chkdsk was needed. I am going to show you how to get rid of this message.

Failover Cluster Manager

Failover Cluster Manager

Prerequisites

  • It is highly recommended to backup all virtual machines which are located on the CSV to make sure that you will have a restore point if Chkdsk operation result will be somewhat unexpected.
  • Make sure that all the virtual machines, located on the CSV, are turned off before performing the next step.
  • Turn on “Maintenance Mode” for the CSV. You can do it from Failover Cluster Manager or via PowerShell.

To turn on Maintenance Mode from Failover Cluster Manager:

Open Disks, right-click on Cluster Disk, choose “More actions” and click on the “Turn On Maintenance Mode” option.

Turning on the Maintenance Mode from GUI

Turning on the Maintenance Mode from GUI

To turn on Maintenance Mode from PowerShell:

Run the code below to get the list of cluster volumes and note the name of CSV required:

Run the code to turn on Maintenance Mode:

Solution

We have come to the point in the article when we need to run a Chkdsk command.

Usually, this option is not clickable in Disk Management for the CSV disk:

Performing the Check in Disk Management

Performing the Check in Disk Management

So, we are going to perform the Chkdsk command from the command line.

Open PowerShell or CMD as Administrator on the CSV owner node and run:

When it is done, it might find some problems. In this case, you have to schedule a repair for the next reboot.

Run the Chkdsk in Command Prompt

Run the Chkdsk in Command Prompt

In some cases, when CSV corruption takes more than 15 seconds to fix (chkdsk skips all fixes that are greater than 15 seconds), you need to manually fix the error. To complete this operation, run the following command from CMD as Administrator:

Once the commands are completed, you need to turn off Maintenance Mode for the Cluster Shared Volume.

To turn off Maintenance Mode from Failover Cluster Manager:

Open Disks, right-click on the Cluster Disk, choose “More actions” and click on “Turn Off Maintenance Mode”.

To Turn Off the Maintenance Mode from PowerShell, run the following command:

Open Failover Cluster Manager and check if the CSV has been successfully fixed.

Fixed CSV in Failover Cluster Manager

Fixed CSV in Failover Cluster Manager

Now, you can start the Virtual Machines and run them as usual.

Conclusion

Check Disk is a common operation that any system administrator is dealing with from time to time. Unfortunately, the process requires the virtual machines to be shut down to be completed. But hey, it’s much better to go all the way through to make sure that system is healthy and works as expected than keeping you valuable VMs on and then suddenly losing them because of an unnoticed issue.

Also, in case you need some info on how to run ChkDsk and defrag on Cluster Shared Volumes in Windows Server 2012 R2, check out this article:

https://blogs.msdn.microsoft.com/clustering/2014/01/01/how-to-run-chkdsk-and-defrag-on-cluster-shared-volumes-in-windows-server-2012r2/

Hey! Found Vitalii's tips on how to perform Check Disk on Cluster Shared Volume useful? Looking for a solution that would ensure highly available storage for running your Failover Cluster VMs?
Dmytro Malynka
Dmytro Malynka StarWind Virtual SAN Product Manager

You’re just at the right place and on time! StarWind Virtual SAN delivers rock-solid highly-available (HA) storage for running your mission-critical VMs in your Microsoft Failover Cluster. It’s a simple and high-performing HA storage solution that integrates seamlessly into your Hyper-V environment without a need for any specific knowledge or skills. Interested in learning more? Book a StarWind Virtual SAN demo now to see it in action!