Skip navigation

Q. What's the correct way to perform a defragmentation or use Chkdsk on a Cluster Shared Volume (CSV)?

A. You need to place a CSV in maintenance mode during chkdsk and defrag operations so only the coordinator is accessing the disk. Microsoft has provided a cmdlet, Repair-ClusterSharedVolume, that automatically places a disk in maintenance mode, performs the action (chkdsk/defrag), then turns off maintenance mode.

The other benefit of the tool is that you only need to pass the CSV path, not the GUID of the disk. For example, below you can see a chkdsk in action. If you need to pass parameters, use the -Parameters "" switch.

PS C:\Users\administrator.SAVILLTECH>Repair-ClusterSharedVolume
c:\clusterstorage\volume2 -ChkDsk
The type of the file system is NTFS.
Volume label is lun2.

WARNING! F parameter not specified.
Running CHKDSK in read-only mode.

CHKDSK is verifying files (stage 1 of 3)...
256 file records processed.
File verification completed.
0 large file records processed.
0 bad file records processed.
0 EA records processed.
0 reparse records processed.
CHKDSK is verifying indexes (stage 2 of 3)...
274 index entries processed.
Related Reading:

Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish