Active IQ Unified Manager Discussions

Need snapshot names of clustered Data ONTAP volumes in WFA3.1 for use in user input fields

kiessl
7,130 Views

Hi,

 

I want the operator of workflows choose from a list of snapshot of volumes (e. g. to use it as a base for a cloning operation). For this I need the snapshots of cDOT volumes in a table (e. g. cm_storage.snapshot) in order to use sql statements to select them.

 

I am aware of the discussions in thread1 or in thread2.

 

But the solution in thread2 cannot be imported in WFA3.1 (see my comments in both threads). Meanwhile the creator of the solution in thread2 has left NetApp and may not update it. NetApp itself seems not to be able or willing to solve this issue (either in  filling this table in WFA by default or porting the solution of thread2 to WFA3.1).

 

I would create this table, datasource and OCUM/cluster connection by myself, if someone can tell me the steps how to do this.

 

Is there somebody who can describe/share what to do to get such a table filled with snapshot names from clustered DataONTAP volumes?

 

Thanks in advance.

 

Walter

1 ACCEPTED SOLUTION

pavand
7,118 Views

Hi Walter,

 

You can refer this pack "Manage SnapMirror-SnapVault Cascade Relationship"  for caching snapshots directly from C-Dot.

 

http://automationstore.netapp.com/pack-list.shtml

 

Regards,

Pavan

View solution in original post

10 REPLIES 10

pavand
7,119 Views

Hi Walter,

 

You can refer this pack "Manage SnapMirror-SnapVault Cascade Relationship"  for caching snapshots directly from C-Dot.

 

http://automationstore.netapp.com/pack-list.shtml

 

Regards,

Pavan

abhit
7,031 Views

This is a NetApp certified pack.

I would recommend to use the snapshot dictionary and cache queries from this pack.


Regards,

Abhi

SURESH_SENNIAPPAN
6,889 Views

Hi Abhi,

 

I am still unable to filter the snapshot for cluster mode volume .

 

Do you have a query to get it ? im using WFA 3.0.0.0.1P1.

GaurabBanerjee
6,846 Views

Hello,

 

I like to know your requirement first.

I can see, there is a table namely 'Snapshot' under cm_storage_smsv from which you can pick the snapshots.

 

So I think, below query will suffice the same:

 

SELECT

    Snapshot.name AS 'name',

    Snapshot.volume AS 'volume',

    Snapshot.vserver AS 'vserver',

    Snapshot.cluster AS 'cluster',

    Snapshot.snapmirror_label AS 'snapmirror_label',

    Snapshot.timestamp AS 'timestamp'

FROM

    cm_storage_smsv.Snapshot Snapshot

WHERE

          Snapshot.volume = '${VolumeName}'

          AND Snapshot.cluster = '${ClusterIP}'

          AND Snapshot.vserver = '${VServerName}'

 

Let me know if I misunderstood something.

Thanks

                --Gaurab

SURESH_SENNIAPPAN
6,781 Views

Hi Gaurab,

 

Actually i am preparing workflow for clone creation in C-Mode and i am alomst done with workflow just filtering snapshot is not working .

 

i have used the below query but im getting the error while using this query , can you help me on this ?

 

Failed to execute query for user input '$snapshot':
SELECT command denied to user 'restricted'@'localhost' for table 'snapshot'

GaurabBanerjee
6,720 Views

Hello Suresh,

 

I'm really very sorry, I didn't understand your problem.

 

Did you mean, the query I've sent is not working?

 

How/where/when did you get the message

"

Failed to execute query for user input '$snapshot':
SELECT command denied to user 'restricted'@'localhost' for table 'snapshot'

"

?

 

Can you plesae share some screen shot or elaborate the same or can share me your incomplete dar on which I can have a look.

 

Thanks,

   --Gaurab

SURESH_SENNIAPPAN
6,622 Views

Hi Abhi,

 

I have attached the screen shot of my priview , while choosing parent volume it should automatically filter the snapshot .

 

I would like set the variable for snapshot and filter it .

 

clone.PNG

 

Thanks

 

S Suresh

 

GaurabBanerjee
6,593 Views

Hello Suresh,

 

Whatever I've understood the problem, you need to do the following task:

  1. Create a data_source (scheme) for snapshots. For the same please write a script (in PowerShell) - The script collects volume snapshot information from the Clustered Data ONTAP.
  2. Create a dictionary entry for Snapshots of a volume on a Clustered Data ONTAP. This dictionary should point to the above created scheme.
  3. Now you can create your own query within your custom command(s) using the Snapshot dictionary entry mention in step 2.

LMK if you need any more help from us.Smiley Happy

 

Thanks,

   --Gaurab

SURESH_SENNIAPPAN
6,507 Views

Hi Gaurab,

 

I am not familier with Scheme and Powershell script , please help me to achive this .

GaurabBanerjee
5,023 Views

Hello Suresh,

 

WHAT?

======

A data source type is used to define a data source, which contains information about where the data in a specific database originates and the method used to acquire data from the data source. For example, a data source can be either a OnCommand Unified Manager (OCUM) database that contains information about a storage environment or a VMware database with information about a data center or a OCCM for cloud.

The Data Source Types table lists the available data source types.

“Data Source” displays the name of the data source type.

“Schema” displays the scheme associated with data source type. A scheme is a table that contains data relevant to your environment. For example, a vc scheme contains data relevant to your virtual environment, such as virtual machines, hosts, and data stores.

 DataSourceTypes.jpg

 

Data Source Types window

The Data Source Types window displays the available data source types and enables you to manage the data source types.

 

WHEN we need a user defined Data Source?

=================================

Let us take an example, OCUM. This unified manager sits between our filers/arrays/vsims and WFA. This is a data manager, manages data coming from attached clusters with it and serves those data to our WFA in a much managed way using (WFA) dictionaries.

HOW it manages all? It has its own dictionaries and APIs to manage the data coming from clusters. But it doesn’t have all the dictionary entry which we can think of in our day to day life. Take an example, Snapshot dictionary. OCUM doesn’t have. So how user will get data related to snapshot from UM? In that time, user needs to define his/her own Data Source Type. For the same, (s)he needs to write a script (WFA 3.1 supports Perl) to fetch information from the attached clusters (as Credentials) with WFA.

 

Hope this information helps.

To write your own script, you can have a look to other work flows which is using a separate data source.

 

Thanks,

   --Gaurab

 

Public