NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

Selecting volumes based on the percentage used

baileyj
8,287 Views

Guys,

I'm looking to have a query select volumes based off the percentage used, all volumes 90% full and up for example.  Any ideas?  I've been beating this around for a while now and getting no traction so I figured I would ask the experts.

Thanks in Advance.

10 REPLIES 10

sundarea
8,149 Views

HI Bailey,

We need to write a filter to list all the volumes based on used size. by the way are you looking for CDOT or 7-Mode. So that i can write a filter and share it with you.

Regards,

Sundar

baileyj
8,150 Views

7-mode, thanks Sundar!

ag
NetApp
8,150 Views

Hi,

I have attached the filter.

Import and use it.

Let me know if it works fine.

Cheers,

Anil

baileyj
8,150 Views

Thanks!  Can you post the code? I'm unable to upgrade to 2.2 until it goes GA so i can't use the one you attached.

sundarea
8,149 Views

Anil G left the office for the day... he will post the code in couple of hours(once he reaches home).

baileyj
8,149 Views

Great, thanks.

ag
NetApp
8,149 Views

Hi bailey,

This is the query i am using in the filter i created.

I was using a later version and forgot for a moment that you would not be able to import it.

SELECT

    array.ip as 'array.ip',

    volume.name as name

FROM

    storage.volume as volume,

    storage.array as array

WHERE

    (

        (

            volume.used_size_mb/volume.available_size_mb

        ) * 100

    ) > '${Percentage}'

    AND array.id = volume.array_id

    AND array.ip = '${array}'

    AND volume.name != 'vol0'

Let me know if it helps.

-Anil

baileyj
8,149 Views

That helps, but it doesn't appear to be doing what I want. 

When I plug in a percentage I'm not just getting volumes of that percentage used or higher but I'm not getting all of the volumes either, what am I missing here?

ag
NetApp
8,150 Views

My bad. Try this!

SELECT

    array.ip as 'array.ip',

    volume.name as name

FROM

    storage.volume as volume,

    storage.array as array

WHERE

    (

        (

            volume.used_size_mb/volume.size_mb

        ) * 100

    ) > '${Percentage}'

    AND array.id = volume.array_id

    AND array.ip = '${array}'

    AND volume.name != 'vol0'

ag
NetApp
7,574 Views

Hi Baileyj,

Did the query work out fine for you?

-Anil

Public