Accepted Solution

Create a Volume if it does not exist?

Ok, bit of a strange question....

I am in the process of creating a workflow (for Oracle data stores) and as part of the design they want all the binary qtrees on the same volume... There are a few checks/rules around this:

  1. If the first binary qtree does not exist then by definition the volume does not exist, so create the volume and create the first qtree.
  2. If a binary qtree exists (I can search on naming rules) then identify which volume it is in, check if vol has enough space and add second qtree.
  3. If not enough space on volume, either grow volume, or create a new vol (I need to figure out what is the deciding factor around this).

Anyway, the issue I have is that in the workflow I have a command to create the volume

and the find chart associated with it has the check to see if the volume exists (I created my own fiter and finder for this and it works fine)

so if it finds the volume, it then returns, however the command fails as it still expects the information to create the volume.....

Is there any other way of doing this? I find the volume by checking for specific text in the qtree name.



Re: Create a Volume if it does not exist?

Scratch that, I managed to answer my own question

Essentially I replaced the normal (true) for enabling the command with a find chart:

And that find chart returns either true or false depending on what it finds...


Re: Create a Volume if it does not exist?

Yep, that's exactly how to do it.  Congrats on figuring it out yourself.

Let us know if you have more questions like how to implement decision logic for whether to grow a volume or create a new one (once you know what the logic is), finding the next volume or qtree name in a series, or whatever.



Re: Create a Volume if it does not exist?

Thanks Dave, will do. That's exactly what I will be looking at next, however I still need my customer to tell me exactly what they need. I hate spending hours on this to be told, now that's not what we need, do it this way rather...