洛阳铲的日志

2011年05月9日

snapmirror使用参考

Filed under: NetApp — 洛阳铲 @ 22:28

netapp的snapmirror可以提供基于卷或者qtree的数据镜像,在购买源和目标都支持snapmirror的license之后,
便可以使用。

snapmirror使用需要注意的是目的卷必须为受限(restricted)卷,而且目的卷的大小必须等于或者大于源卷;
目的qtree必须不存在(snapmirror自动创建目标qtree)。

对于异步镜像,接受数据的目的卷,定期请求镜像源以获取更新数据,请求的周期根据snapmirror.conf来设置

除了周期自动同步外,也可以用snapmirror update命令手动执行同步。在完成初始化同步之后,目的卷或者qtree
会进入snapmirrored状态,这时候便可以使用了,但是是只读的。

当然如果让客户可以写这些目的卷或者qtree,可以使用snapmirror break命令来中断和镜像源之间的关系,让镜像
目的卷或者qtree进入broken-off状态,这时候目的卷或者qtree便可以写了。

而snapmirror resync命令可以让之前进入broken-off的目的卷或者qtree恢复到snapmirrored状态,且重新进入
下一轮的数据镜像,如果给resync指定了之前的源,那么会将前面的镜像源设置为镜像目标,这样原来的源和目标
就颠倒了角色。

netapp 系统会追踪、记录每一个镜像目标(无论是直接镜像还是镜像的镜像),使用snapmirror destinations都
可以看到所有的镜像目标列表,而snapmirror release可以告诉netapp,某个直接镜像不在请求数据更新。
snapmirror destinations的输出结果可以作为snapmirror release的参数使用,比如在查看到镜像目标列表之后
希望停止其中一个镜像,可以使用该参数调用snapmirror release来达到目的,这两个命令都是在源filer上面执行的。

为了节省网络带宽,可以直接使用snapmirror store命令来dump镜像到磁带,然后使用snapmirror retrive把镜像从
磁带还原,当使用多个磁带保存镜像的时候,可以使用snapmirro use来切换磁带

镜像目的root卷中的snapmirror.conf控制目的netapp如何配置以及调度数据镜像,snapmirror的格式除了多一个源
和目标之外,以及镜像参数外,剩下的5个域的意义和crontab的格式一模一样。

而源filer的options设置中,snapmirror.access值则告诉netapp哪些镜像源的访问规则

增加snapmirror.conf
 ds1.la.vclk.net:/vol/mezi_build_prd/build.mezimedia.com nss6-wl:/vol/mezi_build_beta/build.mezimedia.com  – – – – – –

$ sudo rsh nss6.wl.vclk.net snapmirror status
Snapmirror is on.
Source                                                         Destination                                            State          Lag        Status
……
……
ds1.la.vclk.net:/vol/mezi_build_prd/build.mezimedia.com        nss6-wl:/vol/mezi_build_beta/build.mezimedia.com       Uninitialized  –          Idle
……
……
$ sudo rsh nss6.wl.vclk.net snapmirror initialize nss6-wl:/vol/mezi_build_beta/build.mezimedia.com
Transfer started.
Monitor progress with ‘snapmirror status’ or the snapmirror log.
$
$ sudo rsh nss6.wl.vclk.net snapmirror status
Snapmirror is on.
Source                                                         Destination                                            State          Lag        Status
……
……
ds1.la.vclk.net:/vol/mezi_build_prd/build.mezimedia.com        nss6-wl:/vol/mezi_build_beta/build.mezimedia.com       Uninitialized  –          Transferring  (1715 MB done)
……
……

$ sudo rsh nss6.wl.vclk.net snapmirror status
Snapmirror is on.
Source                                                         Destination                                            State          Lag        Status
……
……
ds1.la.vclk.net:/vol/mezi_build_prd/build.mezimedia.com        nss6-wl:/vol/mezi_build_beta/build.mezimedia.com       Snapmirrored   00:37:22   Idle
……
……

临时snapmirror,

$ sudo rsh nss6.wl.vclk.net snapmirror initialize -S  nss6.la.vclk.net:/vol/mezi_shared_prd/httpd /vol/mezi_build_beta/httpd
Transfer aborted: could not read from socket.

被拒绝,查看日志
$$ tail log/snapmirror
……
dst Tue Apr 12 08:33:13 GMT nss6.la.vclk.net:/vol/mezi_shared_prd/httpd nss6-wl:/vol/mezi_build_beta/httpd Request (Initialize)
dst Tue Apr 12 08:33:16 GMT nss6.la.vclk.net:/vol/mezi_shared_prd/httpd nss6-wl:/vol/mezi_build_beta/httpd Abort (could not read from socket)
……
……
$ sudo rsh nss6.la.vclk.net options snapmirror.access
snapmirror.access            host=ds1.sj2.vclk.net,ds2.sj2.vclk.net,filer3.sb.fastclick.net,nss4.sto.vclk.net,ds2.la.vclk.net,nss2.la.vclk.net,nas4.la1.cj.com,nss5.la.vclk.net,filer4.sb.fastclick.net,nss3.wl.vclk.net
$ sudo rsh nss6.la.vclk.net options snapmirror.access ‘host=ds1.sj2.vclk.net,ds2.sj2.vclk.net,filer3.sb.fastclick.net,nss4.sto.vclk.net,ds2.la.vclk.net,nss2.la.vclk.net,nas4.la1.cj.com,nss5.la.vclk.net,filer4.sb.fastclick.net,nss3.wl.vclk.net,nss6.wl.vclk.net’
$ sudo rsh nss6.la.vclk.net options snapmirror.access
snapmirror.access            host=ds1.sj2.vclk.net,ds2.sj2.vclk.net,filer3.sb.fastclick.net,nss4.sto.vclk.net,ds2.la.vclk.net,nss2.la.vclk.net,nas4.la1.cj.com,nss5.la.vclk.net,filer4.sb.fastclick.net,nss3.wl.vclk.net,nss6.wl.vclk.net

OK,成功设置snapmirror.access,再次snapmirror initialize
$ sudo rsh nss6.wl.vclk.net snapmirror initialize -S  nss6.la.vclk.net:/vol/mezi_shared_prd/httpd /vol/mezi_build_beta/httpd
Transfer started.
Monitor progress with ‘snapmirror status’ or the snapmirror log.
$

成功。过段时间查看查看snapmirror状态:

$ sudo rsh nss6.wl.vclk.net snapmirror status /vol/mezi_build_beta/httpd
Snapmirror is on.
Source                                       Destination                         State          Lag        Status
nss6.la.vclk.net:/vol/mezi_shared_prd/httpd  nss6-wl:/vol/mezi_build_beta/httpd  Snapmirrored   00:01:28   Idle

镜像完成之后,中断镜像关系:
$ sudo rsh nss6.wl.vclk.net snapmirror break /vol/mezi_build_beta/httpd
snapmirror break:  /vol/mezi_build_beta/httpd: The destination is not quiesced. Please run “snapmirror quiesce” on this destination before running “snapmirror break”.
$ sudo rsh nss6.wl.vclk.net snapmirror quiesce /vol/mezi_build_beta/httpd
snapmirror quiesce: in progress
 This can be a long-running operation. Use Control – C (^C) to interrupt.
snapmirror quiesce: /vol/mezi_build_beta/httpd :  Successfully quiesced
$ sudo rsh nss6.wl.vclk.net snapmirror status /vol/mezi_build_beta/httpd
Snapmirror is on.
Source                                       Destination                         State          Lag        Status
nss6.la.vclk.net:/vol/mezi_shared_prd/httpd  nss6-wl:/vol/mezi_build_beta/httpd  Quiesced       00:06:45   Idle
$ sudo rsh nss6.wl.vclk.net snapmirror break /vol/mezi_build_beta/httpd
snapmirror break: Destination /vol/mezi_build_beta/httpd is now writable.
$ sudo rsh nss6.wl.vclk.net snapmirror status /vol/mezi_build_beta/httpd
Snapmirror is on.
Source                                       Destination                         State          Lag        Status
nss6.la.vclk.net:/vol/mezi_shared_prd/httpd  nss6-wl:/vol/mezi_build_beta/httpd  Broken-off     00:18:48   Idle
break之后,记得在源执行snapmirror release,这样告诉源无需为snapmirror保留snapshot,同时会自动清理snapmirror创建
的snapshot。

如何删掉Broken-off状态的snapmirror relationship?

对于目的镜像卷或者qtree,只要删掉目标filer对应的snap shot即可,而镜像源使用snapmirror release即可:

$ sudo rsh nss6.wl.vclk.net snapmirror status
Snapmirror is on.
Source                                                         Destination                                            State          Lag        Status
…….
…….
ds1.la.vclk.net:/vol/mezi_build_prd/build.mezimedia.com        nss6-wl:/vol/mezi_build_beta/build.mezimedia.com       Snapmirrored   03:02:59   Idle
nss6.la.vclk.net:/vol/mezi_shared_prd/httpd                    nss6-wl:/vol/mezi_build_beta/httpd                     Broken-off     01:13:46   Idle
ds2.la.vclk.net:/vol/mezi_dpstomcat_dev/amdfeed.mezimedia.com  nss6-wl:/vol/mezi_dpstomcat_dev/amdfeed.mezimedia.com  Snapmirrored   00:40:57   Idle
…….
…….
$ sudo rsh nss6.wl.vclk.net snap list mezi_build_beta
Volume mezi_build_beta
working…

  %/used       %/total  date          name
———-  ———-  ————  ——–
  0% ( 0%)    0% ( 0%)  Apr 12 08:42  nss6-wl(0118060994)_mezi_build_beta_httpd-dst.2
  0% ( 0%)    0% ( 0%)  Apr 12 08:20  ds1-la(0151702346)_mezi_build_prd_build_data-src.0 (snapmirror)
  0% ( 0%)    0% ( 0%)  Apr 12 08:00  hourly.0
  0% ( 0%)    0% ( 0%)  Apr 12 07:29  nss6-wl(0118060994)_mezi_build_beta_build.mezimedia.com-dst.2 (busy,snapmirror)
  0% ( 0%)    0% ( 0%)  Apr 12 00:00  nightly.0
  0% ( 0%)    0% ( 0%)  Apr 11 20:00  hourly.1
$ sudo rsh nss6.wl.vclk.net snap delete ‘mezi_build_beta nss6-wl(0118060994)_mezi_build_beta_httpd-dst.2’
deleting snapshot…
[ggou@fs1.vclk.net /netapp/nss6.wl.vclk.net/etc]$ sudo rsh nss6.wl.vclk.net snap list mezi_build_beta
Volume mezi_build_beta
working…

  %/used       %/total  date          name
———-  ———-  ————  ——–
  0% ( 0%)    0% ( 0%)  Apr 12 08:20  ds1-la(0151702346)_mezi_build_prd_build_data-src.0 (snapmirror)
  0% ( 0%)    0% ( 0%)  Apr 12 08:00  hourly.0
  0% ( 0%)    0% ( 0%)  Apr 12 07:29  nss6-wl(0118060994)_mezi_build_beta_build.mezimedia.com-dst.2 (busy,snapmirror)
  0% ( 0%)    0% ( 0%)  Apr 12 00:00  nightly.0
  0% ( 0%)    0% ( 0%)  Apr 11 20:00  hourly.1
