[[http://tmade.de|Home tmade.de]] [[http://wiki.tmade.de|Home Wiki]] ==== Heartbeat with Comoonics ==== Has to be hostdependant: /var/lib/heartbeat/ Make "hostdependant": com-mkcdsl –a /var/lib/heartbeat/ ==== Useful Commands ==== 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! ==== Update Initrd ==== /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 ==== Initrd SLES10 ==== 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) ==== Initrd SLES11 ==== 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 ==== Free Hosts ==== #!/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 () { $Line=$_; print (STDERR $Line); if ($Line =~ /^Next free Host:/) { $Host=; } if ($Line =~ /^IP is:/) { $IP=; } } chomp ($Host); chomp ($IP); print qq[export Host="$Host"\n]; print qq[export IP="$IP"\n]; ==== Checked Packets (SLES10) ==== 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 ==== Checked Packets (SLES11) ==== 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 ==== Check Version ==== cat /opt/atix/comoonics-bootimage/boot-scripts/etc/comoonics-release ==== Bonding ==== /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 ==== Alternative Root Disk ==== 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.