跳转到主内容

ONTAP 9.0 中的 Snapshot 命名增强功能

Views:
22
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

可不使用  

适用于

ONTAP 9.0

解答

在经典 Data ONTAP 7- 模式中,快照是使用顺序名称或 create_time 名称创建的。

使用顺序命名时、计划快照名称的格式为计划前缀和序号,其中 0 表示最近拍摄的快照。
例如,如果所用的快照计划是每晚使用的、并且使用了顺序命名,则新的计划快照的名称将为 "Night.0" 。

使用“ create_time ”命名、计划快照名称的格式将使用计划前缀和创建时间。 
在这种情况下,后缀将是格Y-m-d_HM式为的时间戳。

用户可以使用 schedsnapname volume 选项选择其中一个命名方案。

请参见以下示例:

使用顺序快照:

 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

 

使用 create_time 快照:


    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

 

引入集群模式 Data ONTAP 时,由于各种原因,采用了“ create_time ”命名约定作为默认值和唯一选项。 
任何更改快照命名的尝试都会导致类似以下内容的错误消息:


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 更改:

删除集群模式 Data ONTAP 中快照的顺序名称方案会导致应用程序依赖于顺序命名方案和 RFE 821993 出现问题。 
在 ONTAP 9.0 中,sched-snap-name该选项将再次引入并可通过vol modify命令启用。 

此外、集群模式卷的快照命名更改仅在集群 M 主机级别应用、不在节点下 D 刀片级别应用。 
因此,在sched-snap-name集群级别将更改为顺序后、 nodeshell ( D 刀片)仍将显示默认的“ create_time ”,这是一种预期行为。

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::> 

此外,此更改不会恢复旧的行为、而只是命名最新的快照。 
这意味着启用了顺序命名、最新快照始终为“ <prefier> . 0 ”、其中 <prefier> 是快照策略前缀(即 5 分钟、每小时、每周等)。 
当快照策略需要创建另一个快照(新的最新快照)时,最新的快照将重命名为具有 create_time 格式的快照。

例如、使用启用了顺序命名的小时快照策略:

计划的快照创建时间 快照列表 创建时间戳
上午 8:00 每小时。 0 2016-06-23_0800

上午 9:00

每小时。 2016-06-23_0800
小时
2016-06-23_08002016-06-23_0900

上午 10:00

每小时。 2016-06-23_0800
小时。 2016-06-23_0900
小时
2016-06-23_08002016-06-23_09002016-06-23_1000

上午 11:00

每小时。 2016-06-23_0800
小时。 2016-06-23_0900
小时。 2016-06-23_1000
小时
2016-06-23_08002016-06-23_09002016-06-23_10002016-06-23_1100


 

示例:

默认行为:

  1. 检查当前快照命名方案:

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

cluster::>

  1. 快照列表输出显示具有“ create_time ”命名方案的快照:

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. 将快照命名方案更改为顺序:

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

cluster::>

  1. 验证更改是否应用于给定卷:

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

cluster::>

  1. 验证最新快照是否将使用顺序命名方案:

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. 当每个快照策略下一次创建快照时、新的 5 分钟 0 将重命名回“ create_time ”模式,而最新的新快照将使用顺序名称:


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::>

其他信息

在此处添加您的文本。

 

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.
  • 这篇文章对您有帮助吗?