Active IQ Unified Manager Discussions

WFA: Find Aggr from a user input cluster/svm and use it for build volumes

CAPATEL_NET1984
3,201 Views

I am looking for options to see if I can use a query or a find command to find aggr which is least used in capacity and use it in volume create workflow?

what are my options here?

3 REPLIES 3

mbeattie
3,151 Views

Hi,

 

You can use a pre-defined finder (for example "filter aggregates by available capacity" which will return a non-root aggregate with the most available capacity in the cluster).

To use that insert a "Search and define" command. To do this type "search" in the list of commands then drag and drop the "search and define" command into the designer. EG

 

wfa1.png

 

Once you've dragged and dropped the command into the workflow, hover you pointer below it and square with a plus symbol will appear, click on the plus symbol and select "aggregate" for the "cm_storage" scheme as the dictionary type. EG

 

wfa2.png

 

 

Define the variable name and click on the "enter search criteria" link:

 

wfa3.png

 

Select the "finder aggregate by available capacity" finder and enter variable names for the cluster and capacity.

 

wfa4.png

 

Once the aggregate is found you can reference the object in the create volume command. EG instead of entering a value or variable for aggregate name you can reference it as "aggregate1.name" (or whatever you call the aggregate variable)

 

Does this help? Please let me know if you have any questions

 

/Matt

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

CAPATEL_NET1984
3,058 Views

I dont want to specify capacity, I want to search for minimum available. when I added this it has added capacity as userdefine variable. when I added $capacity , it took as user define input.

I want the search to find aggr which has maximum capacity

mbeattie
3,039 Views

Hi,

 

Create a filter (SQL Query) to find a non-root aggregate on a cluster\node with the most available capacity and use that in your find command for the aggregate. EG:

 

wfa1.png

 

To save you typing...

 

SELECT
    `aggregate`.name,
    `aggregate`.available_size_mb,
    cluster.primary_address AS 'node.cluster.primary_address',
    cluster.name AS 'node.cluster.name',
    node.name AS 'node.name'
FROM
    cm_storage.`aggregate`,
    cm_storage.cluster,
    cm_storage.node
WHERE
    `aggregate`.node_id = node.id
    AND node.cluster_id = cluster.id
    AND cluster.primary_address = '${Cluster}'
    AND `aggregate`.has_local_root = 0
ORDER BY
    `aggregate`.available_size_mb DESC LIMIT 1

Note: the "LIMIT" statement ensures it will return a single data aggregate (if multiple data aggregates exist on the node) with the most available capacity (hence the ORDER BY statement)

 

Please let me know if you have any questions

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public