Building an Nextcloud HA Cluster Part3 The Initial Setup

image_pdfimage_print

Building the Bonds:

We’re talking about DEGRADED bonds….. why degraded Bonds?

Most providers dont offer multiple Network Interfaces… but maybe in the Future… if you build your Bond you’re prepared…. or so. Also it looks a lot  more structured.

😀

Do this Action on both Nodes

Create the Public Network:

touch /etc/sysconfig/network/ifcfg-public

touch touch /etc/sysconfig/network/ifroute-public

Create Internal Network:

touch /etc/sysconfig/network/ ifcfg-clintr

 

Add your IP’s to the Configs

1st Node


/etc/sysconfig/network/ifcfg-public

 


BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=100'
BONDING_SLAVE0='eth0'
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='1.2.3.5/22'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
NETMASK=''
PREFIXLEN=''

 


vi /etc/sysconfig/network/ifcfg-clintr


BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=100'
BONDING_SLAVE0='eth1'
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='172.16.0.3/29'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
NETMASK=''
PREFIXLEN=''

 

2nd Node


vi /etc/sysconfig/network/ifcfg-public

 

BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=100'
BONDING_SLAVE0='eth0'
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='1.2.3.5/22'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto


vi /etc/sysconfig/network/ifcfg-clintr


BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=100'
BONDING_SLAVE0='eth1'
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='172.16.0.2/29'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'

/etc/hosts

 


Do your self a favor,  /etc/hosts has to be identical on all Cluster Nodes.... clean it up before you think about setting up the Cluster Services.
127.0.0.1       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
###################Public IP Adress Servers##################
1.2.3.4  clusternode0 clusternode0.fullqualifieddomainname.de
1.2.3.5   clusternode1  clusternode1.fullqualifieddomainname.de
##################Internal VLAN##############################
172.16.0.3      clusternode0  clusternode0stor
172.16.0.2      clusternode1  clusternode1stor
######################providersettings
37.120.172.3      gw02.provider.net
37.120.172.2      gw01.provider.net
37.120.172.1      gw00.provider.net
clusternode1:~ #

/etc/nsswitch.conf

 

Make sure /etc/nsswitch.conf looks in first place on the File Entries, and only in second place to DNS Entries.

You won’t rely on DNS only , especially in a clustered Environment! Consider this as best practice in any Cluster Framework.

hosts:      files dns
networks:    files dns

 
Make sure that the files entry is present in the networks Line in your nsswitch.conf

Building an Nextcloud HA Cluster Part3 The Initial Setup