This script checks the health and capacity of a Storage Cluster based on Windows Server 2012 R2 Scale-Out File Servers. It assumes a specific configuration for Private Clouds using the solution described at http://technet.microsoft.com/en-us/library/dn554251.aspx.

It performs specific health checks for

It includes several sections, including:

Change history:

 

-----------------------

 

Sample output:

 

PS C:\users\user1> .\Test-StorageHealth.ps1
Writing to path : C:\Users\user1\HealthTest\
Script Version : 1.8
Date of capture : 09/14/2014 22:08:20
<<< Phase 1 - Storage Health Overview >>>
Cluster Name : Domain01-Clu1.Domain01.test
Scale-Out File Server Name : Domain01-FS.Domain01.test
Access node : Domain01N17.Domain01.test
Cluster Nodes up: 4 / 4
Cluster Networks up: 2 / 2
Cluster Resources Online: 12 / 12
Cluster Shared Volumes Online: 33 / 33
Volumes Online (CSV): 33 / 33
Dedup Volumes Healthy: 16 / 16
Virtual Disks Healthy: 34 / 34
Storage Pools Healthy: 3 / 3
Physical Disks Healthy: 238 / 239
WARNING: Fewer physical disks than the 240 expected
WARNING: Unhealthy physical disk(s) detected
Storage Enclosures Healthy: 4 / 4
CA Shares Healthy: 34 / 34
Users with Open Files: 42
Users with a Witness: 35
<<< Phase 2 - details on unhealthy components >>>
Physical Disks:
FriendlyName   EnclosureNumber SlotNumber HealthStatus OperationalStatus  Usage
------------   --------------- ---------- ------------ -----------------  -----
PhysicalDisk-1                            Warning      Lost Communication Retired
<<< Phase 3 - Firmware and drivers >>>
Relevant Driver versions
Device Name, Driver Version
---------------------------
LSI Adapter, SAS2 2308 Mustang, 2.0.72.1
Chelsio T520-CR 10G Generic function, 5.2.20.0
Chelsio Network Adapter, 5.2.20.0
Chelsio T520-CR 10G Bus Enumerator, 5.2.20.0
LSI MegaRAID Virtual Device, 6.600.21.8
Physical disks by Media Type, Model and Firmware Version
Count Media Type, Model, Firmware Version
----- -----------------------------------
  189 HDD, WD4001FYYG      , DXR8
   48 SSD, LB806M          , D323
    1 HDD, ST4000NM0023    , GS0D
    1 HDD
List of Storage Enclosures by Model and Firmware Version
Count Model, Firmware Version
----- -----------------------
    4 MD3060e         , 0393
