Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Managing WORM Snapshot copies from SnapVault

Snapshot retention for SnapLock volumes  Top

Normally, SnapVault uses the count field of the SnapVault schedule on the secondary storage system to determine the number of Snapshot copies that are retained. Once the count has been reached, the oldest retained Snapshot copies are deleted when new Snapshot copies are added. For SnapLock volumes, older WORM Snapshot copies cannot be deleted until their retention period has expired. WORM Snapshot copies are not deleted automatically. It is your responsibility to delete WORM Snapshot copies once they expire.

Snapshot names for SnapLock volumes  Top

Snapshot copies created by SnapVault on SnapLock Compliance volumes use a different naming scheme from that used by Snapshot copies for regular volumes. Snapshot names for SnapLock volumes use the time and date of the Snapshot copy creation as a suffix. The time and date are generated by the compliance clock. The following is the format of the Snapshot copy name:

snapname.yyyymmdd_hhmmss_zzz

snapname is the Snapshot copy name specified in the schedule

yyyymmdd is the year, month, and day

hhmmss is the hour, minute, and second

zzz is the current time zone setting

Example

%/used        %/total   date          name
----------  ----------  ------------  --------
  2% ( 2%)    0% ( 0%)  Feb 04 02:20  svhourly.20040104_120502_GMT 
  9% ( 3%)    1% ( 0%)  Feb 04 02:15  svhourly.20040104_180601_GMT 

Retention period for SnapVault created WORM Snapshot copies  Top

You can configure the schedules on the SnapVault secondary storage system to create WORM Snapshot copies with a retention period that you specify. For WORM Snapshot copy creation to occur, the volume must exist on the secondary storage system and it must be a SnapLock volume.

Note
If you change the retention period in the schedule, WORM Snapshot copies created under the previous schedule retain their retention periods and WORM Snapshot copies created under the changed schedule use the new retention period.

SnapVault default setting for the retention period  Top

When you configure a SnapVault Snapshot schedule for a SnapLock volume on the secondary storage system, the Snapshot copies created for that volume are WORM Snapshot copies. By default, SnapVault uses the retention period set by the snaplock_default_period vol option as the retention period for the WORM Snapshot copies. You should ensure that the retention periods you configured when creating a SnapLock Compliance volume are correct.

Caution
The default retention period for SnapVault Compliance volumes is 30 years. Be sure to reset the default retention period unless you want all of the created SnapVault WORM Snapshot copies to have a 30-year retention period.

Specifying WORM Snapshot retention periods  Top

You can specify retention periods for different WORM volume Snapshot copies. To specify the retention period for WORM volume Snapshot copies, complete the following step.

Step

Action

1

Enter the following command:

snapvault snap sched -x -o retention_period=period 
   sec_vol snapname count@day_list@hour_list

period is the retention period in days (d), months (m), or years (y).

sec_vol is the name of the volume where the Snapshot copy resides.

snapname is the name of the Snapshot copy.

count is the number of Snapshot copies you want to retain for this set although this value is ignored.

@day_list is a comma-separated list that specifies the days on which a new Snapshot copy is created for this set.

@hour_list specifies the hours at which a new Snapshot copy is created for this set.

Example

WORM Snapshot copies created on the secondary storage system in the sv_proj SnapLock volume have retention periods of 360 days from the time of their creation. Snapshot copies are created at noon and 8 p.m. every day.

snapvault snap sched -x -o retention_period=360d sv_proj sv_hourly 
1@12,20

Extending the retention period of WORM Snapshot copies  Top

To extend the retention period of a WORM Snapshot copy, complete the following step.

Step

Action

1

Enter the command:

snapvault snap retain volume snapshot period

volume is the name of the WORM volume.

snapshot is the name of the Snapshot copy.

period is the retention period in count followed by days (d), months (m), or years (y). See the na_snapvault(1) man page for details.

Example

The following command extends the hourly Snapshot copy on the wormvol volume to 2 years:

snapvault snap retain wormvol sv_hourly.20050513_195442_GMT 2y
***WARNING: YOU ARE REQUESTING SNAPLOCK RETENTION OF A SNAPSHOT***
 
This operation will enforce the retention of the snapshot by 
SnapLock for the specified retention period. You will NOT be able 
to delete the retained snapshot until this retention period has 
been satisfied. The relevant information for confirmation of this 
operation is as follows:
 
        Volume: wormvol
      Snapshot: sv_hourly.20050513_195442_GMT
  Retain until: Fri Feb 17 00:00:27 GMT 2006
 
