[CentOS] alternative to rocks cluster

Wed Feb 21 11:56:34 UTC 2007
Bernhard Gschaider <bgschaid_lists at ice-sf.at>

>>>>> On Wed, 21 Feb 2007 11:09:19 +0000
>>>>> "TB" == Tom Brown <tom at ng23.net> wrote:

    >> There is a pseudo-service rocks-grub installed on every
    >> rocks-node. When the node boots it sets the grub-configuration
    >> in such a way that grub will call pxe-boot. At the end of a
    >> regular shutdown it resets the grub-configuration to the
    >> regular harddisk-boot. That way every time something bad
    >> happens to the node (in other words: was not shutdown
    >> regularily) the node 'boots' by PXE (and is reinstalled).

    TB> can you give me any examples of this grub configuration at
    TB> all?

I can, but I doubt whether it will help you too much:

/etc/grub.conf is:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
hiddenmenu
title Rocks Reinstall
        root (hd0,0)
        kernel /boot/kickstart/default/vmlinuz ro root=LABEL=/ ramdisk_size=150000 kssendmac ks selinux=0
        initrd /boot/kickstart/default/initrd.img
title Rocks (2.6.9-42.0.2.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.2.ELsmp ro root=LABEL=/
        initrd /boot/initrd-2.6.9-42.0.2.ELsmp.img
title Rocks-up (2.6.9-42.0.2.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.2.EL ro root=LABEL=/
        initrd /boot/initrd-2.6.9-42.0.2.EL.img


For a graceful reboot the first option is removed. The kernel that is
used for Reinstalling ist part of a rocks-boot.rpm (the script that
does all that is part of rocks-boot.auto.rpm). The sources for those
(which you'll propably want) are not on my system and I couldn't
locate them at ftp://ftp.rocksclusters.org, but maybe you have more
luck.

The init.d-script that exchanges the configuration won't be too much
help too, becuase cluster-kickstart is a binary (I'll send it anyway):


. /etc/rc.d/init.d/functions

# Set the file perms for cluster-kickstart to SUID
/bin/chmod 4750 /boot/kickstart/cluster-kickstart

case "$1" in
start)
        action "Rocks GRUB: Setting boot action to 'reinstall':" \
                /boot/kickstart/cluster-kickstart --start
        touch /var/lock/subsys/rocks-grub
        ;;

stop)
        action "Rocks GRUB: Setting boot action to 'boot current kernel':" \
                /boot/kickstart/cluster-kickstart --stop
        rm -f /var/lock/subsys/rocks-grub
        ;;

*)
        echo "Usage: $0 {start|stop}"
        RETVAL=1
esac

exit $RETVAL



If you need any info apart from that (as I said, I don't have the
sources for the stuff) send me a mail (drop the _list from the
address). Otherwise the Rocks-Mailinglist might help you.