Contact & Subscribe RSS

LinkedIn
RSS

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

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.

 

Comments ( 2 )

  1. Steven ChristopherMarch 18, 2016 15 // Reply

    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. Rob VerheesMarch 18, 2016 15 // Reply

    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.