Are you REALLY sure you want to retain this snapshot? Y

Listing WORM Snapshot copies  Top

WORM Snapshot copies are identified by the word snaplock at the end of each Snapshot copy entry. To list all Snapshot copies, including WORM Snapshot copies, complete the following step.

Step

Action

1

Enter the command:

snap list sec_vol

sec_vol is the name of the WORM volume.

Example

The following lists Snapshot copies on the wormvol volume:

system> snap list wormvol
Volume wormvol
working...

 

 
%/used       %/total  date          name
--------  ----------  ------------  --------
0% ( 0%)    0% ( 0%)  May 13 19:56  sv_hourly.20050513_195442_GMT (snaplock)
3% ( 2%)    1% ( 0%)  May 13 19:51  sv_hourly.20050513_195006_GMT (snaplock)
5% ( 2%)    1% ( 0%)  May 13 19:12  sv_hourly.20050513_191043_GMT (snaplock)

To list Snapshot copies with their retention dates, complete the following step.

Step

Action

1

Enter the command:

snap list -l volume

volume is the name of the WORM volume.

Example

The following lists Snapshot copies and retention dates:

system> snap list -l wormvol
Volume wormvol
working...
 

 
snapshot date              retention date               name 
--------------------------  --------------------------  -------- 
May 13 19:56:50 2005 +0000 May 13 19:59:42 2005 +0000  sv_hourly.20050513_195442_GMT
May 13 19:51:07 2005 +0000 May 13 19:55:08 2005 +0000  sv_hourly.20050513_195006_GMT
May 13 19:12:06 2005 +0000 May 13 19:15:43 2005 +0000  sv_hourly.20050513_191043_GMT

Snapshot copies with a dash (-) in the retention date column are not WORM Snapshot copies; therefore, they do not have retention periods.

Deleting expired WORM Snapshot copies  Top

WORM Snapshot copies that have been retained beyond their retention periods can be deleted. To delete an expired WORM Snapshot copy, complete the following step.

Step

Action

1

Enter the command:

snap delete volume snapshot

volume is the name of the WORM volume.

snapshot is the name of the Snapshot copy.

Trying to delete unexpired WORM Snapshot copies will fail.

Example:


 
system> snap delete wormvol slminutely.20040104_122040_GMT
Illegal operation on snapshot locked by SnapLock.

Retention of more than 255 SnapVault Snapshot copies  Top

You might need to retain more than the 255 Snapshot copies, which is the limit imposed on volumes by Data ONTAP. Actually, the practical limit for WORM Snapshot copies is about 250 because of a few non-WORM base Snapshot copies and temporary Snapshot copies that are used by SnapVault, and Snapshot copies that are needed for managing SnapMirror relationships if you have the SnapVault secondary volumes protected by SnapMirror.

If you need to retain more than 250 Snapshot copies, you can do so by creating a new volume. As subsequent volumes reach the limit, you create newer volumes. In this manner, you can use multiple volumes to retain a larger number of Snapshot copies.

Two approaches to create a new volume

Two approaches to creating a new volume to retain more Snapshot copies are as follows:

Advantages of cloning

The following are advantages of the cloning approach:

Advantages of copying

The following are advantages of the copy approach:

Tasks for creating a new volume for Snapshot retention  Top

The following process lists tasks for creating a new volume for Snapshot retention.

  1. Ensure everything on the old volume is in an appropriate state.
  2. Unconfigure the SnapVault schedules for the old volume.
  3. Create a volume clone or copy the appropriate Snapshot copy to a new volume.
  4. Check or set the retention periods on the new volume.
  5. Check volume options on the new volume.
  6. Restart all SnapVault relationships in the new volume.
  7. Reconfigure the SnapVault schedules in the new volume.
  8. Run a few snapshot targets in the new volume to ensure everything was migrated successfully.
  9. Stop all SnapVault relationships in the old volume.

Details of each task are listed in the following sections.

Note
Free Snapshot copies might be required to complete some operations. If you get an error message stating that the system has reached the Snapshot copy limit per volume, you will need to find unnecessary Snapshot copies and delete them.

Ensure everything on the old volume is in an appropriate state

To ensure everything on the old volume is in an appropriate state, complete the following steps.

Step

Action

1

