Microsoft Virtualization Discussions

Raid Group Info via PowerShell

SeanLuce
11,279 Views

Is it possible to get detailed raid group info from the PowerShell Toolkit?

Something similar to "aggr status -r".

I want to be able to see how many raid groups, how many disks in each raid group, etc.

The end goal is to build a script that will report back on any aggregates with unbalanced raid groups.

Thank you,

Sean

1 ACCEPTED SOLUTION

vinith
11,279 Views

Hello Sean,

You can use Get-NaDisk to get started with your script.

Here's an example below where i use the where-object to filter out disks which belong to a raidgroup and also use measure-object to count the number of disks in the raid group.

Get-NaDisk | select raidgroup,aggregate,name,shelf,bay,status,physicalspace,RPM,FW,model,pool | ?{$_.raidgroup -match "rg0"} | select name | Measure-Object

View solution in original post

4 REPLIES 4

CAMPBELLSI
11,279 Views

Hi Sean,

The Get-NaAggr suite of commands might help obtain the information you are after.

Alternatively you may also use powershell to call an SSH utility (via a powershell function) to conenct to the storage controller and run the "aggr status -r command" which you could then output to a text file or into an array for manipulation.

Hope this helps.

vinith
11,280 Views

Hello Sean,

You can use Get-NaDisk to get started with your script.

Here's an example below where i use the where-object to filter out disks which belong to a raidgroup and also use measure-object to count the number of disks in the raid group.

Get-NaDisk | select raidgroup,aggregate,name,shelf,bay,status,physicalspace,RPM,FW,model,pool | ?{$_.raidgroup -match "rg0"} | select name | Measure-Object

SeanLuce
11,279 Views

This is exactly what I was looking for.  Thank you!

tomers
11,049 Views

Hi Guys, 

Any idea how to do the same in cDot ?

Public