The NetApp Community is moving to a new platform and is in Read-Only mode. Click to learn more.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

Raid Group Info via PowerShell

SeanLuce
13,180 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
13,180 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
13,180 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
13,181 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
13,180 Views

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

tomers
12,950 Views

Hi Guys, 

Any idea how to do the same in cDot ?

Public