Check that all relationships for the volume that you will clone or copy are Idle and in the SnapVaulted state by entering the following command:

snapvault status

If...

Then...

They are in this state

Go to Step 3.

They are not in this state, but transfers are proceeding normally

Wait for the transfers to complete, then repeat this step.

Transfers are not proceeding or completed

Go to Step 2

2

Occasionally, the snapvault status command might show a relationship for which there is no permanent configuration information. To check and correct the configuration information, complete the following steps.

  1. Enter the following command:

    snapvault status -c

  2. Compare the output from the snapvault status -c command to the output from the snapvault status command. You should see a one-to-one correspondence. If any relationships are missing, make the output from the two commands consistent.
  3. Create the configuration entry for the missing relationship using the snapvault start command or, if the relationship is not needed, use the snapvault stop command.

    Note
    Using the snapvault stop command destroys the relationship. You should only use this command if the relationship was present by mistake.

3

Ensure that all qtrees with SnapVault relationships are at the same base Snapshot copy by entering the following command:

snapvault status -l

Check the Base Snapshot copy listed for each qtree in the destination volume, to ensure they refer to the same Snapshot copy.

If...

Then...

They refer to the same Snapshot copy

You are finished.

They do not refer to the same Snapshot copy

Go to Step 4

4

Enter the following command to create a new base Snapshot copy for all qtrees in the volume:

snapvault snap create -w sec_vol ""

sec_vol is the current secondary volume.

" " specifies that no snapvault snap sched Snapshot copy is created, such as sv_hourly.20050513_195442_GMT.

Note
All qtrees should be in the SnapVaulted state after the transfer initiated by the snapvault snap create command completes.

5

Go back to Step 1 and ensure everything is in an appropriate state.

Unconfigure the SnapVault schedules for the old volume

Before you unconfigure the schedules, make note of the schedule configuration, including retention periods. Doing so enables you to set up the schedule the same way on the new secondary volume.

To unconfigure the SnapVault schedules, complete the following steps.

Step

Action

1

View the existing schedules by entering the following command:

snapvault snap sched sec_vol
2

Unconfigure the schedules by entering the following command:

snapvault snap unsched sec_vol

Note
If transfers to the secondary volume are currently occurring, the snapvault snap unsched command fails. Wait for them to finish, and then repeat the command.

3

Ensure that everything is in an appropriate state by repeating the steps in the section Ensure everything on the old volume is in an appropriate state.

Create a volume clone or copy the appropriate Snapshot copy to a new volume

To create a volume clone, complete the following steps.

Step

Action

1

Ensure that you licensed the volume cloning feature (flex_clone license) by entering the following command:

license
2

Create the clone by entering the following command:

vol clone create altvol -b sec_vol base_snapshot

altvol is the new secondary volume.

sec_vol is the old secondary volume.

base_snapshot is the Snapshot copy that you found in Step 3 of Ensure everything on the old volume is in an appropriate state.

Note
Clone volumes are in the same aggregate as the parent volume by definition.

When you create the volume clone, you might see several messages that appear to be errors, but they are not. Examples of possible messages are:

Reverting volume altvol to a previous snapshot.
Breaking snapmirrored qtree 1 in volume altvol: base 
snapshot no longer exists. Use snapmirror resync or 
initialize to re-establish the snapmirror.
Breaking snapmirrored qtree 2 in volume altvol: 
WAFL_check broke all snapmirrors in volume wormclone1. 
Use snapmirror resync or initialize to re-establish the 
snapmirror.

When creating a copy of a volume, the copy must be the same type as the old volume (flexible or traditional) and it must be the same compliance type as the old volume (SnapLock Compliance or SnapLock Enterprise).

Note
If the volume you are copying is a flexible volume, the copy does not have to be in the same aggregate as the old volume, nor does it have to be on the same storage system as the old volume.

To create a copy of the old volume, complete the following steps.

Step

Action

1

Create the new volume by entering the following command:

vol create altvol 

altvol is the new volume.

Note
Include the appropriate volume type and sizing information.

2

Put the new volume in a restricted state by entering the following command:

vol restrict altvol
3

Copy the base Snapshot copy from the old volume to the new volume by entering the following command:

vol copy start -s base_snapshot secsystem:secvol altvol

Note
The command assumes that the volume copy is initiated from the system which contains altvol.

4

Put the new volume online by entering the following command:

vol online altvol

