LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-02-2016, 07:37 AM   #1
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Rep: Reputation: Disabled
How to properly configure a 2 node glusterfs volume ?


I am trying to make a 2 node linux servers with high available apache using glusterfs 3.7.6 for data replication and pacemaker+corosync as resource manager. However i'm seeing a problem with gluster in the specific scenario when both nodes get shutdown and one of them comes online first. Even though there's a brick on that node and gluster service is running, there's no brick process.

Code:
[root@node1 ~]# gluster volume status data 
Status of volume: data
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick node1:/gluster_data                   N/A       N/A        N       N/A  
NFS Server on localhost                     N/A       N/A        N       N/A  
NFS Server on localhost                     N/A       N/A        N       N/A  

Task Status of Volume data
------------------------------------------------------------------------------
There are no active volume tasks
And when I start the other node, everything seems to work and I can mount the volume.

Code:
[root@node1 ~]# gluster volume status data
Status of volume: data
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick node1:/gluster_data                  49152      0          Y       2674 
Brick node2:/gluster_data                  49152      0          Y       3086 
NFS Server on localhost                     N/A       N/A        N       N/A  
Self-heal Daemon on localhost               N/A       N/A        Y       2796 
NFS Server on node2                         N/A       N/A        N       N/A  
Self-heal Daemon on node2                   N/A       N/A        Y       3085 

Task Status of Volume data
------------------------------------------------------------------------------
There are no active volume tasks
And at this point if I shut down node2, node1 brick process remains active so atleast I can mount and use it.

Code:
[root@node1 ~]# gluster volume status data

Status of volume: data
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick node1:/gluster_data                   49152     0          Y       2674 
NFS Server on localhost                     N/A       N/A        N       N/A  
Self-heal Daemon on localhost               N/A       N/A        Y       2796 

Task Status of Volume data
------------------------------------------------------------------------------
There are no active volume tasks
So my observation is that for the gluster volume to work, both nodes need to be online atleast for a moment so the bricks can start and then if one node goes down, it won't affect the volume operation. So how can I make it work when one of the nodes come online from a total blackout ?
 
Old 02-02-2016, 08:58 AM   #2
fjennings
LQ Newbie
 
Registered: Oct 2015
Location: Phoenix, AZ
Distribution: CentOS, Ubuntu, Debian, Oracle, Red Hat
Posts: 17

Rep: Reputation: 1
Technically only one node needs to be up, when the other comes up, it should enter a healing state to begin syncing.

Make sure that when you are entering the configuration in the client's fstab, that use the following (or similar) layout:

gluster1:/brick1 /mnt/brick1 glusterfs defaults,_netdev,backupvolfile-server=gluster2 0 0

Using the backupvolfile will ensure that if the client does not see gluster1, that it will probe 2 as well. This provides you with your fault tolerance.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to install GlusterFS with a replicated volume over 2 nodes on Ubuntu 14.04 LXer Syndicated Linux News 0 07-16-2014 02:21 PM
LXer: Glusterfs replicated volume based Havana 2013.2 instances on Server With GlusterFS 3.4.1 Fedor LXer Syndicated Linux News 0 11-03-2013 11:00 AM
LXer: Glusterfs's volume based Havana RC1 instances on NFS-Like Standalone Storage Server With Glust LXer Syndicated Linux News 0 10-20-2013 02:12 AM
LXer: How to setup and expand a replicated Glusterfs 3.2.4 volume on Debian 6.x LXer Syndicated Linux News 0 04-18-2012 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration