GlusterFS无法启动而无法创建卷

时间:2015-05-30 11:04:30

标签: wordpress replication glusterfs

我正在尝试设置一个集群,在其中我可以使用glusterFS安装wordpress,以便主节点将运行wordpress的实际副本,其他两个节点将具有其副本。另外我想设置Master slave Mysql设置。我在三个小滴上安装了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

我已经按照他们在doc中的所有步骤进行了操作,但没有为我工作。我现在卡在GlusterFS

此外,我尝试重新启动GlusterFS服务器,它现在甚至无法启动。 它说GlusterFS服务器已启动,但当我检查服务状态时,它会显示Failed

请帮助。

提前致谢

1 个答案:

答案 0 :(得分: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卷跟踪。

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

  4. 副本数量=砖块数量,在给定示例中为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. 启动卷
    2. 例如:

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

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

        安装卷后,如果在挂载点上写了任何内容,将会复制到其他位置。

相关问题