When you create the volume copy, you might see several messages that appear to be errors, but they are not. Examples of possible messages are:

Breaking snapmirrored qtree 1 in volume altvol: base 
snapshot no longer exists. Use snapmirror resync or 
initialize to re-establish the snapmirror.
Breaking snapmirrored qtree 2 in volume altvol: 
WAFL_check broke all snapmirrors in volume wormclone1. 
Use snapmirror resync or initialize to re-establish the 
snapmirror.

Check or set the retention periods on the new volume

Clone volumes and volume copies automatically inherit the retention periods from their parent volumes. For this reason, this step is usually a check. You can change the retention periods for the volume if you want.

To check the retention periods on the new volume, complete the following steps.

Step

Action

1

To see the retention periods on the old volume, enter the following command:

vol options sec_vol
2

To see the retention periods on the new volume, enter same command for the new volume:

vol options altvol
3

Compare the output from the two volumes to ensure they are the same.

4

If you want to change the retention periods, enter one or more of the following commands:

vol options altvol snaplock_default_period period
vol options altvol snaplock_maximum_period period
vol options altvol snaplock_miniumum_period period

period is the retention period.

See the na_vol(1) man page for retention period values.

Check volume options on the new volume

As was the case with retention periods, clone volumes and volume copies automatically inherit all options from their parent volumes. Before starting any SnapVault activity on the new volume, ensure that this is the case.

To check volume options on the new volume against volume options on the old volume, complete the following steps.

Step

Action

1

To see all volume options for both volumes, enter the following commands:

vol status -v sec_vol
vol options sec_vol
vol status -v altvol
vol options altvol
2

Compare the output to ensure that all options, except for size-related options, are set to the same values.

Note
It is especially important that the language settings be the same.

Restart all SnapVault relationships in the new volume

The qtrees on the new volume will all be in the normal state, not the snapvaulted state (as shown using the qtree status command). You must restart the SnapVault relationships in the new volume.

Note
To support data integrity in a restrictive SnapLock Compliance environment, the snapvault start -r operation saves all data that was written after the common Snapshot copy to a directory on the volume. For details see SnapVault resynchronization for SnapLock Compliance volumes.

To restart SnapVault relationships in the new volume, complete the following steps.

Step

Action

1

To see the relationships in the old volume, enter the following command:

snapvault status 

You will see relationships for all volumes. The relationships that are listed can be used to generate the relationships in the new volume.

2

To restart SnapVault relationships, enter the following command for each secondary qtree:

snapvault start -r -S pri_system:/vol/pri_vol/pri_qtree
/vol/altvol/dest_qtree

See the na_snapvault(1) man page for details about the snapvault start command.

Note
If you leave out the -r option from the snapvault start command, the restart will fail.

Reconfigure the SnapVault schedules in the new volume

Assuming you are not changing the SnapVault Snapshot schedule on the primary, use the same names and schedule for Snapshot copies.

To reconfigure the SnapVault schedules, complete the following step.

Step

Action

1

Enter the following command:

snapvault snap sched -x -o retention_period=period altvol
snapname
sched_spec

See the na_snapvault(1) man page for details about the snapvault snap sched command.

Note
Specifying the retention period is optional. If a retention period is not specified, the default retention period for the volume is used.

Run a few snapshot targets in the new volume to ensure everything was migrated successfully

After the first scheduled Snapshot copy and transfer have occurred, look at the entries in the new volume.

To view the entries, complete the following steps.

Step

Action

1

Enter the following commands:

snapvault status
snapvault status -c
2

Look at all the entries for the new volume and ensure that everything is working correctly.

Stop all SnapVault relationships in the old volume

When everything is working correctly, you can delete the old relationships. To delete the old relationships, complete the following steps.

Step

Action

1

From the system that contains the old volume, enter the following command for all the qtrees in the old volume:

snapvault stop -f /vol/sec_vol/dest_qtree
2

From the primary, enter the following command for all the qtrees backed up to the old volume:

snapvault release /vol/pri_vol/pri_qtree
sec_system
:/vol/sec_vol/dest_qtree

See the na_snapvault(1) man page for details about the snapvault release command.

The snapvault stop command deletes the qtree from the active file system on the old volume. Backup copies of the qtree are in the Snapshot copies on the old volume and you can access them if you want to browse the old backups or restore from the old backups. The active image of the backup data is moved to the new volume when you restart the SnapVault relationship using the snapvault start -r command.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments