Snapmirror操作手册

更新时间:2023-12-10 04:36:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Snapmirror操作手册

目录

1Snapmirror介绍................................................................................................................... 2 2准备工作 ............................................................................................................................. 2 3已验证内容 ......................................................................................................................... 2 4操作步骤 ............................................................................................................................. 3

4.1配置snapmirror相关参数 ...................................................................................... 3 5.接管测试 ............................................................................................................................. 4 6. ........................................................................................................... 错误!未定义书签。

1Snapmirror介绍

NetApp SnapMirror 软件具有强大的功能,而且易于使用和管理,它满足了当前的全球性企业对灾难恢复和数据分布解决方案的需要,SnapMirror 软件将尽可能地为关键应用程序提供最高的数据可用性和最快的恢复速度。

SnapMirror 技术将数据镜像到一个或多个网络 Filer 上。 SnapMirror 不断地更新镜像数据,以确保数据是最新的,并且能够用于进行灾难恢复、减少磁带备份、发布只读数据、在非生产性 Filer 上进行测试、执行联机数据迁移等等。

2准备工作

1.准备存储设备,下面的pri表示主存储,sec表示被存储 2.snapmirror license

3.确定源vol的大小及lun的大小

3已验证内容

1.源存储和目标存储上的卷分别保留几个快照 2.源存储和目标存储上的卷的快照属性设置 Snap sched 0 0 0 Snap reserve 0 vol options create_ucode on vol options convert_ucode on vol options fractional_reserve 0

3.源存储:host:volname,其中host可以是hostname,也可以是ip地址 目的存储:hostname:volname主机名必须是hostname 4.在做snapmirror中,源卷会产生一个快照,目标卷会有两个快照

在同步时,源卷的快照会传送到目标卷来同步数据。目标卷保留的快照是最近的两个快照。

4操作步骤

4.1配置snapmirror相关参数

1.options snapmirror.access * 允许所有存储设备可以访问

2.wrfile /etc/snapmirror.conf在目的存储上执行 编辑snapmirror配置文件

在此文件中设置snapmirror的执行方式,同步,半同步或者异步,在设置异步传输时需要设置传输时间,包括如下几种时间:minute ,hour,day-of-month, day_of-week。

Each field consists of one or more numbers or ranges. If a field contains more than one value, the values

are separated from each other by a comma. A field consisting solely of an asterisk (‘‘*’’) is the same as

a field enumerating all possible legal values for that field. A field consisting solely of a dash (‘‘-’’)

represents a null value; any schedule

with a dash in one of its fields will never run any scheduled transfers. Values in a field can take any of

the following forms: number first-last first-last/step

A value with a dash in it specifies a range; it is treated as containing all the values between first and

last, inclusive. A range value with a slash specifies skips of step size in the range. For example, thevalue of the entry ‘‘0-23/4’’ would be the same as that of the entry ‘‘0,4,8,12,16,20’’.

minute Which minutes in each hour to update on. Values are from 0 to 59. hour Which hours in the day to update on. Values are from 0 to 23. day-of-month

Which days in the month to update on. Values are from 1 to 31. day-of-week

Which days in the week to update on. Values are from 0 (Sunday) to 6 (Saturday). 3.编辑/etc/hosts文件

先rdfile /etc/hosts,然后wrfile /etc/hosts,将ip地址与存储的主机名的对应关系添加到hosts表中。

4.初始化传输配置

snapmirror initialize-S pri:vol1 sec:vol2 5.snapmirror failover

Each connection definition is a single line giving a name to one or two pairs of IP addresses along with

a mode of operation for the connection. The lines are specified in the following format: name = mode( source_ip_addr1 , dest_ip_addr1 ) ( source_ip_addr2 , dest_ip_addr2 )

name This is the name of the connection you would like to define. This name is to be used as the source

filer in relationship definitions.

mode The mode is optional and specifies the mode in which two IP address pairs will be used. Two

modes are allowed multiplexing and failover mode and are specified by using the multi and failover

keywords. If not specified, multiplexing mode is used.

The multiplexing mode causes snapmirror to use both paths at the same time. If one should fail, it will

switch to use the remaining path only and use both again should the failing path be repaired.

Failover mode causes snapmirror to use the first path as the desired path and only use the second pathshould problems arise with the first path.

source_ip_addr1source_ip_addr2 dest_ip_addr1 dest_ip_addr2 These are resolvable network names or IPaddresses that define a path through the network between the source and the destination. Thesource addresses are the IP addresses of interfaces to use on the source and respectively for thedestination. The pairing denotes a path from source to destination.

