【问题标题】:glusterfs Unable to read gsyncd status fileglusterfs 无法读取 gsyncd 状态文件
【发布时间】: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 nameUnable to store slave volume nameUnable 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 fileUnable 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 slave2tune2fs exited with non-zero exit statusfailed to get inode size

这是slave上的音量有问题吗?如何在没有卷的情况下设置异地复制?异地复制配置有问题吗?

【问题讨论】:

    标签: ssh replication glusterfs geo-replication


    【解决方案1】:

    从 gluster 3.5 开始,您不能将文件夹用作异地复制目标。从 3.5 开始,您必须从一个 gluster 卷复制到另一个 gluster 卷。

    关于您在 gluster 卷到 gluster 卷异地复制时遇到的问题,您可能已发出或未发出其他一些命令。

    在“创建”之前,您需要

    • 确保主从之间存在无密码 ssh
    • 您必须通过在其中一个主设备上运行以下命令来生成 gluster 用于主设备和从设备之间通信的密钥:

    gluster system:: execute gsec_create

    接下来,您将像以前一样运行 create,但没有 force 选项。如果您的创建在没有强制的情况下失败,则会出现问题,使用强制只会掩盖问题并产生损坏的设置。

    在您成功(不强制)执行“create push-pem”后,您需要开始复制过程:

    gluster volume geo-replication master ivyslave2.com::slave2 start

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-24
      相关资源
      最近更新 更多