<<< Phase 4 - Pool, Physical Disk and Volume Details >>>
Collecting device associations...
Physical disks by Enclosure, Media Type and Health Status, with total and unallocated space
Note: Sizes shown in gigabytes (GB)
Enc Media Health  Count Avg Size Total Size Unallocated Unalloc %
--- ----- ------  ----- -------- ---------- ----------- ---------
0   HDD   Healthy    47 3,725.25 175,086.75   15,987.00      9.13
0   SSD   Healthy    12   744.50   8,934.00      892.50      9.99
1   HDD   Healthy    47 3,725.25 175,086.75   15,931.00      9.10
1   SSD   Healthy    12   744.50   8,934.00      899.50     10.07
2   HDD   Healthy    48 3,725.25 178,812.00   16,059.00      8.98
2   SSD   Healthy    12   744.50   8,934.00      879.50      9.84
3   HDD   Healthy    48 3,725.25 178,812.00   16,117.00      9.01
3   SSD   Healthy    12   744.50   8,934.00      896.50     10.03
Pools with health, total size and unallocated space
Note: Sizes shown in gigabytes (GB)
Name  Health  Total Size Unallocated Unalloc%
----  ------  ---------- ----------- --------
Pool1 Healthy 253,306.00   18,673.00     7.37
Pool2 Healthy 249,580.75   14,984.00     6.00
Pool3 Healthy 240,646.75   34,005.00    14.13
Volumes with status, total size and available size, sorted by Available Size
Notes: Sizes shown in gigabytes (GB). * means multiple shares on that volume
Volume   Share    Health  Resiliency Cols Total Size Available Avail%
------   -----    ------  ---------- ---- ---------- --------- ------
Volume4  QShare   Healthy Mirror,3,E    4       3.97      3.92  98.90
Volume1  HShare*  Healthy Mirror,3,E    4   9,771.87  7,226.67  73.95
Volume19 BShare19 Healthy Parity,1,E    7   7,376.00  7,333.29  99.42
Volume31 BShare31 Healthy Parity,1,E    7   7,376.00  7,374.41  99.98
Volume30 BShare30 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume22 BShare22 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume33 BShare33 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume18 BShare18 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume29 BShare29 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume20 BShare20 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume23 BShare23 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume26 BShare26 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume27 BShare27 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume32 BShare32 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume25 BShare25 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume28 BShare28 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume24 BShare24 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume21 BShare21 Healthy Parity,1,E    7   7,376.00  7,374.46  99.98
Volume6  TShare3  Healthy Mirror,3,E    4   9,771.87  8,319.44  85.14
Volume15 TShare12 Healthy Mirror,3,E    4   9,771.87  8,672.87  88.75
Volume12 TShare9  Healthy Mirror,3,E    4   9,771.87  8,823.04  90.29
Volume16 TShare13 Healthy Mirror,3,E    4   9,771.87  9,046.14  92.57
Volume3  TShare1  Healthy Mirror,3,E    4   9,771.87  9,274.84  94.91
Volume9  TShare6  Healthy Mirror,3,E    4   9,771.87  9,484.03  97.05
Volume13 TShare10 Healthy Mirror,3,E    4   9,771.87  9,514.79  97.37
Volume8  TShare5  Healthy Mirror,3,E    4   9,771.87  9,515.58  97.38
Volume14 TShare11 Healthy Mirror,3,E    4   9,771.87  9,606.06  98.30
Volume2  LShare1  Healthy Mirror,3,E    4   9,771.87  9,684.71  99.11
Volume7  TShare4  Healthy Mirror,3,E    4   9,771.87  9,690.80  99.17
Volume17 TShare14 Healthy Mirror,3,E    4   9,771.87  9,710.65  99.37
Volume5  TShare2  Healthy Mirror,3,E    4   9,771.87  9,744.89  99.72
Volume11 TShare8  Healthy Mirror,3,E    4   9,771.87  9,757.30  99.85
Volume10 TShare7  Healthy Mirror,3,E    4   9,771.87  9,757.43  99.85
Dedup Volumes with status, total size and available size, sorted by Savings %
Notes: Sizes shown in gigabytes (GB). * means multiple shares on that volume
Volume   Share    Capacity Before After Savings%     Free Free% Files
-------  -----    -------- ------ ----- --------     ---- ----- -----
Volume19 BShare19 7,376.00  55.44 42.71    22.00 7,333.29 99.42    13
Volume31 BShare31 7,376.00   1.70  1.58     6.00 7,374.41 99.98    10
Volume26 BShare26 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume24 BShare24 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume33 BShare33 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume32 BShare32 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume25 BShare25 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume23 BShare23 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume21 BShare21 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume18 BShare18 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume28 BShare28 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume27 BShare27 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume30 BShare30 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume29 BShare29 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume20 BShare20 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
Volume22 BShare22 7,376.00   1.53  1.53     0.00 7,374.46 99.98     0
<<< Phase 5 - Storage Performance >>>
Please wait for 60 seconds while performance samples are collected.
Collected 60 seconds of raw performance counters. Processing...
Storage Performance per Volume, sorted by Latency
Notes: Latencies in milliseconds (ms). * means multiple shares on that volume
Pool  Volume   Share    ReadIOPS WriteIOPS TotalIOPS ReadLatency WriteLatency
----  ------   -----    -------- --------- --------- ----------- ------------
Pool2 volume13 TShare10      3.9       9.9      13.8       0.736       11.792
Pool2 volume14 TShare11      0.5      12.3      12.8       0.533        7.858
Pool2 volume12 TShare9       0.5      21.1      21.6       5.073        6.404
Pool1 volume9  TShare6         0       4.9       4.9       5.333        5.821
Pool1 volume6  TShare3       2.8      34.8      37.6       4.901        5.838
Pool2 volume11 TShare8       0.1       0.9         1        9.68         4.62
Pool1 volume7  TShare4       0.3       6.3       6.6        4.48        5.153
Pool1 volume3  TShare1       2.2      16.1      18.3       3.201        5.422
Pool2 volume16 TShare13      0.3      24.3      24.6       1.668        5.491
Pool1 volume17 TShare14      0.1       1.1       1.2       9.676        3.388
Pool2 volume15 TShare12        1       5.8       6.8       0.746        5.388
Pool1 volume8  TShare5       0.7       7.5       8.2       0.641        4.777
Pool2 volume10 TShare7         0       0.8       0.8       12.43          2.6
Pool2 volume1  HShare*      10.3     128.4     138.7       2.076        4.422
Pool1 volume5  TShare2         0       0.3       0.3           0        3.627
Pool3 volume19 BShare19        0       1.3       1.3      13.073        2.347
Pool3 volume33 BShare33        0         0         0           0            0
Pool3 volume32 BShare32        0         0         0           0            0
Pool3 volume31 BShare31        0         0         0           0            0
Pool1 volume4  QShare          0         0         0           0            0
Pool3 volume18 BShare18        0         0         0           0            0
Pool1 volume2  LShare1         0         0         0           0            0
Pool3 volume24 BShare24        0         0         0           0            0
Pool3 volume30 BShare30        0         0         0           0            0
Pool3 volume21 BShare21        0         0         0           0            0
Pool3 volume25 BShare25        0         0         0           0            0
Pool3 volume22 BShare22        0         0         0           0            0
Pool3 volume23 BShare23        0         0         0           0            0
Pool3 volume26 BShare26        0         0         0           0            0
Pool3 volume29 BShare29        0         0         0           0            0
Pool3 volume20 BShare20        0         0         0           0            0
Pool3 volume27 BShare27        0         0         0           0            0
Pool3 volume28 BShare28        0         0         0           0            0
<<< Phase 6 - Recent Error events >>>
Starting Export of Cluster Logs...
Exporting Event Logs...
Copying Event Logs....
Processing Event Logs...
Gathering System Info and Minidump files ...
Receiving Cluster Logs...
Mode         LastWriteTime    Length Name
----         -------------    ------ ----
-a---  9/14/2014  10:11 PM 136609022 Domain01N17.Domain01.test_cluster.log
-a---  9/14/2014  10:11 PM 137923350 Domain01N18.Domain01.test_cluster.log
-a---  9/14/2014  10:11 PM 137973062 Domain01N19.Domain01.test_cluster.log
-a---  9/14/2014  10:11 PM 138396456 Domain01N20.Domain01.test_cluster.log
All Logs Received
Summary of Error Events (in the last 24 hours) by LogName and EventId
LogName                 EventId  N17  N18   N19  N20 Total Message
-------                 -------  ---  ---  ---   --- ----- -------
SmbClient/Connectivity  <30803>    0    0    0  2304  2304 The network connection failed...
SMBServer/Security      <551>    343   11  328   339  1021 SMB Session Authentication Fa...
SmbClient/Security      <31002>    0  984   33     0  1017 The outbound authentication f...
SMBServer/Security      <1009>   339   11  328   339  1017 The server denied anonymous a...
Application             <12289>   50   75  150   120   395 Volume Shadow Copy Service er...
System                  <1>       17   16   14    11    58 Unexpected failure. Error cod...
Shared-VHDX/Operational <80>       6    9   18    15    48 Error attaching to volume. Vo...
Shared-VHDX/Operational <128>     13   12    3     1    29 Error opening handle for init...
Application             <1023>     2    4    4     4    14 Windows cannot load the exten...
Application             <257>      1    0    0     1     2 The volume (C:\ClusterStorage...
<<< Phase 7 - Compacting files for transport >>>
Creating zip file with objects, logs and events.
Cleaning up temporary directory C:\Users\user1\HealthTest\
Zip File Name : C:\Users\user1\HealthTest-Domain01-Clu1-20140914-2208.ZIP
PS C:\users\user1>

 

-----------------------

 

To use the script, download the file Test-StorageHealth.ps1 and copy it to a local folder.

Then, from an elevated PowerShell window (running as Administrator), run the script.

For basic operation:

To save results to a specified folder: 

To review results previously save to a folder:

To execute against a remote cluster:

To exclude events and other diagnostic information 

  

PowerShell
Edit|Remove
# For basic operation 
Test-StorageHealth.ps1  
 
# To save results to a specified folder 
Test-StorageHealth.ps1 -WriteToPath D:\Folder  
 
# To review results previously save to a folder 
Test-StorageHealth.ps1 -ReadFromPath D:\Folder  
 
# To execute against a remote cluster 
Test-StorageHealth.ps1 -ClusterName CLUS01  
 
# To exclude events and other diagnostic information  
Test-StorageHealth.ps1 -IncludeEvents:$false 

 

----------------------

 

For those looking to understand how the script works, I recommend reading the following blog posts: