LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-11-2012, 10:27 PM   #1
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Rep: Reputation: 0
UCARP IP address failover creates multiple masters


I installed UCARP on four nodes running Gluster, which is then exported over NFS. The idea is to assign a VIP to one of the nodes so that if that node fails, the VIP will be assigned to one of the others. Since it's an active/passive system, /var/lib/nfs is shared between the nodes so NFS can be started on the new node without any issues. However, when I simulate a failure by unplugging the network cable, more than one node becomes the new master. Sometimes it's all three, sometimes just two. This will cause data corruption. Here is the network configuration for the first node:
Code:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
	address 10.80.80.1
	netmask 255.255.0.0
	network 10.80.0.0
	broadcast 10.80.255.255
	gateway 10.80.10.1
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 10.80.90.250 4.2.2.2 8.8.8.8
	dns-search lax.xen.com

ucarp-vid 10
ucarp-vip 10.80.80.100
ucarp-password secret
ucarp-advskew 0
ucarp-advbase 1
ucarp-facility local1 
ucarp-master yes 
ucarp-upscript /usr/share/ucarp/vip-up 
ucarp-downscript /usr/share/ucarp/vip-down 
ucarp-nomcast yes

iface eth0:ucarp inet static 
	address 10.80.80.100
	netmask 255.255.0.0
The only difference between the configuration files are the advskew values. I've tried all sorts of combinations but the failover never results in a single master taking over. I did see some errors such as this one
Code:
Apr 11 18:46:44 gluster1 ucarp[13488]: [ERROR] exiting: pfds[0].revents = 8
but I don't know what they mean. Did I miss something in the installation?
 
Old 04-12-2012, 07:42 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651
I haven't played with ucarp, but have you tried modifying the advbase values? .. like:

Master: advbase 1
2nd preferred: advbase 2
3rd preferred: advbase 3
4th preferred: advbase 4

A node with a lower base should be more likely to become a master from what I can see. You may also be able to delay a node becoming master by playing with deadratio settings.
 
Old 04-12-2012, 11:19 PM   #3
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Original Poster
Rep: Reputation: 0
I tried that too. I decided to simply use a two-node failover system and that works, at least the IP address part. NFS doesn't fail over so smoothly because of file locking by the client. If I pull out the network cable during a file transfer, eventually it times out because of the stale NFS file handle, even though the IP address fails over and nfs-kernel-server starts on the new node.
 
Old 04-13-2012, 02:11 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651
I usually go with keepalived .. in regard to the stale nfs handles, I believe you can mitigate that by specifying a filesystem id in the nfs servers export options, that way it's not dynamically generated:
Code:
/shared      *(rw,sync,no_wdelay,mp=/shared,no_root_squash,fsid=1234)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Splitting DNS settings to multiple servers to reduce downtime during failover Quartiz.com Linux - Server 1 11-30-2011 03:59 PM
gnu tar creates multiple odd directories with numeric names when extracting froff Linux - Software 2 02-05-2010 08:12 AM
Help with DHCP Failover server with multiple subnets Kolibri Linux - Server 0 05-04-2009 04:50 AM
forced reconnect creates multiple ppp0 entries in snmp table vimico Linux - Networking 0 11-07-2005 05:01 AM
Internet Failover (Multiple ISPs) ghight Linux - Networking 2 02-12-2004 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration