If you missed the pre-registration for NetApp MS Azure AD B2C, the new login prompt will offer the option to register. Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

Selecting an Aggregate based on Least Used %

kofchur

Hello,

I have a workflow for creating a cMode snapmirror relationship.  The problem I have is that the workflow keeps selecting the same destination aggregate.  I want it to select the destination aggregate based on least used percentage.  Here is the code for the filter:

SELECT
    aggr.name,
    (((aggr.used_size_mb + '${used_space}')/ aggr.size_mb) * 100) AS used_percentage,
    node.name AS 'node.name',
    cluster.primary_address AS 'node.cluster.primary_address'
FROM
    cm_storage.aggregate AS aggr
JOIN
    cm_storage.node AS node
        ON aggr.node_id = node.id
JOIN
    cm_storage.cluster AS cluster
        ON cluster.id = node.cluster_id
WHERE
    (
        (
            aggr.used_size_mb + '${used_space}'
        ) / aggr.size_mb
    ) * 100 <= '${used_size_threshold}'
ORDER BY
    used_percentage

Now, when I test this, it does in fact order the aggregates from least to greatest usage, but it keeps selecting the same one, eventhough that aggregate is not even close to being the least used.  Any suggestions would be great. 

-todd

 

10 REPLIES 10

nthakur

There is a built-in finder in WFA 2.1 called "Find aggregate for SnapMirror destination volume". Perhaps, that might help when you are designing your own selection algorithm for the destination aggr. Take a look at "Returned attributes" tab. That is where you can select the ordering criteria. That finder has the following criteria (but you can select different columns and reorder them as per your needs):

1. Fault domain separation: Aggregate on a different node than the the specified node usually of the source aggreate.

2. Load balancing across the nodes of the cluster: Aggregate on a node with the least number of volumes.

3. Capacity balancing: Aggregate with the most free space.

neelesh

kofchur

Does not work.  It will list the aggregates like I want (from least used to most used), but when it chooses the aggregate, it seems to be doing so alphabetically.  I can't find the code/logic that selects the aggregate.

nthakur

Are you using a finder that uses your filter? Did you select the column used_percentage at top in the "Returned attributes" tab of the *finder*? See the screenshots below of a finder that I created using your filter query.

kofchur

Here is what I have set up:

It looks as if I'm not using a Finder, but the Filter here seems to be doing the same thing.  In fact, if I test this it works like I want:

But when I test the work flow, it never selects the lest used aggregate.

I'm just learning all this stuff, so forgive my ignorance of how these Filters and Finders work together.

Thanks for your help.

-todd

nthakur

Try creating a named finder with all the filters that you have selected in the first screenshot. Then, use "Returned Attributes" tab of the *finder* to specify the selection order as I have shown in my screenshot.

kofchur

I'm running 2.0, but I think I created the equivalent, but it still does not work.  The finder per se works, in that it will pull the aggregates that are not aggr0 and will order them ascending, but it will not select based on that order:

yaronh

Note that your sorting order is Ascending and not Descending as Neelesh example shows....

Yaron

kofchur

It makes no difference.  It is still choosing an aggregate that is neither the lest used, nor the most used. 

hill

I'm curious if you've acquired the most recent information from Unified Manager for the systems you're interested in?  I know sometimes I set my acquisition schedule to '0' (i.e. manual acquisition), if I'm testing a lot of things... Do you know if WFA has all of the current information for the aggregates it "sees"?

kofchur

Yup.  It updates every 5 min and this has been a problem for months.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

Public