Get folder size on Cluster Shared Volume (CSV) Hyper-v

Posted by

In VMM or Failover cluster manager there is no way to view the total size of the directory’s on the ClusterSharedVolumes (CSV).
Ive made a simple script to determine the size of a folder.

Run this script against a Hyper-v node in a cluster.

 

2 comments

  1. I love this script it actually helped me a lot with what I’m trying to do. However, I need to modify it so that it will go through only two of my volumes on my cluster shared volume and select the one with the most free space. I’m using this script for virtual machine creation with SCVMM. Maybe you could help me. Is there a way you can modify this script so that instead of going through the whole cluster shared volume it will only check two different volumes in the cluster, in my case C:\ClusterStorage\Volume35 and C:\ClusterStorage\Volume36, and select the one with the most free space? Thank you.

  2. Yes, its really simple.

    Change the line: $Vol = Get-clustersharedvolume | Select-Object -ExpandProperty Name

    In: $vol = Get-clustersharedvolume | where{$_.name -match “Volume35” -or $_.name -match “volume36”} | Select-Object -ExpandProperty Name

Leave a Reply

Your email address will not be published. Required fields are marked *