Has to be hostdependant:
/var/lib/heartbeat/
Make “hostdependant”:
com-mkcdsl –a /var/lib/heartbeat/
Delete hostdependency:
com-rmcdsl -d /srv/www/tomcat6/work
Execute same command on all nodes (requires “comoonics-cluster-tools-py” RPM Package):
com-dsh -v hostname com-dsh -vvvvv hostname com-dsh -v rctomcat6 stop com-dsh --timeout=30 -v rctomcat6 stop com-dsh --timeout=30 -v rctomcat6 start
Note: There is a “–ssh_hostkey” option, which is set in default to “ask”. Options:
accept, ask, or strict
To avoid user input (“yes” or “no” during connnection) this should be changed to “accept” inside the script.
To shorten the shutdown execute
sync
on all nodes!
/opt/atix/comoonics-bootimage/mkinitrd -f /mnt/newroot/boot/initrd-$(uname -r) $(uname -r)
Update Initrd for another Kernel
/opt/atix/comoonics-bootimage/mkinitrd -f /boot/initrd-2.6.16.60-0.54.5-smp 2.6.16.60-0.54.5-smp
kernel is in: /lib/modules
Update software:
zypper update --type=package
com-mkcdslinfrastructure --migrate
mount /boot cp /boot/initrd-$(uname -r) /boot/temp/initrd-$(uname -r).bak /opt/atix/comoonics-bootimage/mkinitrd /boot/initrd-$(uname -r) $(uname -r)
reboot nodes
To create a shared_root initrd execute
/opt/atix/comoonics-bootimage/mkinitrd -f /mnt/newroot/boot/initrd-$(uname -r) $(uname -r)
To create a new initrd in running sles11 shared_root execute
/opt/atix/comoonics-bootimage/mkinitrd -f /mnt/newroot/boot/initrd-$(uname -r) $(uname -r)
To create a shared_root initrd execute
chroot /mnt/newroot /opt/atix/comoonics-bootimage/mkinitrd /boot/initrd-$(uname -r) $(uname -r)
To create a new initrd in running sles11 shared_root execute
/opt/atix/comoonics-bootimage/mkinitrd /boot/initrd-$(uname -r) $(uname -r)
Very IMPORTANT:
echo "ocfs2-kmp-default" >> /etc/comoonics/bootimage/rpms.initrd.d/sles11/ocfs2.list
#!/bin/bash /usr/bin/com-dsh -v hostname -f 2> /root/freenodes/free_hosts sed 's/'Iuclid'/'iuclid'/g' /root/freenodes/free_hosts > /root/freenodes/free_hosts_temp FILE="/root/freenodes/free_hosts_temp" mkdir /root/freenodes 2> /dev/null #if [ -s $FILE ] && [ grep iuclid* /root/freenodes/free_hosts_temp ] if [ -s $FILE ] then HOST=`/usr/bin/grep iuclid* /root/freenodes/free_hosts_temp | /usr/bin/sed -n 1p | awk '{printf $1 ""}'` /bin/echo "-----------------" /bin/echo "Next free Host:" echo $HOST IP=`/usr/bin/grep -i $HOST /etc/hosts | /usr/bin/awk '{printf $1 ""}'` /bin/echo "-----------------" echo "IP is:" echo $IP else echo "No free Node available. Please contact TechniData Datacenter!" exit 1 fi printf "$IP" > /root/freenodes/IP printf "$HOST" > /root/freenodes/HOST exit /scripts/free.sh com-dsh - Python Distributed Shell Process host list Test hosts for connectivity. Host loop: Display loop: Host | Output: ----------+------------------------------------------------------------------- iuclid101 | iuclid101.site ----------+------------------------------------------------------------------- Next free Host: Iuclid102 ----------------- IP is: 192.168.1.16 Local Script: #!/usr/bin/perl # run this under: eval $(this script) open (DATA, "ssh -t 192.168.1.15 /scripts/free.sh |"); while (<DATA>) { $Line=$_; print (STDERR $Line); if ($Line =~ /^Next free Host:/) { $Host=<DATA>; } if ($Line =~ /^IP is:/) { $IP=<DATA>; } } chomp ($Host); chomp ($IP); print qq[export Host="$Host"\n]; print qq[export IP="$IP"\n];
comoonics-pythonosfix-py-0.1-2 comoonics-tools-py-0.1-7 comoonics-bootimage-listfiles-sles10-0.1-4 comoonics-bootimage-listfiles-all-0.1-15 comoonics-cluster-py-0.1-27 comoonics-cdsl-py-0.2-32 comoonics-bootimage-initscripts-1.4-9.sles10 comoonics-bootimage-extras-ocfs2-0.1-10 sysvinit-comoonics-2.86-21.21 comoonics-base-py-0.1-11 comoonics-bootimage-listfiles-sles-0.1-7 comoonics-bootimage-1.4-64
comoonics-pythonosfix-py-0.1-2 comoonics-bootimage-extras-ocfs2-0.1-10 comoonics-bootimage-initscripts-1.4-11.sles11 comoonics-bootimage-listfiles-sles11-0.1-8 comoonics-base-py-0.1-19 comoonics-cdsl-py-0.2-37 comoonics-bootimage-listfiles-sles-0.1-7 sysvinit-comoonics-2.86-195.2 comoonics-cluster-py-0.1-33 comoonics-bootimage-listfiles-all-0.1-16 comoonics-tools-py-0.1-9 comoonics-cluster-tools-py-0.1-16 comoonics-bootimage-1.4-79_4
cat /opt/atix/comoonics-bootimage/boot-scripts/etc/comoonics-release
/etc/modprobe.conf
options bond0 miimon=30 mode=1 alias bond0 bonding
/etc/sysconfig/network/ifcfg-bond0
NM_CONTROLLED="no" DEVICE="eth0" STARTMODE="nfsroot" TYPE="Ethernet"
/etc/sysconfig/network/ifcfg-eth0
NM_CONTROLLED="no" DEVICE="eth0" STARTMODE="nfsroot" TYPE="Ethernet" USERCTL="no" ONBOOT="yes" MASTER="bond0" SLAVE="yes" BOOTPROTO="none"
/etc/sysconfig/network/ifcfg-eth1
NM_CONTROLLED="no" DEVICE="eth1" STARTMODE="nfsroot" TYPE="Ethernet" USERCTL="no" ONBOOT="yes" MASTER="bond0" SLAVE="yes" BOOTPROTO="none"
/etc/cluster/cluster.conf
<eth name="eth0" mac="00:11:22:AB:CD:EE" master="bond0" slave="yes"/> <eth name="eth1" mac="00:11:22:AB:CD:EF" master="bond0" slave="yes"/> <eth name="bond0" ip="192.168.123.45" mask="255.255.255.0" gateway=""/>
To boot with another shared-root-disk (e. g. a cloned device such as sdb) enter in Grub
root=/dev/xxx
to overwrite fstab settings during boot in grub shell or gui.