Subscribe

snapshot question

Hello,

 

May I ask some questions about Snapshot?

 

I know Data ONTAP is taking snapshot automatically, and it also delete the snapshot automatically.

 

We hit a situation like this. We have a big volume - 5TB level, it's been shared and users created some directories on that volume. One day, users found one folder (about 500GB) was missing. As the snapshot is volume-level, we can't use snap restore to recover the data. So we copy the data back from a snapshot.

 

Unfortunately, during the copy, the snapshot was aging out, that led the copy failed because the snapshot is gone.

 

My question is: is there a way to lock the snapshot from being deleted or can we make a copy of that snapshot (I think the snapshot created manually would not be deleted by system).

 

Thanks,

 

Sha

Re: snapshot question

Hello,

 

Depending on how you provisioned your volume, there can be some default snapshot schedule applied to it. Something like the following in ONTAP 9 might be there:

 

default 3 true Default policy with hourly, daily & weekly schedules.
Schedule Count Prefix SnapMirror Label
---------------------- ----- ---------------------- -------------------
hourly 6 hourly -
daily 2 daily daily
weekly 2 weekly weekly

 

Anyway, you can create a custom snapshot policy that better suits your retention requirements and/or (as you asked) make a manual snapshot prior to an event that you think might require it.  That said, snapshots over time will start consuming space depending on the number of deleted/changed blocks in your volume, so keep a close eye on your space utilization for data and snapshots.

 

It's not necessarily possible to "copy" a snapshot in that the snapshot is tied to the source volume (which is how it maintains space efficiency).  Your only option along these lines is creating a FlexClone (based on the snapshot you're interested in) and then breaking that clone off the original volume.  That will end up consuming all the space that the original volume held (since you're creating a whole new copy of the volume) so make sure you have the space to accomodate that kind of operation.  Typically FlexClones are used for rapid provisioning of new environments and not typically used for data protection/retention.

 

Hope that helps,

 

Chris 

Re: snapshot question

Thanks for the quick response Chris.

 

Yes, we are using the default snapshot schedule. As you can see, the system would keep 6 hourly snapshots. And we were using one of the hourly snapshot to copy the data from. Before the copy was done, the snapshot was removed.

 

As you mentioned, flexclone consumes space. When the volume is huge, it might not suitable. So we hope there is a way to keep the snapshot till the copy is done. Or before the copy is starting, lock the snapshot or create a copy of the snapshot - keeping it from being purged during the copy. It looks there is not an easy way to do it.

 

Thanks anyway!

 

Sha

 

 

 

 

Re: snapshot question

Actually, if you create a FlexClone of the Volume using the scheduled Snapshot, it will place a lock on that Snapshot so you can perform your recovery safely.  And unless you Split the FlexClone, there is no additional space consumed.  Do be careful though, as ONTAP's scheduled Snapshots will stop if it tried to remove this locked one - until you delete the FlexClone to release the lock.

Re: snapshot question

Thanks! That can be a workaround. Maybe at the same time we can reset the number of hourly snapshot from 6 to 16. After data recovery, set it back to 6.