Subscribe

How to Clone existing SnapCreator Snapshots (email thread)

[ Edited ]
Hi Greg,
I tested this successfully for both _recent and also case where we want to clone an older snapshot with a timestamp on secondary. The case where we want to clone a non _recent has a slight bug which I am fixing (when we rename recent we use "-" and normally we use "_"). I documented below. Again since this was never intended but like many things with SC just kind of works somehow
Here is what you need to make sure is setup to clone secondary (snapmirror destination)
In my example primary is: bck-filer1:keith_test secondary is: bck-filer2:keith_test2
SNAP_TIMESTAMP_ONLY=N
NTAP_SNAPSHOT_DISABLE=Y
NTAP_SNAPMIRROR_USE_SNAPSHOT=Y
NTAP_VOL_CLONE_RESERVE=none
NTAP_CLONE_FOR_BACKUP=Y
NTAP_CLONE_SECONDARY=Y
NTAP_CLONE_SECONDARY_VOLUMES=bck-filer1:bck-filer2/keith_test2
NTAP_NUM_VOL_CLONES=1
Make sure all of these things are setup correctly and it should work. Make sure you use the action "clone_vol"
ie: ./snapcreator.pl --config 443 --action clone_vol --policy daily --verboseNote: This only work if you are not using _recent so SNAP_TIMESTAMP_ONLY=Y since when we rename _recents we use a "-" instead of normal "_", I am going to change this so it is consistent and consider that a slight bug.
Let me knof if you get this working. I also tested using older snapshots with timestamp. It works if you set in config file the following:
SNAP_TIMESTAMP_ONLY=Y
SNAP_TIME=%USER_DEFINED
Note: All snapshots must be taken with SNAP_TIMESTAMP_ONLY=Y for this to work, this is a slight bug I am fixing
List Snapshots:
db2test:~/sandbox/snapcreator # ./snapcreator.pl --profile 443 --action snaplist --policy daily --verbose
########## Gathering Information for bck-filer1:keith_test ##########
[Thu Mar 18 13:35:53 2010] INFO: Performing NetApp Snapshot Inventory for keith_test on bck-filer1
[Thu Mar 18 13:35:53 2010] INFO: NetApp Snapshot Inventory of keith_test on bck-filer1 completed Successfully
########## SnapCreator Snapshot (Primary) List for bck-filer1:keith_test #########
### Snapshot Name ###                           ### Snapshot Timestamp ###
db2prd-daily_20100318133226                             Mar 18 2010 11:30:57
db2prd-daily_20100318133232                             Mar 18 2010 11:31:03
Clone Snapshot db2prd-daily_20100318133226:
./snapcreator.pl --profile 443 --action clone_vol --policy daily --verbose --user_defined 20100318133226
Here we are using the user_defined value to pass in the timestamp so we dont have to update the config file which I think is a cool solution!

Regards,
Keith


From: Tenzer, Keith
Sent: Thursday, March 18, 2010 10:30 AM
To: Loughmiller, Greg
Subject: RE: Create a flexclone without creating a snapshot

Hi Greg,
You can create a clone on secondary if you are using snapmirror as the transport. Let me help you get that working. When you have some time we can work together on it in your test env...it should work. My onlc concern was using the _recent if that would work with the snapshots disabled.
Keith


From: Loughmiller, Greg
Sent: Thursday, March 18, 2010 12:15 AM
To: Tenzer, Keith
Subject: Re: Create a flexclone without creating a snapshot

One issue is I can not create a clone on secondary. Just local

I thumbed this on the itty bitty keyboard on my iPhone.

On Mar 17, 2010, at 6:52 PM, "Tenzer, Keith" <Keith.Tenzer@netapp.com> wrote:

I had a feeling ntap_disable_snapshot would be useful at some point.

I will also try and test my theory about overriding snap_time, if that works I just thought of a really neat way to do cloning for all older snaps not just _recent. Keeping fingers crossed for you.

Keith

Thumb typed email

On Mar 17, 2010, at 11:28 PM, "Loughmiller, Greg" <greg.loughmiller@netapp.comgreg.loughmiller@netapp.com> wrote:

Hey Keith

This may work...doing some initial testing – and it is using the “_recent” snapshot for all of my tests so far...The next step is to create a different config so I can clone at the DR siteSmiley Wink

I think for the most part, I can accomplish what is needed with what u mention... Just need to streamline this; and test a couple of different configurations

Greg Loughmiller
Professional Services Consultant, NCIE-SAN
PS-North Amer. - East
NetApp
678.982.6099 Mobile Phone
http://www.netapp.com/www.netapp.com



From: "Tenzer, Keith" <Keith.Tenzer@netapp.comKeith.Tenzer@netapp.comKeith.Tenzer@netapp.com>
Date: Wed, 17 Mar 2010 06:52:13 -0700
To: "Loughmiller, Greg" <greg.loughmiller@netapp.comgreg.loughmiller@netapp.comgreg.loughmiller@netapp.com>, c-dl-snapcreator <dl-snapcreator@netapp.comdl-snapcreator@netapp.comdl-snapcreator@netapp.com>
Subject: RE: Create a flexclone without creating a snapshot

Hi Greg,

No not by intention but maybe could* be possible (explained below). SnapCreator can only create a clone from a new snapshot not an existing snapshot. We can add this to 3.3. There is a feature list thread for 3.3 in the community, if you want this to be added please explain how you think it should work. We could do what we do with restore, provide a menu to choose volumes and snapshots to clone and then clone them or we could do something else. GUI would have to come later as it always lags cli.

SnapCreatorSnapCreatorhttp://communities.netapp.com/community/products_and_solutions/databases_and_enterprise_apps/snapcreator

What you could do now if you are using _recent snapshots in theory is set:

NTAP_SNAPSHOT_DISABLE=Y

Then setup your clone options and select clone_vol, this should just create clone of recent snapshot. For other snapshots you would have to override the SNAP_TIME in the config file:

SNAP_TIME=03172010173000

This would require listing snapshots "--action snaplist" and taking timestamp and adding it in config as SNAP_TIME

I have never tested this so these are just ideas, let me know if it works but like I said if we want this functionality we should figure out how to implement it

Keith


From: Loughmiller, Greg
Sent: Wednesday, March 17, 2010 1:34 PM
To: c-dl-snapcreator
Subject: Create a flexclone without creating a snapshot

Is there a method to tell SC to create a flexclone without taking a snapshot? If I have the <snapshot name>_recent available-can SC just create a flexclone based on an existing snapshot?
Greg Loughmiller
Professional Services Consultant, NCIE-SAN
PS-North Amer. - East
NetApp
678.982.6099 Mobile Phone
http://www.netapp.com/www.netapp.com

How to Clone existing SnapCreator Snapshots (email thread)

Can you use snapcreator to create a clone from secondary if you use snapvault and not snapmirror?

Re: How to Clone existing SnapCreator Snapshots (email thread)

You can but only with volume snapmirror not with snapvault

You need to setup volume snapmirror and set these options

NTAP_CLONE_SECONDARY=Y

NTAP_CLONE_SECONDARY_VOLUMES=filer1:secondaryFiler1/vol1;filer2:secondaryFiler2/vol2

secondary volumes param maps the primary filer to secondary filer/secondary volume so SC knows what volume is on the other side

Regards,

Keith

Re: How to Clone existing SnapCreator Snapshots (email thread)

So can a snapvault snapshot on secondary storage be mounted up to a server and used in a read/write mode? The reason I am asking is for Disaster Recovery purposes. So if the primary storage is down we want to be able to mount up a snapshot to the server and get the system at DR backup and working with the latest data.

Re: How to Clone existing SnapCreator Snapshots (email thread)

So is a SnapVault secondary unclonable?  Even today?

I'm treating it as 'primary' storage, but the LUNs in the flexclones it creates are read-only.   Not sure how to fix this...it doesn't happen when done manually via CLI.

Also, still having trouble with snapshot naming: the - vs _ bug for _recent naming seems to still be there in 3.6.

Thank you,

-Simon

Re: How to Clone existing SnapCreator Snapshots (email thread)

The best you can do is create two configs

config A to do snapvault

config B to clone snapvault volume

Also you will need SC 3.6 and when you clone you can or should be able to pass in the --snapName to clone an existing snapshots. I havent tried this and SV snapshots have a different format but it should work.

Keith