1.概述
GlusterfsGeo-replication提供了一种持续,异步,增量数据备份策略,可以通过局域网,广域网,英特网来进行。使用Geo-replication,我们能够在存储环境建立数据冗余,提供数据的灾难恢复功能。
Geo-replication使用master-slave模式:
1、Master- 代表一个卷;
2、Slave-可能是一个卷或者一个文件夹;
局域网异地迁移示意图
广域网异地迁移示意图
万维网异地迁移示意图
2.功能测试
2.1卷设置
Master端,在启动异地迁移的时候,会进行卷选型设置geo-replication.indexing:on
Volume Name: gg Type: Distribute Status: Started Number of Bricks: 2 Transport-type: tcp Bricks: Brick1: 10.28.1.96:/data/g1 Brick2: 10.28.1.96:/data/g2 Options Reconfigured: geo-replication.indexing: on |
同时修改marker配置文件,即将xtime打开,目地是以后上传到master端的文件会被标识上时间戳:
volume swift-marker type features/marker option volume-uuid 40f278e4-4769-4206-a33b-67064a853c61 option timestamp-file /etc/glusterd/vols/swift/marker.tstamp option xtime on option quota off subvolumes swift-io-threads end-volume |
2.2文件迁移
rsync -sS -aR ./2364.txt ./2366.txt ./2362.txt ./2365.txt ./2368.txt ./2367.txt ./2363.txt /tmp/liuhong |
2.3查看迁移后文件的xtime
xattr.getxattr("aums.txt",'trusted.glusterfs.81fa9632-e2d1-4 |