20 Replies Latest reply: Dec 22, 2013 7:56 AM by gdekhayser RSS

Volume Clone/Lun Map Automation?

gdekhayser
Currently Being Moderated

Hello all-

 

I want to build a workflow that lets the user choose a filer->volume->snapshot, clone from that snap, and map the lun in that clone to an igroup on that filer with a pre-set LUN ID (say 15 or 16). 

 

I also want to build a reverse workflow that will take that flexcloned lun, UNMAP it, and then destroy the cloned volume.

 

Having trouble getting my head around how to do this.  BTW, this is on 7-mode.

 

Thanks for any advice/help.

 

Glenn

  • Re: Volume Clone/Lun Map Automation?
    hill
    Currently Being Moderated

    Hi Glenn,

     

    I don't believe there is a workflow that's been shared that does exactly what you've requested.  That said, there are several workflows that get close, but I think those are for clustered ONTAP, not 7-mode.  I'm not sure if you've looked through all of the "Pirate Packs" that are shared on the WFA communities, but it might be worthwhile doing so.  Here is a LINK to see the available Pirate Packs.  You can also click on the 'Workflow Examples' category, and look at the documents to see the other examples of workflows that have been shared.

     

    Hope this helps,

     

    Kevin

    • Re: Volume Clone/Lun Map Automation?
      gdekhayser
      Currently Being Moderated

      Thanks- I got the Clone one to work (developed my own workflow), working on the Map Lun part and feel comfortable that will work as well.    Found some issues with WFA2.1, installe d 2.0.1 and had greater success.

       

      One thing that would be VERY helpful- can someone publish the database schema of objects your can SQL against when creating queries in the user inputs?  I find I have to select * and test to see what fields I have available, or dig through the dictionairies.  There should be a reference doc out there- is there one?  Must be.  Link someone?

       

      Thanks

      • Re: Volume Clone/Lun Map Automation?
        sinhaa
        Currently Being Moderated

        Glenn,

         

        @Found some issues with WFA2.1, installe d 2.0.1 and had greater success.

        ----

        What issue did you run into with WFA2.1 that you had to switch to WFA2.0.1?

         

        @One thing that would be VERY helpful- can someone publish the database schema of objects your can SQL against when creating queries in the user inputs?  I find I have to select * and test to see what fields I have available, or dig through the dictionairies.  There should be a reference doc out there- is there one?  Must be.  Link someone?

        -----

         

        There is sure an online Reference Manual located at Help -> Reference Manual where you can look at Dictionary items. But with WFA2.1 there is a very useful feature available call "SQL query auto-complete" which can help you a lot. Give it a try, you'll love it. 

        • Re: Volume Clone/Lun Map Automation?
          gdekhayser
          Currently Being Moderated

          Actually the sql autocomplete wasnt context aware, was nice but needs improvement.  Also I found that if I select t1., t2. from two joined tables that both contained a "name" field, only the second one would be returned.

           

          I will look in the ref doc under dictionary- thx.  Got enough query building in where I got the hang of the fields.

           

           

           

          ---

          Sent from Boxer | http://getboxer.com<http://bit.ly/1hRkK2W>

        • Re: Volume Clone/Lun Map Automation?
          gdekhayser
          Currently Being Moderated

          Also- why the downgrade. Storage.snapshot wouldn't return values even after I enabled acquisition. Worked on 2.0.1 though.

           

           

           

          ---

          Sent from Boxer | http://getboxer.com<http://bit.ly/1hRkK2W>

          • Re: Volume Clone/Lun Map Automation?
            sinhaa
            Currently Being Moderated

            Glenn,

                 Thanks for your feedback on SQL auto-complete feature. We well try to improve it in future..

             

            Regarding storage.snapshot, I'm looking into this issue. I'll keep you updated about it.

             

            warm regards,

            sinhaa

          • Re: Volume Clone/Lun Map Automation?
            sinhaa
            Currently Being Moderated

            I can't reproduce the issue you are pointing about storage.snapshot table in WFA2.1. If you enable acquisition for it, the table does get populated upon the next acquisition.

             

            You may also like to see this thread:

            https://communities.netapp.com/message/116532#116532

            • Re: Volume Clone/Lun Map Automation?
              gdekhayser
              Currently Being Moderated

              How often does the acquisition run?  Perhaps I was simply impatient.

              • Re: Volume Clone/Lun Map Automation?
                adaikkap
                Currently Being Moderated

                Default is 30 mins.

                Btw did you confirm that you UM instance has the snapshot data?

                 

                Regards,

                adai

                Sent from my Droid, excuse typos.

                • Re: Volume Clone/Lun Map Automation?
                  gdekhayser
                  Currently Being Moderated

                  Yes, once I downgraded to 2.0.1 I’ve got all the snapshot info I need.

                   

                  My workflow is to a) clone a volume that contains LUNs that also has a snapshot on the volume; b) map the lun in the new clone to an existing iGroup on the associated array to a user-inputted number with default 15.

                   

                  Step A is complete.  The problem I’m having is the the map lun workflow requires a volume/lun that already exists to get by the planning stage in preview/execute.  How can I tell the map lun workflow to use the lun from the volume I just cloned?

                  • Re: Volume Clone/Lun Map Automation?
                    shailaja
                    Currently Being Moderated

                    Hi,

                     

                    >>Yes, once I downgraded to 2.0.1 I’ve got all the snapshot info I need.

                    Ok. Just wanted to indicate that it did work fine in 2.1 too in our labs. You have to enable acquisition as per Jeremy's screenshot in the post https://communities.netapp.com/message/116532#116532 in 2.1 (last screenshot in that thread)

                     

                    Also note, that the next answer also requires 2.1

                     

                    >> How can I tell the map lun workflow to use the lun from the volume I just cloned?

                     

                    There are two scenarios here:

                    1. Your workflow is using certified commands for "Clone Volume". In that case, this certified command has reservations enabled such that a LUN in the parent

                    volume will be considered and an equivalent entry will be made in the cloned volume too in WFA cache.

                     

                    If your workflow is using this command, then when you search for the LUN to be mapped in the "Map LUN" command, the LUN in the cloned volume can be searched.

                     

                    This works because WFA 2.1 enabled reservations to be considered between commands of the same workflow.

                     

                    You can refer to this post: https://communities.netapp.com/message/114993#114993

                    where there is further explanation around this.

                     

                    A small example screenshot of this is:

                     

                    User inputs window:

                    user_input.png

                     

                    Workflow design:

                    workflow_design.png

                     

                    Map LUN command parameters:

                    map_lun_cmd_details.png

                     

                    2. The second scenario is when you are not using the certified command for "Clone Volume".

                    This is possible but will be tricky to define the LUN in the cloned volume. That's because the LUN gets auto-created behind the scenes as part of some other action i,.e Clone Volume. I can try explaining if you are not using the certified command only.

                     

                    Thanks,

                    Shailaja

                    • Re: Volume Clone/Lun Map Automation?
                      gdekhayser
                      Currently Being Moderated

                      I will be using the certified commands if at all possible.  What you show is exactly what I want to accomplish, although the user inputs I want to make queries because I want the user to have drop-downs and not be able to select bad entries.

                       

                      Quick question- since I now have 2.0.1, can I upgrade to 2.1 by simple install or do I need to un-install 2.0.1 first?

                    • Re: Volume Clone/Lun Map Automation?
                      gdekhayser
                      Currently Being Moderated

                      OK LAST question as I’ve got the workflow WORKING (thank you very much for all the help).

                       

                      The Snapshot object has Name, Timestamp, and volume – but volume is a storage.volume datatype.  When I try to reference it in a sql query (to create a dropdown to select the snapshot), it’s telling me that the column doesn’t exist (i.e. t1.volume.id doesn’t work).

                       

                      I’m sure I’m missing something here, I’m trying to create the join from the snapshot table to the volume table, obviously.

                       

                      thanks

                      • Re: Volume Clone/Lun Map Automation?
                        mgoddard
                        Currently Being Moderated

                        Have you tried something like this?

                         

                        SELECT snapshot.name from storage.snapshot, storage.volume, storage.array WHERE snapshot.volume_id = volume.id AND volume.name = '${VolumeName}' AND volume.array_id = array.id AND array.ip = '${ArrayIP}'

                         

                        It assumes you have two previous input variables VolumeName and ArrayIP, and lists all snapshots. Make sure you have reservations turned on at the workflow level as well.

                         

                        Michael.

                    • Re: Volume Clone/Lun Map Automation?
                      gdekhayser
                      Currently Being Moderated

                      Hey- just realized I don’t see a way to online the LUN after I map it. It’s offline since it’s from a clone.

                       

                      ??

      • Re: Volume Clone/Lun Map Automation?
        mgoddard
        Currently Being Moderated

        Hey Glenn,

         

        I've done a lot of schema work and I find MySQL Workbench very useful for prototyping queries and browsing the data. It's handy for performance tuning queries too if you have complex ones.

         

        Either install it locally, or edit the mysql/my.ini on your WFA server and comment out the bind-address=localhost setting at the end and restart the DB to allow remote connections. Then connect using wfa/Wfa123. You can view data but you can't change data except for the playground database.

         

        Hope that's useful!

         

        Michael.

More Like This

  • Retrieving data ...