rajhans chauhan
rajhans chauhan

Reputation: 1

GlusterFS not starting and not creating volume

I am trying to setup a cluster in which I can have wordpress Installed with glusterFS so that The master node will be running the actual copy of wordpress and other two nodes will have its replica. Also I want to setup the Master slave Mysql setup. I have installed Mysql server, GlusterFS server, nginx server on three droplets and fourth one have Nginx Load balancer Installed. The problem is that I am not able to create a GlusterFS volume, below are the errors I am getting during building that FS.

command used :

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;

I tried these commands and also tried Private IP in place of hostname and also tried doing it by removing force in the end.

Here is the error which I got.

Wrong brick and use <hostname> etc etc or operation failed

Please help me resolve the issue. I have been developing it by using below tutorial

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

I have followed all the steps as they are in doc but not worked for me. I am stuck at GlusterFS now.

Also I tried to restart GlusterFS server and it doesn't even start now. It says GlusterFS server started but when I check the status of service it says Failed

Please Help.

Thanks In Advance

Upvotes: 0

Views: 3725

Answers (1)

user3456211
user3456211

Reputation:

While installing and configuring glusterfs follow these steps,

  1. Install the glusterfs-server packages on all the nodes and start the service ( ie, apt-get install glusterfs-server, it'll install both server and client packages that needed and it'll automatically start the service, if not, start it using service glusterfs-server start on debian based machines.

  2. From one server peer probe to the others. ( eg: #gluster peer probe 192.168.0.103)

  3. Create the volume, while creating the gluster volumemake sure few things,

    i. no previous gluster volume traces are on each node/brick path.

    ii. Provide correct replica number, and use 'force' option at the end, if you are trying to create brick under restricted folder.

replica number = number of bricks, in the given example it is 2, if you want to create three bricks provide replica as 3. and also while removing/adding the brick provide the correct replica number with the add/remove-brick command, the new replica number should provide will be N+1 or N-1 while adding or removing respectively. N is the number of bricks that exists.

eg:

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. start the volume

eg:

gluster volume start testvol

volume start: testvol: success 
  1. Mount the volume on each server in-order to start data transferring

eg:

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

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

after mounting the volume if you wrote anything on the mount point will get replicated on others.

Upvotes: 2

Related Questions