2012-07-30 06:55 AM
Sometimes I do the following to create a LUN clone (note it works when no FlexClone is licensed):
# create a vol snapshot
> snap create vol_01 vol_01_SNAP
# create a LUN clone on the volume
> lun clone create /vol/vol_01/lun-01.CLONE -o noreserve -b /vol/vol_01/lun-01 vol_01_SNAP
# export /vol/vol_01/
# share the LUN clone via NFS
> lun /vol/vol_01/lun-01.CLONE share all
and then I mount the volume via NFS on a host from where I can copy the cloned LUN.
I'm curious if it can be somehow automated with WFA? Any ideas / suggestions are welcome.
Solved! SEE THE SOLUTION
2012-08-01 11:14 AM
Yes, it can be automated with WFA. This is a pretty simple thing to do.
While I didn't create the workflow for you, I hope this gets you the info you need to create this workflow on your own. Let me know if you need more help.
2012-08-09 06:50 AM
Let us know whether you have a working copy. We opened feature tracking requests towards 2.0, but should you have a working copy
it would surely cut our work easier :-)
2012-08-10 07:46 AM
Vladimir, have a look at the attached workflow. It uses LUN clones (not FlexClones) as part of a flow that creates boot images.
A little bit of background on the attached workflow:
1. Customer has a set of volumes containing golden images of OS. Each golden image is placed in a Qtree, resulting in a volume with multiple Qtrees, one Qtree for each version of an OS (i.e. Win2008, Win2008R2, Win2008R2SP1, etc.). Each Qtree contains exactly one LUN.
2. The flow will ask the user to provide the source array and volume, and show a list of all available OS images by detailing all existing Qtrees under that volume
3. The flow will ask the user to provide a destination array and volume, the number of clones, and names of servers these clones are for
4. The flow will create a QSM relationship between the source and destination and wait until the replication is completed
5. The flow will break the replication and remove the replication configuration from the systems (in essence, this LUN represents the first new provisioned server image)
6. The flow will create N-1 Qtrees under the destination volume (one for each new host, the first Qtree is the landing zone for replication and hence the remaining N-1 Qtrees)
7. The flow will create thin provisioned clones in each Qtree by using LUN clone of the replicated LUN
Important note - you will see that one of the entries in the form is the current date/time. This is used as part of the name of the snapshot created to support the clone. We had to do it this way (vs. using a function to determine the current date/time) as it seems like WFA re-evaluated the function in each iteration instead of doing it once, resulting in the flow failing due to changes in the snapshot name resolution.
2012-08-14 12:13 AM
Thanks for the WF, it's helpful. I'm almost finished my own one, with some changes to your initial command. I'm working now on implementing this via WFA atm:
> lun /vol/vol_01/lun-01.CLONE share all
2012-08-14 04:14 AM
Here is the v0.1 of the workflow.
1. One clone per LUN is allowed.
This is partly because a source volomue snapshot is created with "_SNAP" postfix and LUN clone is named with ".CLONE" postfix. It needs changing as I think it's not good to have something hardcoded in commands. Not sure as yet how to fix it properly.
2. No checks done for free space in the source volume. For instance I want the WF to fail if the source volume doesn't have at least 20% free space. Any suggestions here?
2012-08-14 05:22 AM
Have not looked at the flow yet, but a few comments based on your questions:
1. The way around the hard-coded snap name is to create a snapshot with a date/time stamp in the name (unless you absolutely know the naming convention the user uses for Snapshots in their volume).
2. As for size, you probably should use a Finder to find the source volume with a condition for available capacity (i.e. find Volume by name and available capacity). While the workflow I provided as a sample does not do that, it will increase the size of the volume to accommodate for the space needed for the LUN clone(s).