netapp学习(十一)---Snapmirror

本文详细介绍NetApp SnapMirror的配置步骤及工作原理。包括使目的卷受限、解决初始化错误、监控同步状态直至完成的过程。同时演示了如何处理文件更新与删除操作,并提供了图形界面管理SnapMirror状态的方法。

snapmirror有两个条件:(1)、目的卷是restricted,(2)目的卷大小大于或等于源卷

下面开始实验

1、在目的端使目的卷restricted

DataOnTap2> vol restrict vol1

Volume 'vol4' is now restricted.

2、如果执行下面这句命令时报错,DataOnTap2> snapmirror initialize -S 172.20.10.214:vol1 DataOnTap2:vol1

Fri Sep 16 05:25:23 GMT [DataOnTap2: replication.dst.err:error]: SnapMirror: destination transfer from 172.20.10.214:vol1 to vol1: transfer from source not possible; snapmirror may be misconfigured, the source volume may be busy or unavailable.

Transfer aborted: transfer from source not possible; snapmirror may be misconfigured, the source volume may be busy or unavailable.

则只需在源端执行

DataOnTap> options snapmirror.access host=all

3、目的端重新执行

DataOnTap2> snapmirror initialize -S 172.20.10.214:vol1 DataOnTap2:vol1

Transfer started.

Monitor progress with 'snapmirror status' or the snapmirror log.

源端:

clip_image002[4]

4、传输成功后,即status从“Transferring”变成“idle”后,可以看到源端和目的端的vol卷都相同

DataOnTap> df -h

Filesystem total used avail capacity Mounted on

/vol/vol0/ 647MB 144MB 503MB 22% /vol/vol0/

/vol/vol0/.snapshot 161MB 80MB 81MB 49% /vol/vol0/.snapshot

/vol/vol1/ 160MB 92MB 67MB 58% /vol/vol1/

/vol/vol1/.snapshot 40MB 180KB 39MB 0% /vol/vol1/.snapshot

目的端

DataOnTap2> df -h

Filesystem total used avail capacity Mounted on

/vol/vol0/ 647MB 144MB 502MB 22% /vol/vol0/

/vol/vol0/.snapshot 161MB 79MB 82MB 49% /vol/vol0/.snapshot

/vol/vol1/ 160MB 92MB 67MB 58% /vol/vol1/

/vol/vol1/.snapshot 40MB 140KB 39MB 0% /vol/vol1/.snapshot

 

5、在源端新增加一个文件cap2

clip_image002[6]

6、可以看到源端的状态又变成“Transferring”

DataOnTap> snapmirror status

Snapmirror is on.

Source Destination State Lag Status

DataOnTap:vol1 DataOnTap2:vol1 Source 00:01:24 Transferring

等状态变为idle后,目的端可以看到

DataOnTap2> df -h

Filesystem total used avail capacity Mounted on

/vol/vol0/ 647MB 144MB 502MB 22% /vol/vol0/

/vol/vol0/.snapshot 161MB 79MB 82MB 49% /vol/vol0/.snapshot

/vol/vol1/ 160MB 110MB 49MB 69% /vol/vol1/

/vol/vol1/.snapshot 40MB 144KB 39MB 0% /vol/vol1/.snapshot

说明已经同步完成

7、在目的端删除某一文件,无法删除,因为此时是绑定状态

image

断开绑定

DataOnTap2> snapmirror break -f vol1

snapmirror break: Destination vol1 is now writable.

Volume size is being retained for potential snapmirror resync. If you would like to grow the volume and do not expect to resync, set vol option fs_size_fixed to off.

8、再次删除可以成功

9、也可以通过GUI方式查看snapmirror状态

clip_image002[8]





本文转自 taojin1240 51CTO博客,原文链接:http://blog.51cto.com/taotao1240/670728,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值