copycluster原理

在一次copycluster过程中
我们可以看到这个报错
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(760) [sender=3.0.7]
查看copycluster运行流程
[ dbadmin@wos_ros_193 vbr]$ vi vbr_v_test_node0003_client.log
2015-12-17 19:41:35 Transfer client process entry: my pid is 4921; task is copycluster.
2015-12-17 19:41:35 Read lock acquired on .ctlg file
这里提到.ctlg file锁问题,我们可以通过设置SnapShotRetentionTime 来解决,通过select get_config_parameter('SnapshotRetentionTime');来查看这个值,通过select set_config_parameter('SnapshotRetentionTime', 86400);来设定这个值
2015-12-17 19:41:35 rsyncOptions
rsync执行选项
2015-12-17 19:41:35 ['/opt/vertica/bin/rsync', '--stats', '--whole-file', '--progress']
--stats给出某些文件的传输状态 --whole-file拷贝文件,不进行增量检测--progress显示备份过程
2015-12-17 19:41:35 special processing for copycluster
2015-12-17 19:41:35 172.19.1.192-->10.203.10.195
2015-12-17 19:41:35 172.19.1.191-->10.203.10.194
2015-12-17 19:41:35 172.19.1.193-->10.203.10.196
2015-12-17 19:41:35 Dry-run to find transfer size
Dry-run现实哪些文件将被传输
2015-12-17 19:41:35 Dry-run ended!
2015-12-17 19:41:35 ['/opt/vertica/bin/rsync', '--stats', '--whole-file', '--progress'] --exclude=again_test.* /data/test/v_test_node0003_catalog/Snapshots/again_test/ rsync://[10.203.10.196]:50000/vbr/
解释这一句rsync://[10.203.10.196]:50000/vbr/
因为在again_test里面指定rsync端口为50000,我们看看端口对应配置文件port_rsync
即vbr_rsyncd.conf文件
[dbadmin@wos_ros_193 ~]$ cd /tmp/vbr/
[dbadmin@wos_ros_193 vbr]$ vi vbr_rsyncd.conf
log file = /tmp/vbr/vbr_rsyncd.log
pid file = /tmp/vbr/vbr_rsyncd.pid
[vbr]
use chroot = no
path = /
read only = no
list = yes
这个文件指向了 / 根路径相对路径,是数据库根路径绝对路径是/data/test,50000/vbr/是指50000端口对应模块。
sending incremental file list
data/test/v_test_node0003_catalog/vertica.conf
         128 100%    0.00kB/s    0:00:00
         128 100%    0.00kB/s    0:00:00 (xfer#1, to-check=621/627)
data/test/v_test_node0003_catalog/Snapshots/catalog.ctlg
       32768   3%   31.25MB/s    0:00:00
      852012 100%   45.14MB/s    0:00:00 (xfer#2, to-check=612/627)

Number of files: 627
传输了627个文件
Number of files transferred: 2
Total file size: 44971076845 bytes
Total transferred file size: 852140 bytes
Literal data: 852140 bytes
Matched data: 0 bytes
File list size: 15711
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 868335
Total bytes received: 331
这是 rsync
sent 868335 bytes  received 331 bytes  1737332.00 bytes/sec
total size is 44971076845  speedup is 51770.27
2015-12-17 19:41:35 bootstrapping catalog...
2015-12-17 19:41:35 ssh -x 10.203.10.196 /opt/vertica/bin/bootstrap-catalog -z -D/data/test/v_test_node0003_catalog -F/data/test/v_test_node0003_catalog/Snapshots/catalog.ctlg
2015-12-17 19:41:36 copycluster specialization

Catalog successfully bootstrapped
日志被成功引导传输
执行下面语句测试能否传输数据
[ dbadmin@wos_ros_193 ~]$ rsync --stats --whole-file --progress --exclude=again_test.* /data/test/v_test_node0003_catalog/Snapshots/again_test/ rsync://10.203.10.196:50000/vbr/
skipping directory .

Number of files: 0
Number of files transferred: 0
Total file size: 0 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 1
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 4
Total bytes received: 8

sent 4 bytes  received 8 bytes  8.00 bytes/sec
total size is 0  speedup is 0.00
说明传输失败
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值