Skip to main content
NetApp Knowledge Base

Snapshot naming enhancements in ONTAP 9.0

Views:
1,531
Visibility:
Public
Votes:
1
Category:
ontap-9
Specialty:
core
Last Updated:

 

Applies to

ONTAP 9.0

Answer

In the classic Data ONTAP 7-Mode, snapshots were created with either ordinal names or create_time names.

With ordinal naming, the scheduled snapshot names were formatted with a schedule prefix and an ordinal number, where 0 represented the most recent snapshot taken.
For example, if the snapshot schedule used was nightly and the ordinal naming is used, then a new scheduled snapshot would have the name: "nightly.0".

With the 'create_time' naming, the scheduled snapshot names are formatted with a schedule prefix and a creation time. 
In this case, the suffix would be a timestamp with the Y-m-d_HM format.

Users had the option to select either of the naming schemes by using the schedsnapname volume option.

See the following samples:

Using ordinal snapshots:

  7mode-filer> vol options vol1 schedsnapname ordinal
      7mode-filer> snap list vol1
      Volume vol1
      working...
        %/used       %/total  date          name
      ----------  ----------  ------------  --------
       27% (27%)    0% ( 0%)  Jun 23 08:00  hourly.0
       27% (27%)    0% ( 0%)  Jun 23 07:00  hourly.1
       47% (33%)    0% ( 0%)  Jun 23 00:00  nightly.0
       67% (33%)    1% ( 0%)  Jun 22 00:00  nightly.1
       72% (33%)    1% ( 0%)  Jun 19 20:00  weekly.0

 

Using create_time snapshots:


      7mode-filer> vol options vol1 schedsnapname create_time
      7mode-filer> snap list vol1
      Volume vol1
      working...
        %/used       %/total  date          name
      ----------  ----------  ------------  --------
       27% (27%)    0% ( 0%)  Jun 23 12:00  hourly.2016-06-23_1200
       27% (27%)    0% ( 0%)  Jun 23 07:00  hourly.2016-06-23_0700
       47% (33%)    0% ( 0%)  Jun 23 00:00  nightly.2016-06-23_0000
       67% (33%)    1% ( 0%)  Jun 22 00:00  nightly.2016-06-22_0000
       72% (33%)    1% ( 0%)  Jun 19 00:00  weekly.2016-06-19_0000

 

When clustered Data ONTAP was introduced, the 'create_time' naming convention was adopted as the default and the only option due to various reasons. 
Any attempt to change snapshot naming resulted in an error message similar to the following:


cluster::> vol modify -volume vol1 -sched-snap-name ordinal -vserver vsm1
  (volume modify)

Error: command failed: Option sched-snap-name is not supported on a cluster mode volume.

cluster::>

ONTAP 9 changes:

Removing the ordinal name scheme of snapshots in clustered Data ONTAP created an issue with applications relying on ordinal naming scheme and an RFE 821993 was filed. 
In ONTAP 9.0, the sched-snap-name option is introduced again and can be enabled by the vol modify command. 

Moreover, the snapshot naming change for cluster mode volumes are applied at the cluster M-Host level only and is not applied at the nodeshell D-Blade level. 
So after changing the sched-snap-name at the cluster level to ordinal, the nodeshell (D-Blade) will still display the default 'create_time' and it is an expected behavior.

cluster::> vol modify vol1 -sched-snap-name ordinal
Volume modify successful on volume vol1 of Vserver nfssvm.

cluster::>
cluster::> run -node jsiva-90-01 vol options vol1
nosnap=off, nosnapdir=off, minra=off, no_atime_update=off, nvfail=off,
ignore_inconsistent=off, snapmirrored=off, create_ucode=on,
convert_ucode=on, maxdirsize=83804, schedsnapname=create_time,
fs_size_fixed=off, guarantee=volume, svo_enable=off, svo_checksum=off,
svo_allow_rman=off, svo_reject_errors=off, no_i2p=off,
fractional_reserve=100, extent=off, try_first=volume_grow,
read_realloc=off, snapshot_clone_dependency=off, dlog_hole_reserve=off,
space_slo=none

cluster::> 

Additionally, this change does not bring back the old behavior but just the naming of the latest snapshot. 
This means with ordinal naming enabled, the latest snapshot is always "<prefix>.0" where <prefix> is the snapshot policy prefix (i.e. 5min, hourly, weekly, etc). 
When the snapshot policy needs to make another snapshot (a new latest snapshot), the latest snapshot is renamed to a snapshot with a create_time format.

For example, use an hourly snapshot policy with ordinal naming enabled:

Scheduled Snapshot Creation Time Snapshot List Creation Timestamp
8:00am hourly.0 2016-06-23_0800

9:00am

hourly.2016-06-23_0800
hourly.0
2016-06-23_0800
2016-06-23_0900

10:00am

hourly.2016-06-23_0800
hourly.2016-06-23_0900
hourly.0
2016-06-23_0800
2016-06-23_0900
2016-06-23_1000

11:00am

hourly.2016-06-23_0800
hourly.2016-06-23_0900
hourly.2016-06-23_1000
hourly.0
2016-06-23_0800
2016-06-23_0900
2016-06-23_1000
2016-06-23_1100

 

Example:

Default Behavior:

  1. Check the current snapshot naming scheme:

cluster::> vol show vol1 -fields sched-snap-name
vserver volume sched-snap-name
------- ------ ---------------
nfssvm  vol1   create_time

cluster::>

  1. Snap list output displays the snapshots with 'create_time' naming scheme:

cluster::> snap list vol1
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
nfssvm   vol1
                  hourly.2016-06-23_1309                    64KB     0%   13%
                  5min.2016-06-23_1310                      60KB     0%   13%
2 entries were displayed.

cluster::>

  1. Change the snapshot naming scheme to ordinal:

cluster::> vol modify vol1 -sched-snap-name ordinal
Volume modify successful on volume vol1 of Vserver nfssvm.

cluster::>

  1. Verify the changes are applied to the given volume:

cluster::>  vol show vol1 -fields sched-snap-name
vserver volume sched-snap-name
------- ------ ---------------
nfssvm  vol1   ordinal

cluster::>

  1. Verify the latest snapshot will use the ordinal naming scheme:

cluster::> snap list vol1
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
nfssvm   vol1
                  hourly.2016-06-23_1309                    64KB     0%   13%
                  5min.2016-06-23_1310                      64KB     0%   13%
                  5min.0                                    60KB     0%   12%
3 entries were displayed.

cluster::>

  1. When the next snapshot creation occurs per snapshot policy, this new 5min.0 will be renamed back to 'create_time' scheme, while the latest new one will use the ordinal name:


cluster::> snap list vol1

                                                                 ---Blocks---

Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
nfssvm   vol1
                  hourly.2016-06-23_1309                    64KB     0%   12%
                  5min.2016-06-23_1310                      64KB     0%   12%
                  5min.2016-06-23_1315                      64KB     0%   12%
                  5min.0                                    60KB     0%   12%
4 entries were displayed.

cluster::>

Additional Information

Add your text here.

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.
  • Was this article helpful?