Eg:

fridge-con = failover(fridge-gig,icebox-gig)(fridge-slow,icebox-slow) fridge-con:db icebox:db – sync or:

fridge-con = multipath(fridge-gig,icebox-gig)(fridge-slow,icebox-slow) fridge-con:db icebox:db * * * *

5.接管测试

1.模拟源lun损坏 2.用目的lun接替其工作 在sec上执行:

snapmirror quiesce vol2

snapmirror break vol2(执行此命令以后sec的lun才可以执行写操作) 将sec上的lun online及map

3.源lun恢复工作,将目的lun上新增的数据恢复到源lun上 使用snapmirror反向同步操作 在pri上执行操作:

snapmirror resync -S sec:vol2 pri:vol1将新增的数据同步到pri 4.删除3中创建的反向同步镜像关系: 在pri上执行 snapmirror break vol1 在sec上执行

snapmirror release vol2 pri:vol1 5.恢复原来的镜像关系,在sec上执行 snapmirror resync -S pri:vol1 sec:vol2

snapmirror status查看snapmirror状态

6.其他问题

1.在/etc/hosts表中,排在前面的地址如果ping不通则不会去找后边的地址ping,即使后边的地址是通的,如下:

pri> rdfile /etc/hosts

#Auto-generated by setup Sat May 18 20:03:47 CST 2013 127.0.0.1 localhost 10.0.0.123 pri pri-ns0 10.0.0.125 pri pri-ns1 10.0.0.124 sec 10.0.0.126 sec sec> rdfile /etc/hosts

#Auto-generated by setup Sat May 18 20:04:29 CST 2013 127.0.0.1 localhost

10.0.0.124 sec sec-ns0 10.0.0.126 sec sec-ns1 10.0.0.125 pri 10.0.0.123 pri

Pri是主存储,sec是备存储。如果将pri的10.0.0.125端口down掉,则备存储无法向主存储发起snapmirror请求,镜像会失败,如果是10.0.0.123端口down掉,则不会,镜像关系还正常。

7.做法二:/etc/hosts配置(使用mode配置)

在hosts表中存储的是ip地址与配置此地址的接口名的对应关系,如下所示: pri> rdfile /etc/hosts 10.0.0.123 pri-ns0 10.0.0.125 pri-ns1 10.0.0.124 sec-ns0 10.0.0.126 sec-ns1 sec> rdfile /etc/hosts 10.0.0.123 pri-ns0 10.0.0.125 pri-ns1 10.0.0.124 sec-ns0 10.0.0.126 sec-ns1

sec> rdfile /etc/snapmirror.conf

pri=failover(pri-ns0,sec-ns0) (pri-ns1,sec-ns1) pri:vol1 sec:vol2 - * * * * sec> options snapmirror.access

snapmirror.access host=pri-ns0,pri-ns1 /etc/snapmirror.conf配置如下:

sec> rdfile /etc/snapmirror.conf

pri=failover(pri-ns0,sec-ns0) (pri-ns1,sec-ns1)

pri:vol1 sec:vol2 - * * * *

当pri-ns0接口down以后,根据failover配置会进行接管操作,使snapmirror能够继续执行。此时传输速度会变慢,端口up以后传输速度恢复正常。

只要failover的每个组至少有一个端口处于up状态,则snapmirror关系就不会中断,只是可能会导致传输速度变慢,只有第一组接口都处于up状态时,snapmirror传输速率及状态才是正常的,其他时候会显示为pending状态,虽然snapmirror关系正常。

如果出现接口down的情况要尽快恢复,以免影响snapmirror执行。

Pri:vol1 sec:vol2

其中pri与sec可以不是存储的hostname,只是要与/etc/snapmirror.conf文件对应即可。

pri:vol1 sec:vol2 - * * * *

当pri-ns0接口down以后,根据failover配置会进行接管操作,使snapmirror能够继续执行。此时传输速度会变慢,端口up以后传输速度恢复正常。

只要failover的每个组至少有一个端口处于up状态,则snapmirror关系就不会中断,只是可能会导致传输速度变慢,只有第一组接口都处于up状态时,snapmirror传输速率及状态才是正常的,其他时候会显示为pending状态,虽然snapmirror关系正常。

如果出现接口down的情况要尽快恢复,以免影响snapmirror执行。

Pri:vol1 sec:vol2

其中pri与sec可以不是存储的hostname,只是要与/etc/snapmirror.conf文件对应即可。

本文来源:https://www.bwwdw.com/article/1f95.html

Top