【发布时间】:2015-04-16 09:21:08
【问题描述】:
我想在我的计算机上的一些虚拟机中尝试 glusterfs 地理复制,以便以后分布在多个站点上使用。
我在 ubuntu 32 位服务器上安装了 glusterfs 3.6,如下所示:
add-apt-repository -y ppa:gluster/glusterfs-3.6
apt-get update -qq
apt-get install glusterfs-server -y
在每个 virtualbox 上的 /etc/hosts 中都有这样的条目,以便我可以使用主机名:
192.168.1.1 ivymaster.com
192.168.1.2 ivyslave2.com
192.168.1.3 ivyslave1.com
首先我在 master 上创建并启动了一个卷(force 在 rootfs 上创建):
gluster volume create master ivymaster.com:/var/glustermaster/ force
gluster volume start master
工作正常。我使用ssh-copy-id设置了无密码root登录并手动登录一次以检查设置是否正确并且主机存储在known_hosts中。
我无法在Geo-Replication Terminology - Understanding the URI 中描述的目录中设置同步。由于 URI 问题,创建异地复制失败。
gluster volume geo-replication master ivyslave2.com:/var/slave2 start
Staging failed on localhost. Please check the log file for more details.
日志文件包含 Invalid slave name、Unable to store slave volume name、Unable to fetch slave or confpath details 等条目。
当我在 ivyslave2.com 上创建一个卷并使用该卷创建异地复制时,这可行:
gluster volume geo-replication master ivyslave2.com::slave2 create push-pem force
Creating geo-replication session between master & ivyslave2.com::slave2 has been successful
很遗憾,gluster volume geo-replication master ivyslave2.com::slave2 status 说复制的状态是错误的。
MASTER NODE MASTER VOL MASTER BRICK SLAVE STATUS CHECKPOINT STATUS CRAWL STATUS
--------------------------------------------------------------------------------------------------------------------------------
ivyVirtMaster master /var/glusterfs_master_nv ivyslave2.com::slave2 faulty N/A N/A
执行此命令后,master上的日志文件包含Using passed config template(/var/lib/glusterd/geo-replication/master_ivyslave2.com_slave2/gsyncd.conf).、Unable to read gsyncd status file、Unable to read the statusfile for /var/glusterfs_master_nv brick for master(master), ivyslave2.com::slave2(slave) session。
slave 上的日志文件包含 Received status volume req for volume slave2、tune2fs exited with non-zero exit status、failed to get inode size。
这是slave上的音量有问题吗?如何在没有卷的情况下设置异地复制?异地复制配置有问题吗?
【问题讨论】:
标签: ssh replication glusterfs geo-replication