Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
59 views
How to merge two directories with failover?
Lets say I have two devices: - `/dev/sda1` mounted to `/` (system partition) - `/dev/sdb1` mounted to `/media/data` (data partition, usb device may be unplugged) I want to merge/overlay/raid two directories like so: - `/media/data` is the primary directory - `/usr/data` is the backup/failover direct...
Lets say I have two devices: - /dev/sda1 mounted to / (system partition) - /dev/sdb1 mounted to /media/data (data partition, usb device may be unplugged) I want to merge/overlay/raid two directories like so: - /media/data is the primary directory - /usr/data is the backup/failover directory that exists on the system partition The resulting directory (e.g /mnt/merged) will consist of the above two directories so that: - when writing a file to /mnt/merged the file will be written to /media/data - if the /dev/sdb1 is not available while writing (the usb storage is removed) then write to the backup /usr/data and when the primary partition is plugged again move the data to the primary partition - (optional) setup the second partition as a cache partition in case it is faster than the primary partition, so that reads and writes happen to the backup (faster) directory before moving to the primary directory
MOHAMMAD RASIM (530 rep)
May 25, 2025, 12:08 PM • Last activity: May 26, 2025, 03:53 PM
1 votes
1 answers
709 views
Gateway failover using netplan
I'm having trouble setting up 2 IP address so that if one fails it will use the secondary IP address. I've setup netplan as shown in the picture. I can connect via ssh using both IP address, I test which IP address is the main one by using speedtest-cli, using the server control panel I disable the...
I'm having trouble setting up 2 IP address so that if one fails it will use the secondary IP address. I've setup netplan as shown in the picture. I can connect via ssh using both IP address, I test which IP address is the main one by using speedtest-cli, using the server control panel I disable the IP address that was used by speedtest-cli. However, when I try to use speedtest-cli again it doesn't work, I expected it to automatically switch to the IP that is still available. I tried pinging known IP address but it doesn't work. Does anyone know why this isn't working as I expect it to and how I can get it working? ![enter image description here](https://i.sstatic.net/65xDy.jpg)
Arran Lawley (11 rep)
Jun 13, 2019, 07:06 PM • Last activity: Nov 29, 2024, 04:12 PM
14 votes
3 answers
25108 views
Is it possible to allow multiple SSH host keys for the same IP?
I have a script that needs to connect to the currently active head of a high-availability cluster. Each node in the cluster has a fixed hostname and IP address. The current head additionally has a "virtual IP". In the case of a switchover or failover, another node configures the "virtual IP" and beg...
I have a script that needs to connect to the currently active head of a high-availability cluster. Each node in the cluster has a fixed hostname and IP address. The current head additionally has a "virtual IP". In the case of a switchover or failover, another node configures the "virtual IP" and begins acting as the head. Can I just point my script at the virtual IP? Won't ssh complain about mismatching host keys when the cluster moves the virtual IP to a different node?
n.st (8378 rep)
Dec 8, 2018, 12:28 PM • Last activity: Nov 16, 2023, 03:07 PM
2 votes
1 answers
1130 views
What can I do to enable automatic switching to a backup network when there is packet loss?
If I create a [connection using network bonding][1] (using the mode active-backup), then although automatic switching to the backup network occurs if I pull out the network cable, it does not occur when the problem is no packets getting through. What can I do to enable automatic switching to the bac...
If I create a connection using network bonding (using the mode active-backup), then although automatic switching to the backup network occurs if I pull out the network cable, it does not occur when the problem is no packets getting through. What can I do to enable automatic switching to the backup network when there is packet loss on the primary with switching back when the primary is working properly (much like how network bonding with mode active-backup seamlessly switches between primary and backup and back when pulling out and plugging back in the network cable)?
mcarans (695 rep)
Mar 6, 2019, 02:24 PM • Last activity: Sep 2, 2023, 01:27 PM
0 votes
2 answers
1039 views
Will `rm -rf` continue deleting if it can't delete something in the middle?
Consider a dir `garbage` containing many files and directories. If I run `rm -rf garbage`, but some files or directories within `garbage` are busy by the OS/NFS/etc., so `rm -rf` will fail for them. Will it delete the rest? Or will it stop deleting upon the first failure? The current OS is Ubuntu 20...
Consider a dir garbage containing many files and directories. If I run rm -rf garbage, but some files or directories within garbage are busy by the OS/NFS/etc., so rm -rf will fail for them. Will it delete the rest? Or will it stop deleting upon the first failure? The current OS is Ubuntu 20.04, but it's of interest whether this behavior is standard, or it depends on the (version of) OS.
Serge Rogatch (167 rep)
Jul 30, 2022, 06:19 AM • Last activity: Jul 30, 2022, 09:50 AM
0 votes
0 answers
312 views
Debian 9 failover between WAN and cellular module
I'm trying to configure a debian 9 device to have cellular failover in case WAN fails (or vice versa). I tried doing this with `ifenslave`, the failover works in general but it doesn't switch gateways. It keeps the primary one. Here is the config from `/etc/network/interfaces` (I used the example 3...
I'm trying to configure a debian 9 device to have cellular failover in case WAN fails (or vice versa). I tried doing this with ifenslave, the failover works in general but it doesn't switch gateways. It keeps the primary one. Here is the config from /etc/network/interfaces (I used the example 3 from here: https://wiki.debian.org/Bonding) : # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto eth1 lo iface lo inet loopback auto bond0 iface bond0 inet dhcp bond-slaves eth0 eth1 eth2 bond-mode active-backup bond-primary eth0 bond-miimon 100 bond_downdelay 200 bond_updelay 200 allow-bond0 eth0 iface eth0 inet manual allow-bond0 eth1 iface eth1 inet manual allow-bond0 eth2 iface eth2 inet manual iface eth1 inet static address 192.168.4.127 network 192.168.4.0 netmask 255.255.255.0 broadcast 192.168.4.255 gateway 192.168.4.1 I added eth1 as well for general testing. This is the output from ip r before I unplug the cable from eth0: default via 192.168.22.2 dev bond0 10.0.0.0/8 dev eth2 proto kernel scope link src 10.197.68.254 192.168.4.0/24 dev eth1 proto kernel scope link src 192.168.4.127 192.168.22.0/24 dev bond0 proto kernel scope link src 192.168.22.31 And after I unplug the cables: default via 192.168.22.2 dev bond0 10.0.0.0/8 dev eth2 proto kernel scope link src 10.197.68.254 192.168.4.0/24 dev eth1 proto kernel scope link src 192.168.4.127 linkdown 192.168.22.0/24 dev bond0 proto kernel scope link src 192.168.22.31 As you can see, eth0 and the cellular interface eth2 receive different gateways via DHCP. So I can't set static GW for the cellular interface since it might change over time. Why isn't this working properly? Or do you have a better idea how I could configure this?
deschuele (1 rep)
Jul 13, 2022, 02:20 PM • Last activity: Jul 13, 2022, 02:59 PM
0 votes
1 answers
1036 views
Request to virtual ip is not forwarding while trying IP Failover using keepalived on centos 7
I am trying to test IP failover using keepalived on centos 7. I have three instances of centos 7 installed on my vm. So I have 3 servers. I am trying to run keepalived on two of them, 3rd centos will be acting as a real server where request will be forwarded to. The configuration of the keepalived i...
I am trying to test IP failover using keepalived on centos 7. I have three instances of centos 7 installed on my vm. So I have 3 servers. I am trying to run keepalived on two of them, 3rd centos will be acting as a real server where request will be forwarded to. The configuration of the keepalived is given at the end. In conf file 192.168.10.40 is the ip address of the real server. On real server I just have a small nodejs server running which replies as success when request is sent. When I sent request to nodejs server directly at 192.168.10.40:3869. It replies, But when I try to reach it using virtual ip 192.168.10.100 and port 3869, It does not reply. Although keepalived on both servers is working fine. On master server
Vrrp_instance_pi1 {
state MASTER
	interface enp0s8
	virtual_router_id 102
	priority 101
	authentication {
    	auth_type PASS
    	auth_pass 1234
	}
	virtual_ipaddress {
    	192.168.10.100/24
	}
}
virtual_server 192.168.10.100 3869 {
	delay_loop 10
	lb_algo rr
	lb_kind DR
	persistence_timeout 9600


	real_server 192.168.10.40 3869 {
    	weight 1
    	TCP_CHECK {
      	connect_timeout 20
      	connect_port	80
    	}
	}
                                                                                         
}
On backup server
Vrrp_instance_pi1 {
state BACKUP
	interface enp0s8
	virtual_router_id 102
	priority 99
	authentication {
    	auth_type PASS
    	auth_pass 1234
	}
	virtual_ipaddress {
    	192.168.10.100/24
	}
}
virtual_server 192.168.10.100 3869 {
	delay_loop 10
	lb_algo rr
	lb_kind DR
	persistence_timeout 9600


	real_server 192.168.10.40 3869 {
    	weight 1
    	TCP_CHECK {
      	connect_timeout 20
      	connect_port	80
    	}
	}
                                                                                         
}
Muhammad Saleem (3 rep)
Dec 13, 2020, 01:17 PM • Last activity: Dec 13, 2020, 04:34 PM
1 votes
2 answers
1086 views
SSH connection issue with failover gateway
I have a system which can be accessed via SSH and HTTP. The system have two interfaces (eth0, eth1), and is working with Slackware 14.1. eth0 : 192.168.1.99, LTE Ethernet Gateway/Modem eth1 : 172.16.101.250, Local network (with internet access) eth1 should be used as default route for outgoing traff...
I have a system which can be accessed via SSH and HTTP. The system have two interfaces (eth0, eth1), and is working with Slackware 14.1. eth0 : 192.168.1.99, LTE Ethernet Gateway/Modem eth1 : 172.16.101.250, Local network (with internet access) eth1 should be used as default route for outgoing traffic, and automatically switch to eth0 when internet not available via eth1. This part is working using a cron and a script. The main concern is that when switching default gateway, the ingoing traffic to SSH and HTTP are working only with the interface of the default gateway. **/etc/rc.d/rc.inet1.conf** # Config information for eth0: IPADDR="192.168.1.99" NETMASK="255.255.255.0" USE_DHCP="no" DHCP_HOSTNAME="bridge" # Config information for eth1: IPADDR="172.16.101.250" NETMASK="255.255.128.0" USE_DHCP="no" DHCP_HOSTNAME="bridge" # Default gateway IP address: GATEWAY="172.16.0.1" Script executed every minute to verify internet availability on both networks #!/bin/bash DEF_GATEWAY="172.16.0.1" # Default Gateway BCK_GATEWAY="192.168.1.1" # Backup Gateway RMT_IP_1="8.8.8.8" # first remote ip RMT_IP_2="8.8.4.4" # second remote ip PING_TIMEOUT="1" # Ping timeout in seconds # Check user if [ whoami != "root" ] then echo "Failover script must be run as root!" exit 1 fi # Check GW CURRENT_GW=ip route show | grep default | awk '{ print $3 }' if [ "$CURRENT_GW" == "$DEF_GATEWAY" ] then ping -c 2 -W $PING_TIMEOUT $RMT_IP_1 > /dev/null PING=$? else # Add static routes to remote ip's ip route add $RMT_IP_1 via $DEF_GATEWAY ip route add $RMT_IP_2 via $DEF_GATEWAY ping -c 2 -W $PING_TIMEOUT $RMT_IP_1 > /dev/null PING_1=$? ping -c 2 -W $PING_TIMEOUT $RMT_IP_2 > /dev/null PING_2=$? # Del static route to remote ip's ip route del $RMT_IP_1 ip route del $RMT_IP_2 fi if [ "$PING" == "1" ] && [ "$PING_2" == "1" ] then if [ "$CURRENT_GW" == "$DEF_GATEWAY" ] then ip route replace default via $BCK_GATEWAY fi elif [ "$CURRENT_GW" != "$DEF_GATEWAY" ] then # Switching to default ip route replace default via $DEF_GATEWAY fi Here are the services listening # netstat -l Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:http *:* LISTEN tcp 0 0 *:auth *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:https *:* LISTEN tcp 0 0 *:time *:* LISTEN tcp6 0 0 [::]:ssh [::]:* Here is the routing table # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 172.16.0.1 0.0.0.0 UG 1 0 0 eth1 loopback * 255.0.0.0 U 0 0 0 lo 172.16.0.0 * 255.255.128.0 U 0 0 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
Alexandre Lavoie (95 rep)
Feb 26, 2020, 06:32 PM • Last activity: Mar 16, 2020, 09:35 PM
1 votes
0 answers
119 views
Ucarp with 2 interfaces
I have a server that has 2 interfaces which works like a router and a firewall too on debian. I want to use ucarp for redundency purposes. Question is how do i configure ucarp for 2 interfaces?
I have a server that has 2 interfaces which works like a router and a firewall too on debian. I want to use ucarp for redundency purposes. Question is how do i configure ucarp for 2 interfaces?
user19215 (111 rep)
Sep 5, 2019, 08:27 PM
1 votes
1 answers
928 views
Configuring Additional Failover IPs in Debian 9
How can I properly configure failover IPs in Debian 9? I tried below settings after restart > /etc/init.d/networking restart new FO IPs are pingable but server goes down for upto 30 minutes. I think there is something missing in interface settings. # This file describes the network interfaces availa...
How can I properly configure failover IPs in Debian 9? I tried below settings after restart > /etc/init.d/networking restart new FO IPs are pingable but server goes down for upto 30 minutes. I think there is something missing in interface settings. # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eno1 iface eno1 inet static address Server-IP/26 gateway 89.163.138.65 auto eno2 iface eno2 inet static address Failover_IP_1 netmask 255.255.255.255 broadcast Failover_IP_1 auto eno3 iface eno3 inet static address Failover_IP_2 netmask 255.255.255.255 broadcast Failover_IP_2
Mark Fulghum (13 rep)
Jun 22, 2019, 04:28 AM • Last activity: Jun 24, 2019, 01:16 AM
1 votes
0 answers
30 views
Currently I have two node cluster (SLES as HANA DB). I would like to check in which condition a failover will be triggered?
Below are the conditions. We could not test these because these nodes are already in production. 1. Replication between the nodes fail. 2. Replication is working but network link is down with no bonding. 3. Replication is working but one of the NIC in bonding failed. 4. Replication is working but ma...
Below are the conditions. We could not test these because these nodes are already in production. 1. Replication between the nodes fail. 2. Replication is working but network link is down with no bonding. 3. Replication is working but one of the NIC in bonding failed. 4. Replication is working but management IP is down. 5. Replication is working but backup IP is down. 5. Replication is working but DB service is stop/restart. 6. Replication working but server shutdown unexpectedly.
Fabian19 (11 rep)
Jun 14, 2019, 01:43 AM
0 votes
1 answers
1402 views
How to verify which is primary node in a HANA DB cluster operating on SLES 12?
Currently I have two HANA DB servers in a cluster and replication is not running. Upon checking from SUSE Hawk, node 2 is acting as primary node and node 1 is available. How do I confirm that node 2 is primary? [![enter image description here][1]][1] [1]: https://i.sstatic.net/5ZtvI.png
Currently I have two HANA DB servers in a cluster and replication is not running. Upon checking from SUSE Hawk, node 2 is acting as primary node and node 1 is available. How do I confirm that node 2 is primary? enter image description here
Fabian19 (11 rep)
Jun 11, 2019, 08:43 AM • Last activity: Jun 11, 2019, 09:12 AM
6 votes
3 answers
17576 views
GlusterFS how to failover (smartly) if a mounted Server is failed?
In GlusterFS, lets say i have 2 Nodes (Servers) on a Volume. Lets say the volume info is something like this: Volume Name: volume-www Brick1: gluster-server-01:/volume-www/brick Brick2: gluster-server-02:/volume-www/brick From the Client, as we know, we have to mount the volume `volume-www` by mount...
In GlusterFS, lets say i have 2 Nodes (Servers) on a Volume. Lets say the volume info is something like this: Volume Name: volume-www Brick1: gluster-server-01:/volume-www/brick Brick2: gluster-server-02:/volume-www/brick From the Client, as we know, we have to mount the volume volume-www by mounting from one Server. Like: mount -t glusterfs gluster-server-01:/volume-www /var/www I still feel there's a choke point since i am connecting to that gluster-server-01 only. - What if it is FAILED? Ofcourse I can manually mount from another healthy Server again. But is there a smarter way (industrial approach) to solve this?
夏期劇場 (1671 rep)
Jul 3, 2015, 07:31 AM • Last activity: Mar 23, 2018, 10:39 PM
0 votes
1 answers
86 views
Triangular direct connect ethernet network using the 2 possible paths (bonding + failover)
imagine this topology: A / \ B --- C In this situation, A can talk to B using the A B link of couse, but could also use the A C B links. Is it possible with a linux distribution to configure the network to : 1. Allow all hosts to take advantage of both path possible to an other host to double the ba...
imagine this topology: A / \ B --- C In this situation, A can talk to B using the A B link of couse, but could also use the A C B links. Is it possible with a linux distribution to configure the network to : 1. Allow all hosts to take advantage of both path possible to an other host to double the bandwidth, a bit like bonding the 2 interfaces on each host 2. Allow all hosts to talk to an other host if the direct link between them has been cut, a bit like bridging the 2 interfaces on each host.
Benjamin Gillissen (1 rep)
Jul 14, 2017, 07:17 AM • Last activity: Jul 14, 2017, 08:03 AM
2 votes
0 answers
1438 views
Linux bonding failover issue between two cisco switch
[![enter image description here][1]][1] [1]: https://i.sstatic.net/Sbq6i.png I have above scenario where server has `bond0` interface connected to SW1 and SW2 relevant interface of server, last night somehow `SW1` got rebooted and server lost `eth0` connectivity but it didn't failover to eth1 also e...
enter image description here I have above scenario where server has bond0 interface connected to SW1 and SW2 relevant interface of server, last night somehow SW1 got rebooted and server lost eth0 connectivity but it didn't failover to eth1 also every after switch rebooted successfully network was down and this happened on multiple server not single. so finally i have restart network on all server to make it work. we have primary=eth0 set in bond0 configuration. ifcfg-bond0 DEVICE=bond0 BOOTPROTO=none ONBOOT=yes BONDING_OPTS=mode=1 arp_interval=1000 arp_ip_target=192.168.10.1 miimon=500 downdelay=1000 primary=eth0 primary_reselect=always NETMASK=255.255.255.0 IPADDR=192.168.10.20 GATEWAY=192.168.10.1 ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes This is what i am seeing in logs when this happened [root@server1 ~]# cat /var/log/messages | grep eth Jun 8 05:03:05 s_sys@server1.example.com kernel: : bnx2 0000:02:00.0: eth0: NIC Copper Link is Down Jun 8 05:03:05 s_sys@server1.example.com kernel: : bonding: bond0: link status definitely down for interface eth0, disabling it Jun 8 05:03:05 s_sys@server1.example.com kernel: : bonding: bond0: making interface eth1 the new active one. Jun 8 05:07:03 s_sys@server1.example.com kernel: : bnx2 0000:02:00.0: eth0: NIC Copper Link is Up, 1000 Mbps full duplex Jun 8 05:07:03 s_sys@server1.example.com kernel: : bonding: bond0: link status definitely up for interface eth0. Jun 8 05:20:45 s_sys@server1.example.com kernel: : bonding: bond0: Removing slave eth0 Jun 8 05:20:45 s_sys@server1.example.com kernel: : bonding: bond0: Warning: the permanent HWaddr of eth0 - 18:A9:05:3A:39:1D - is still in use by bond0. Set the HWaddr of eth0 to a different address to avoid conflicts. Jun 8 05:20:45 s_sys@server1.example.com kernel: : bonding: bond0: releasing backup interface eth0 Jun 8 05:20:46 s_sys@server1.example.com kernel: : bonding: bond0: Removing slave eth1 Jun 8 05:20:46 s_sys@server1.example.com kernel: : bonding: bond0: releasing active interface eth1 Jun 8 05:20:46 s_sys@server1.example.com kernel: : bonding: bond0: Adding slave eth0. Jun 8 05:20:46 s_sys@server1.example.com kernel: : bnx2 0000:02:00.0: eth0: using MSIX Jun 8 05:20:46 s_sys@server1.example.com kernel: : bonding: bond0: enslaving eth0 as a backup interface with a down link. Jun 8 05:20:46 s_sys@server1.example.com kernel: : bonding: bond0: Adding slave eth1. Jun 8 05:20:46 s_sys@server1.example.com kernel: : bnx2 0000:02:00.1: eth1: using MSIX Jun 8 05:20:46 s_sys@server1.example.com kernel: : bonding: bond0: enslaving eth1 as a backup interface with a down link. Jun 8 05:20:49 s_sys@server1.example.com kernel: : bnx2 0000:02:00.0: eth0: NIC Copper Link is Up, 1000 Mbps full duplex Jun 8 05:20:49 s_sys@server1.example.com kernel: : bonding: bond0: link status definitely up for interface eth0. Jun 8 05:20:49 s_sys@server1.example.com kernel: : bonding: bond0: making interface eth0 the new active one. Jun 8 05:20:49 s_sys@server1.example.com kernel: : bnx2 0000:02:00.1: eth1: NIC Copper Link is Up, 1000 Mbps full duplex Jun 8 05:20:50 s_sys@server1.example.com kernel: : bonding: bond0: link status definitely up for interface eth1.
Satish (1672 rep)
Jun 10, 2017, 06:57 PM
1 votes
2 answers
1440 views
apache failover solution
We have 2 Apache Web-Servers which is getting replicated with `rsync` command, when the primary host is down, we manually change the IP and make it up. Now we are trying to find way to do an automatic switchover/failover environment. - Firstly when I say failover that means when the primary website...
We have 2 Apache Web-Servers which is getting replicated with rsync command, when the primary host is down, we manually change the IP and make it up. Now we are trying to find way to do an automatic switchover/failover environment. - Firstly when I say failover that means when the primary website is down secondary website should start & act as Primary - Switch over means when we do a manual switch (Testing the ENV) the website Codes should be synced - For switching IP failover is must ON each server I have 2 Nic available for failover purpose - How do I sync the Codes after switching or failover vice versa for eg; If my primary is working fine and I have deployed some new codes on the live (primary) server. Here if I have sync it will make the changes in secondary. But after switching to secondary to live, I have updated the live with the new codes now how do I sync. Do I need to create a CRON on both the server or is there any way to for simple replication Centos 6.7 httpd-2.2.25-1.el6.x86_64 Is there any solution for doing this?
user155159
Feb 19, 2016, 01:07 PM • Last activity: May 15, 2017, 07:49 PM
1 votes
0 answers
39 views
Cannot SSH to VPS After ifup?
I have a vps hosted by OVH with CentOS installed. I purchased 9 failover IPs and configured them as `eth0:1-eth0:8`. After I edited the config files to what was recommended by OVH as: DEVICE="eth0:0" BOOTPROTO="static" IPADDR="IP.FAIL.OVER" NETMASK="255.255.255.255" ONBOOT="yes" BROADCAST="IP.FAIL.O...
I have a vps hosted by OVH with CentOS installed. I purchased 9 failover IPs and configured them as eth0:1-eth0:8. After I edited the config files to what was recommended by OVH as: DEVICE="eth0:0" BOOTPROTO="static" IPADDR="IP.FAIL.OVER" NETMASK="255.255.255.255" ONBOOT="yes" BROADCAST="IP.FAIL.OVER" The machine hung up and kicked me out. I restarted the vps via the control panel and now the machine isn't pingable, can't SSH to it, and the failover IPs aren't pingable either. Any idea where I may have gone wrong?
Duffman (11 rep)
Nov 2, 2016, 10:46 PM • Last activity: Nov 2, 2016, 10:51 PM
2 votes
0 answers
270 views
keepalived: How to only demote master if a backup can take over?
I am currently trying to setup a highly available system using [keepalived][1]. I have a check-script that returns rc=0 if the host it is executed on is the master. Unfortunately this script can fail for various reasons which will lead to the demotion of the host and thus the removal of the virtual...
I am currently trying to setup a highly available system using keepalived . I have a check-script that returns rc=0 if the host it is executed on is the master. Unfortunately this script can fail for various reasons which will lead to the demotion of the host and thus the removal of the virtual ip. I think there should be a mechanism that the current master will only be demoted if a backup is ready to take over. Unfortunately I was not able to find out if this feature is available and how to set it up. Maybe somebody can help me out?
Tim Keller (123 rep)
Jun 3, 2016, 01:07 PM
1 votes
0 answers
251 views
How to route to Virtual IP as gateway
I have environment on Centos 6.7 Final, 2 Loadbalancer failover (Haproxy, keepalived), 3 Web Server (nginx - PHP-Fpm). LB1 (Public x.x.x.233, Private 10.110.120.21), LB2 (Public x.x.x.235, Private 10.110.120.23), Virtual (Public x.x.x.234, Private 10.110.120.22) Web server 1,2,3 (Private 10.110.120....
I have environment on Centos 6.7 Final, 2 Loadbalancer failover (Haproxy, keepalived), 3 Web Server (nginx - PHP-Fpm). LB1 (Public x.x.x.233, Private 10.110.120.21), LB2 (Public x.x.x.235, Private 10.110.120.23), Virtual (Public x.x.x.234, Private 10.110.120.22) Web server 1,2,3 (Private 10.110.120.31,32,33), Gateway 10.110.120.22 (Virtual IP) Currently target accepted 233,234,235. Question is how to route permanent which target accept Public IP x.x.x.234 only (Virtual Public IP) ? Regards, Pathic
Pathic (139 rep)
Mar 21, 2016, 11:34 AM
1 votes
1 answers
1108 views
Why can I connect to the IP of a network interface (on a server with multiple network interfaces) when the network cable is removed?
I have a Server with multiple (four) network interfaces running Arch Linux when I encountered something strange that I cannot explain. I have two interfaces configured to the the ip addresses `192.168.100.11/24` and `192.168.100.12/24` (using two netctl profiles). Both interfaces are connected to a...
I have a Server with multiple (four) network interfaces running Arch Linux when I encountered something strange that I cannot explain. I have two interfaces configured to the the ip addresses 192.168.100.11/24 and 192.168.100.12/24 (using two netctl profiles). Both interfaces are connected to a switch which also connects to my computer. When I enable the profiles both interface seem to work quite okay. But when I'm pinging the address of the main interface (192.168.100.11) and removing its cable (while having the secondary interface up and running) I continue to getting replies from 192.168.100.11 even though no cable is attached to the interface. I even can successfully ssh 192.168.100.11 into the machine. The output of ip addr shows that the interface has no carrier and is down but still has it's IP address: 2: enp7s0f0: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 00:1e:67:a3:7f:b6 brd ff:ff:ff:ff:ff:ff inet 192.168.100.11/24 brd 192.168.100.255 scope global enp7s0f0 valid_lft forever preferred_lft forever inet6 fd00::21e:67ff:fea3:7fb6/64 scope global mngtmpaddr dynamic valid_lft 6836sec preferred_lft 3236sec inet6 fe80::21e:67ff:fea3:7fb6/64 scope link valid_lft forever preferred_lft forever 3: enp7s0f1: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:1e:67:a3:7f:b7 brd ff:ff:ff:ff:ff:ff inet 192.168.100.12/24 brd 192.168.100.255 scope global enp7s0f1 valid_lft forever preferred_lft forever inet6 fd00::21e:67ff:fea3:7fb7/64 scope global mngtmpaddr dynamic valid_lft 6836sec preferred_lft 3236sec inet6 fe80::21e:67ff:fea3:7fb7/64 scope link valid_lft forever preferred_lft forever When I do netctl status main to check for the status the profile is still active: # netctl status main ● netctl@main.service - Main interface Loaded: loaded (/etc/systemd/system/netctl@main.service; enabled; vendor preset: disabled) Active: active (exited) since Thu 2015-01-08 11:29:07 UTC; 25min ago Docs: man:netctl.profile(5) Main PID: 55293 (code=exited, status=0/SUCCESS) Jan 08 11:29:03 timingserver1 network: Starting network profile 'main'... Jan 08 11:29:07 timingserver1 network: Started network profile 'main' How is this even possible? It is important to me to understand the mechanics behind this. The plan is that I have two redundant servers offering a service on the ip 192.168.100.11. One of the servers will have the main interface down and both are connected to the same switch. The second interface on both servers is used for maintanance when the server is standby or degraded (of course they will not have the same IP). So in case of a failover I will set the interface of the main-server down (or disconnect the cable) and activate the one on the backup-server. Of course, if the main-server still answers to 192.168.100.11 even if it is down, this would be bad... :-/ My netctl profile files: * main interface Description='Main interface' Interface=enp7s0f0 Connection=ethernet IP=static Address=('192.168.100.11/24') Gateway='192.168.100.1' DNS=('192.168.100.1' '8.8.8.8') * secondary interface Description='Secondary interface' Interface=enp7s0f1 Connection=ethernet IP=static Address=('192.168.100.12/24') DNS=('192.168.100.2' '8.8.8.8') I would appreciate it very much if anybody can direct me as how to archive my desired solution. Maybe it's just something stupid I've overlooked or don't know about but at the moment this is bothering me quite a bit... :-/
deepthought-64 (123 rep)
Jan 8, 2015, 12:18 PM • Last activity: Jan 8, 2015, 08:44 PM
Showing page 1 of 20 total questions