$ sudo rsh nss6.wl.vclk.net snapmirror status
Snapmirror is on.
Source                                                         Destination                                            State          Lag        Status
……
……
ds1.la.vclk.net:/vol/mezi_build_prd/build.mezimedia.com        nss6-wl:/vol/mezi_build_beta/build.mezimedia.com       Snapmirrored   03:07:06   Idle
ds2.la.vclk.net:/vol/mezi_dpstomcat_dev/amdfeed.mezimedia.com  nss6-wl:/vol/mezi_dpstomcat_dev/amdfeed.mezimedia.com  Snapmirrored   00:45:04   Idle
……
……
单个filer上,vol之间snapmirror:  
$ sudo rsh nss6.wl.vclk.net snapmirror initialize -S mezi_mmfdb101_dev mezi_mmfdb102_dev
Transfer aborted: destination must be restricted for an initial transfer.
$ sudo rsh nss6.wl.vclk.net vol  status  mezi_mmfdb102_dev
         Volume State           Status            Options
mezi_mmfdb102_dev online          raid_dp, flex
                         Volume UUID: 95008ed6-6b26-11e0-93d5-00a0980cb33f
                Containing aggregate: ‘aggr0’
$ sudo rsh nss6.wl.vclk.net vol  restrict  mezi_mmfdb102_dev
Volume ‘mezi_mmfdb102_dev’ is now restricted.
$ sudo rsh nss6.wl.vclk.net vol  status  mezi_mmfdb102_dev
         Volume State           Status            Options
mezi_mmfdb102_dev restricted      raid_dp, flex
                         Volume UUID: 95008ed6-6b26-11e0-93d5-00a0980cb33f
                Containing aggregate: ‘aggr0’

$ sudo rsh nss6.wl.vclk.net snapmirror initialize -S nss6-wl:mezi_mmfdb101_dev mezi_mmfdb102_dev
Transfer aborted: destination volume too small; it must be equal to or larger than the source volume.
$ sudo rsh nss6.wl.vclk.net snapmirror initialize -S nss6-wl:mezi_mmfdb101_dev mezi_mmfdb102_dev
Transfer started.
Monitor progress with ‘snapmirror status’ or the snapmirror log.
$ sudo rsh nss6.wl.vclk.net snapmirror initialize -S nss6-wl:mezi_mmfdb101_dev mezi_mmfdb103_dev
Transfer started.
Monitor progress with ‘snapmirror status’ or the snapmirror log.
$ sudo rsh nss6.wl.vclk.net snapmirror status | grep mmfdb
ds2.la.vclk.net:mezi_mmfdb101_dev                              nss6-wl:mezi_mmfdb101_dev                              Uninitialized  01:29:28   Idle
nss6-wl:mezi_mmfdb101_dev                                      nss6-wl:mezi_mmfdb102_dev                              Uninitialized  –          Transferring  (1149 MB done)
nss6-wl:mezi_mmfdb101_dev                                      nss6-wl:mezi_mmfdb103_dev                              Uninitialized  –          Transferring  (455 MB done)
$

中断正在传输数据的snapmirror。 snap abort:
$ sudo rsh nss6.wl.vclk.net snapmirror status | grep mezi_mmfdb
nss6-wl:mezi_mmfdb101_dev                                      nss6-wl:mezi_mmfdb102_dev                              Uninitialized  –          Transferring  (203 GB done)
nss6-wl:mezi_mmfdb101_dev                                      nss6-wl:mezi_mmfdb103_dev                              Uninitialized  –          Transferring  (203 GB done)
$ sudo rsh nss6.wl.vclk.net snapmirror abort mezi_mmfdb102_dev
$ sudo rsh nss6.wl.vclk.net snapmirror status | grep mezi_mmfdb
nss6-wl:mezi_mmfdb101_dev                                      nss6-wl:mezi_mmfdb102_dev                              Uninitialized  –          Idle with restart checkpoint (at 195 GB)
nss6-wl:mezi_mmfdb101_dev                                      nss6-wl:mezi_mmfdb103_dev                              Uninitialized  –          Transferring  (208 GB done)

在源上停止snapmirror,可以使用snapmirror release,这样会让源filer:
1.  删掉snapmirror自动建立的snapshot
2.  删掉snapm relastionship
可以直接使用snapmirror destinations的输出,作为给传递snapmirror release的参数。

$ sudo rsh ds2.la.vclk.net snapmirror destinations
Path       Destination
……
mezi_mmdb101_dev nss6-wl:mezi_mmdb101_dev
mezi_mmfdb101_beta nss5-wl:mezi_mmfdb101_beta
mezi_mmfdb102_beta nss5-wl:mezi_mmfdb102_beta
mezi_mmfdb102_dev nss5-wl:mezi_mmfdb102_dev
……
$ sudo rsh ds2.la.vclk.net snap list mezi_mmfdb101_beta
Volume mezi_mmfdb101_beta
working…

  %/used       %/total  date          name
———-  ———-  ————  ——–
  0% ( 0%)    0% ( 0%)  Apr 18 09:40  nss5-wl(0118060459)_mezi_mmfdb101_beta.311 (snapmirror)
$ sudo rsh ds2.la.vclk.net snapmirror release mezi_mmfdb101_beta nss5-wl:mezi_mmfdb101_beta
$ sudo rsh ds2.la.vclk.net snap list mezi_mmfdb101_beta
Volume mezi_mmfdb101_beta
working…

No snapshots exist.
$ sudo rsh ds2.la.vclk.net snapmirror status | grep mmfdb101
$

最后这个问题,世界上很多人都在问,就用英语写了,方便中外朋友参考。
how to clear a unused snapmirror relationship:
1.  dest filer: snapmirror break,  vol status will changed to online from restricted
2.  src filer: snapmirror relase( use the snapmirror destinations outputss as the arguments); 
    this will tell snapmirror to stop gennerate the snap shot , and delete the unused snap shouts generated by snapmirror
3.  dest filer:  snap delete -a -f vol_name;   delete the snap shot generated automaticlly by snapmirror
4.  dest filer: delete the schedule in snapmirror.conf if exists this setting

2010年10月13日

netapp snap

Filed under: NetApp — 标签:, — HackGou @ 17:47

netapp的自动快照和快照保留空间分配
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net snap list mezi_raw_logs
Volume mezi_raw_logs
working…

%/used %/total date name
———- ———- ———— ——–
0% ( 0%) 0% ( 0%) Mar 15 12:00 hourly.0
0% ( 0%) 0% ( 0%) Mar 15 08:00 hourly.1
0% ( 0%) 0% ( 0%) Mar 15 00:00 nightly.0
0% ( 0%) 0% ( 0%) Mar 14 20:00 hourly.2
0% ( 0%) 0% ( 0%) Mar 14 16:00 hourly.3
0% ( 0%) 0% ( 0%) Mar 14 12:01 hourly.4
0% ( 0%) 0% ( 0%) Mar 14 08:01 hourly.5
0% ( 0%) 0% ( 0%) Mar 14 00:01 nightly.1
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net vol options mezi_raw_logs
nosnap=off, nosnapdir=off, minra=off, no_atime_update=off, nvfail=off,
ignore_inconsistent=off, snapmirrored=off, create_ucode=off,
convert_ucode=off, maxdirsize=83804, schedsnapname=ordinal,
fs_size_fixed=off, compression=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, nbu_archival_snap=off
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net vol options mezi_raw_logs nosnap on
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net vol options mezi_raw_logs
nosnap=on, nosnapdir=off, minra=off, no_atime_update=off, nvfail=off,
ignore_inconsistent=off, snapmirrored=off, create_ucode=off,
convert_ucode=off, maxdirsize=83804, schedsnapname=ordinal,
fs_size_fixed=off, compression=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, nbu_archival_snap=off
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net snap reserve mezi_raw_logs
Volume mezi_raw_logs: current snapshot reserve is 20% or 21390880 k-bytes.
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net df -h mezi_raw_logs
Filesystem total used avail capacity Mounted on
/vol/mezi_raw_logs/ 81GB 77GB 4089MB 95% /vol/mezi_raw_logs/
/vol/mezi_raw_logs/.snapshot 20GB 0GB 20GB 0% /vol/mezi_raw_logs/.snapshot
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net snap reserve mezi_raw_logs 10
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net snap reserve mezi_raw_logs
Volume mezi_raw_logs: current snapshot reserve is 10% or 10695440 k-bytes.
[ggou@fs1.vclk.net /netapp/ds2.la.vclk.net/etc]$ sudo rsh ds2.la.vclk.net df -h mezi_raw_logs
Filesystem total used avail capacity Mounted on
/vol/mezi_raw_logs/ 91GB 77GB 14GB 85% /vol/mezi_raw_logs/
/vol/mezi_raw_logs/.snapshot 10GB 0GB 10GB 0% /vol/mezi_raw_logs/.snapshot

netapp aggr管理

Filed under: NetApp — 标签:, — HackGou @ 17:44

查看所有aggr状态

[ggou@fs1.vclk.net /netapp/nss5.la.vclk.net/etc]$ sudo rsh nss5.la.vclk.net aggr status
Aggr State Status Options
aggr_root online raid_dp, aggr root
aggr0 online raid_dp, aggr raidsize=20
redirect

查看指定aggr状态,并且显示包含的vol

[ggou@fs1.vclk.net /netapp/nss5.la.vclk.net/etc]$ sudo rsh nss5.la.vclk.net aggr status aggr0 -i
Aggr State Status Volumes
aggr0 online raid_dp, aggr mezi_smjpfdb103_prd
redirect mezi_semkml_prd, cj_sites, cj_ap
cj_nispider, cj_fr1, cj_pcjorpt
cj_shopcart, cj_cjsearch
mezi_tracking_prd
mezi_trackingfdb_prd, cj_member
mezi_cmitl_prd
mezi_cmitlfdb101_prd
mezi_cmitlfdb102_prd
mezi_semtool_prd, mezi_mix_prd
mezi_sembidding_prd, cj_pcjx
mezi_smjpapi_prd
mezi_smjpfdb104_prd
mezi_smjpfdb105_prd
mezi_partnerapi_prd
mezi_smusbdb101_prd
mezi_smusbdb102_prd

Volumes: mezi_smjpfdb103_prd, mezi_semkml_prd, cj_sites, cj_ap,
cj_nispider, cj_fr1, cj_pcjorpt, cj_shopcart,
cj_cjsearch, mezi_tracking_prd, mezi_trackingfdb_prd,
cj_member, mezi_cmitl_prd, mezi_cmitlfdb101_prd,
mezi_cmitlfdb102_prd, mezi_semtool_prd, mezi_mix_prd,
mezi_sembidding_prd, cj_pcjx, mezi_smjpapi_prd,
mezi_smjpfdb104_prd, mezi_smjpfdb105_prd,
mezi_partnerapi_prd, mezi_smusbdb101_prd,
mezi_smusbdb102_prd

Plex /aggr0/plex0: online, normal, active
RAID group /aggr0/plex0/rg0: normal
RAID group /aggr0/plex0/rg1: normal
RAID group /aggr0/plex0/rg2: normal

查看aggr空间大小:

[ggou@fs1.vclk.net /netapp/nss5.la.vclk.net/etc]$ sudo rsh nss5.la.vclk.net aggr show_space -h aggr0
Aggregate ‘aggr0’

Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS
14TB 1434GB 645GB 11TB 0KB 10MB

Space allocated to volumes in the aggregate

Volume Allocated Used Guarantee
mezi_smjpfdb103_prd 188GB 57MB volume
mezi_semkml_prd 227GB 170GB volume
cj_sites 2070MB 838MB volume
cj_ap 2133MB 485MB volume
cj_nispider 60GB 25GB volume
cj_fr1 1851GB 1536GB volume
cj_pcjorpt 1601GB 1395GB volume
cj_shopcart 2409GB 2194GB volume
cj_cjsearch 10GB 38MB volume
mezi_tracking_prd 805GB 542GB volume
mezi_trackingfdb_prd 452GB 421GB volume
cj_member 5156MB 249MB volume
mezi_cmitl_prd 10GB 1226MB volume
mezi_cmitlfdb101_prd 60GB 36GB volume
mezi_cmitlfdb102_prd 60GB 5880MB volume
mezi_semtool_prd 10GB 85MB volume
mezi_mix_prd 2068MB 365MB volume
mezi_sembidding_prd 1055GB 956GB volume
cj_pcjx 50GB 7034MB volume
mezi_smjpapi_prd 251GB 79MB volume
mezi_smjpfdb104_prd 188GB 58MB volume
mezi_smjpfdb105_prd 188GB 59MB volume
mezi_partnerapi_prd 226GB 125GB volume
mezi_smusbdb101_prd 514GB 397GB volume
mezi_smusbdb102_prd 514GB 310GB volume

