On 10/02/14 09:12 AM, Benjamin Budts wrote:
Ladies & Gents (I won’t make that same mistake again ;) ),
First, thank you to the lady who helped me explain how to force an OK on
fencing that is failing.
A 2 node config & Luci :
I would liketo put a backup solution in place for the cluster config /
nodeconfig/ fencing etc...
What would you recommend ? Or does Luci archive versions of
config-files somewhere ?
Basically, if shit hits the fan I would like to untar a golden image of
a config on luci and push it back to the nodes…
Thx
The main config file is /etc/cluster/cluster.conf. A copy of this file
should be on all nodes at once, so even if you didn't have a backup
proper, you should be able to copy it from another node.
Beyond that, I personally backup (sample taken from a node called
'an-c05n01';
====
mkdir ~/base
cd ~/base
mkdir root
mkdir -p etc/sysconfig/network-scripts/
mkdir -p etc/udev/rules.d/
# Root user
rsync -av /root/.bashrc root/
rsync -av /root/.ssh root/
# Directories
rsync -av /etc/ssh etc/
rsync -av /etc/apcupsd etc/
rsync -av /etc/cluster etc/
rsync -av /etc/drbd.* etc/
rsync -av /etc/lvm etc/
# Specific files.
rsync -av /etc/sysconfig/network-scripts/ifcfg-{eth*,bond*,vbr*}
etc/sysconfig/network-scripts/
rsync -av /etc/udev/rules.d/70-persistent-net.rules etc/udev/rules.d/
rsync -av /etc/sysconfig/network etc/sysconfig/
rsync -av /etc/hosts etc/
rsync -av /etc/ntp.conf etc/
# Save recreating user accounts.
rsync -av /etc/passwd etc/
rsync -av /etc/group etc/
rsync -av /etc/shadow etc/
rsync -av /etc/gshadow etc/
# If you have the cluster built and want to backup it's configs.
mkdir etc/cluster
mkdir etc/lvm
rsync -av /etc/cluster/cluster.conf etc/cluster/
rsync -av /etc/lvm/lvm.conf etc/lvm/
# NOTE: DRBD won't work until you've manually created the partitions.
rsync -av /etc/drbd.d etc/
# If you had to manually set the UUID in libvirtd;
mkdir etc/libvirt
rsync -av /etc/libvirt/libvirt.conf etc/libvirt/
# If you're running RHEL and want to backup your registration info;
rsync -av /etc/sysconfig/rhn etc/sysconfig/
# Pack it up
# NOTE: Change the name to suit your node.
tar -cvf base_an-c05n01.tar etc root
====
I then push the resulting tar file to my PXE server. I have a kickstart
script that does a minimal rhel6 install, plus the cluster stuff, and
then has a %post script that downloads this tar and extracts it.
This way, when the node needs to be rebuilt, it's 95% ready to go. I
still need to do things like 'drbdadm create-md <res>', but it's still
very quick to restore a node.
--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?
--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster