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

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

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:

Get-ClusterSharedVolume 1 Get - ClusterSharedVolume

Run the code to turn on Maintenance Mode:

Get-ClusterSharedVolume “Name of CSV” | Suspend-ClusterResource 1 Get - ClusterSharedVolume “ Name of CSV ” | Suspend - ClusterResource

VSAN from StarWind 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 VSAN from StarWind to not only achieve high performance and efficient hardware utilization but also reduce operational and capital expenses. Learn more about ➡ VSAN from StarWind .

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

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:

chkdsk.exe /f C:\ClusterStorage\Volume1 1 chkdsk . exe / f C : \ ClusterStorage \ Volume1

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

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:

chkdsk.exe /SpotFix 1 chkdsk . exe / SpotFix

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:

Resume-ClusterResource –Name “Name of CSV” 1 Resume - ClusterResource – Name “ Name of CSV ”

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

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-2012–r2/

Related materials:

Views All Time Views All Time 5 Views Today Views Today 27

Appreciate how useful this article was to you?

5 out of 5, based on 1 review 5 out of 5, based on 1 review

Loading... Loading...