Aggregate Allocated Used Avail
Total space 10TB 8129GB 1514GB
Snap reserve 645GB 623GB 22GB
WAFL reserve 1434GB 142GB 1291GB

netapp snapshot管理

Filed under: NetApp — 标签:, — HackGou @ 17:44
              snap sched [ vol_name [ weeks [ days [ hours [ @list ] ] ] ] ]
Sets the schedule for automatic snapshot creation. The argument vol_name identifies the volume the schedule should be applied to. The second argument indicates how many weekly snapshots should be kept on-line, the third how many daily, and the fourth how many hourly. If an argument is left off, or set to zero, then no snapshot of the corresponding type is created. Daily snapshots are created at 24:00 of each day except Sunday, and weekly snapshots are created at 24:00 on Sunday. Only one snapshot is created at a time. If a weekly snapshot is being created, for instance, no daily or hourly snapshot will be created even if one would otherwise be scheduled. For example, the command
                     snap sched vol0 2 6
                     indicates  that two weekly snapshots and six daily snapshots of volume vol0 should be kept on line.  No hourly snapshots
                     will be created.  For snapshots created on the hour, an optional list of times can be included, indicating the hours  on
                     which snapshots should occur.  For example the command
                     snap sched vol0 2 6 8@8,12,16,20
          
                     indicates  that  in  addition to the weekly and daily snapshots, eight hourly snapshots should be kept on line, and that
                     they should be created at 8 am, 12 am, 4 pm, and 8 pm.  Hours must be specified in 24-hour notation.
              
                 With no argument, snap sched prints the current snapshot schedule for all volumes in the system.  With just the vol_name
                     argument, it prints the schedule for the specified volume.

[ggou@fs1.vclk.net /config/cfengine/inputs]$ sudo rsh nss6.la.vclk.net snap list mezi_smusfdb_prd

Volume mezi_smusfdb_prd

working….

%/used %/total date name

———- ———- ———— ——–

0% ( 0%) 0% ( 0%) Aug 31 00:00 nightly.0

0% ( 0%) 0% ( 0%) Aug 30 20:00 hourly.0

0% ( 0%) 0% ( 0%) Aug 30 16:00 hourly.1

[ggou@fs1.vclk.net /config/cfengine/inputs]$ sudo rsh nss6.la.vclk.net snap delete -a -f mezi_smusfdb_prd

[ggou@fs1.vclk.net /config/cfengine/inputs]$ sudo rsh nss6.la.vclk.net snap list mezi_smusfdb_prd

Volume mezi_smusfdb_prd

working….

%/used %/total date name

———- ———- ———— ——–

0% ( 0%) 0% ( 0%) Aug 31 03:42 smusfdb.201008310342

[ggou@fs1.vclk.net /config/cfengine/inputs]$ sudo rsh nss6.la.vclk.net snap sched mezi_smusfdb_prd

Volume mezi_smusfdb_prd: 0 2 6@8,12,16,20

[ggou@fs1.vclk.net /config/cfengine/inputs]$ sudo rsh nss6.la.vclk.net snap sched mezi_smusfdb_prd 0 0 0

[ggou@fs1.vclk.net /config/cfengine/inputs]$ sudo rsh nss6.la.vclk.net snap sched mezi_smusfdb_prd

Volume mezi_smusfdb_prd: 0 0 0

Powered by WordPress