NetApp: Get Statistics from Multiple Filers With One Command

Does anyone actually find NetApp OnCommand System Commander to be fast enough for normal operation? I’ll admit, I still create a good amount of Volumes and LUNs using it, but it leaves a lot to be desired in the performance category.  If you follow my blog at all, you know that I’m in the middle of a migration from a non-ha exchange environment to a DAG. Being the sensible admin that I am, I have multiple copies of my Exchange databases on different storage arrays, controlled by different NetApp filers. Using System Manager to monitor the space usage of the Volumes hosting my mailbox databases is way to slow for my comfort.

While I could use PowerShell to get the status of volumes from only each individual filer replacing  using the following snippet:

But that’s two commands… why would you want to enter two commands when you can enter one?!  Assuming you set up the controller objects in lines 2 and 3 above, you can simply run the command below to get all volumes from both Filer1 and Filer2:

While this gets volumes from all controllers, why on EARTH would you want to see the size in bytes?? Seriously…

Below is a finished script that gathers volume information from multiple filers, but also formats the output in a human readable format. If you have uniform naming convention for volumes in your filers, you can un-comment (remove the <# and #> ) and enter the prefix of your volume on line 15.

Leave a Reply

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

Copyright ยฉ 2024