【问题标题】:GlusterFS not starting and not creating volumeGlusterFS 未启动且未创建卷
【发布时间】:2015-05-30 11:04:29
【问题描述】:

我正在尝试设置一个集群,在该集群中我可以使用glusterFS 安装 wordpress,以便主节点将运行 wordpress 的实际副本,而其他两个节点将拥有其副本。另外我想设置主从 Mysql 设置。我已经在三个 Droplet 上安装了 Mysql 服务器、GlusterFS 服务器、nginx 服务器,第四个安装了 Nginx Load balancer。问题是我无法创建 GlusterFS 卷,以下是我在构建该 FS 期间遇到的错误。

使用的命令:

gluster volume create file_store replica 2 transport tcp master.com:/gluster slave1.com:/gluster slave2.com:/gluster slave3.com:/gluster force;

gluster volume create file_store replica 2 transport tcp master.com:/gluster slave1.com:/gluster slave2.com:/gluster force;

gluster volume create file_store replica 2 transport tcp master.com:/gluster slave1.com:/gluster force;

我尝试了这些命令,还尝试了私有 IP 代替主机名,还尝试通过最后移除强制来做到这一点。

这是我得到的错误。

错误的砖块并使用<hostname>等或operation failed

请帮我解决问题。我一直在使用下面的教程开发它

https://www.digitalocean.com/community/tutorials/automating-the-deployment-of-a-scalable-wordpress-site

我已按照文档中的所有步骤进行操作,但对我不起作用。我现在被困在GlusterFS

我还尝试重新启动GlusterFS 服务器,但它现在甚至没有启动。 它说GlusterFS 服务器已启动,但是当我检查服务状态时它说Failed

请帮忙。

提前致谢

【问题讨论】:

    标签: wordpress replication glusterfs


    【解决方案1】:

    在安装和配置 glusterfs 时,请按照以下步骤操作,

    1. 在所有节点上安装 glusterfs-server 包并启动服务(即apt-get install glusterfs-server,它将安装所需的服务器和客户端包,如果没有,它将自动启动服务,在基于 debian 的机器上使用 service glusterfs-server start 启动它。

    2. 从一个服务器对等探测到其他服务器。 (例如:#gluster peer probe 192.168.0.103

    3. 创建卷,在创建 gluster 卷的同时确保几件事,

      我。每个节点/砖路径上没有以前的 gluster 卷跟踪。

      二。如果您尝试在受限文件夹下创建砖块,请提供正确的副本编号,并在最后使用“强制”选项。

    副本数 = 砖块的数量,在给定的示例中为 2,如果您想创建三个砖块,则提供副本为 3。并且在移除/添加砖块时,使用添加/删除砖块提供正确的副本号命令,在添加或删除时,新的副本数应分别为 N+1 或 N-1。 N 是存在的砖块的数量。

    例如:

    root@debian:/# gluster volume create testvol replica 2 transport tcp 192.168.0.100:/var/www/ 192.168.0.103:/var/www/ force
    
    volume create: testvol: success: please start the volume to access data
    
    1. 启动音量

    例如:

    gluster volume start testvol
    
    volume start: testvol: success 
    
    1. 在每台服务器上安装卷以开始数据传输

    例如:

    mount -t glusterfs 192.168.0.100:testvol /mnt/glusterfs/
    
    mount -t glusterfs 192.168.0.103:testvol /mnt/glusterfs/
    

    在挂载卷之后,如果您在挂载点上写了任何内容,则将被复制到其他卷上。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-19
      • 2018-06-16
      • 1970-01-01
      • 2018-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多