Share on Facebook0Share on Google+0Share on LinkedIn0Share on Reddit6Tweet about this on Twitter0

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 StarWind Virtual SAN 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:

StarWind Virtual SAN eliminates any need for physical shared storage just by mirroring internal flash and storage resources between hypervisor servers. Furthermore, the solution can be run on the off-the-shelf hardware. Such design allows StarWind Virtual SAN to not only achieve high performance and efficient hardware utilization but also reduce operational and capital expenses.

Learn more about ➡ StarWind Virtual SAN.

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/

Views All Time
1
Views Today
8
Appreciate how useful this article was to you?
1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5
5 out of 5, based on 1 review
Loading...
Back to blog
The following two tabs change content below.
Vitalii Feshchenko
Vitalii Feshchenko
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.