Building an HP SIM 5.x server on a Linux-based Serviceguard Cluster What is HP SIM................................................................................................................................... 2 HP SIM architecture ............................................................................................................................. 2 Setup process......................................................................................................................................
What is HP SIM HP Systems Insight Manager (HP SIM) is an industry standard management tool for the management of all HP Systems; Servers and Storage. With HP SIM, you can manage various systems including ProLiant servers running Windows, Linux, and NetWare, HP Integrity and HP 9000 servers running HP-UX; HP Integrity Servers running Windows and Linux; and monitor Alpha servers running Tru64 UNIX and OpenVMS.
The two important pieces in HP SIM are the software and the database it maintains. On a Linux CMS, it can use either a PostgreSQL or an Oracle database. The HP SIM package consists of the following elements. HP SIM-Linux - HP Systems Insight Manager (C.05.00.02.00) Automatic BIN file installation kit which will provide: • hpsim-pgsql-config - HP Systems Insight Manager Repository Configuration Product (C.05.00.02.00) • postgresql RPM - Client programs and libraries (7.4.
Each system of the cluster is running RHEL 4 Update 4. Installing the HP SIM binary on system1 and system2 Install HP SIM on each node in parallel. Download the binary distribution under /tmp, and then execute the following steps. Run the regular installation steps as described on the HP SIM website. 1. To install HP SIM with PostgreSQL, execute the following command: # cd /tmp # ./HPSIM-Linux*.bin 2. The HPSIM-Linux*.
6. If they are not running, start them by executing the following command: # /opt/mx/bin/mxstart 7. After installing the HP SIM package perform the following steps to create the relevant directories on the shared storage, copy the contents of the original directory and create symbolic links. (respectively /etc/pam.d/mxpamauthrealm, /etc/opt/mx, / opt/mx, /var/opt/mx, /etc/init.d/hpsim, /var/lib/pgsql). 8. Stop the running processes first to avoid problems: # /etc/init.d/hpsim stop # /etc/init.
Last cylinder or +size or +sizeM or +sizeK (1-20480, default 20480): Using default value 20480 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@hpsimlnx1 ~]# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created [root@hpsimlnx1 ~]# vgcreate vgsg /dev/sdb1 Volume group "vgsg" successfully created [root@hpsimlnx1 ~]# lvcreate -L 19990M -n lvsg vgsg Rounding up size to full physical extent 19.
This filesystem will be automatically checked every 30 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. # mount /dev/vgsg/lvsg /hpsimlnx/ # df /hpsimlnx/ Filesystem 1K-blocks /dev/sdb1 20642412 Used Available Use% Mounted on 77888 20564524 1% /hpsimlnx # cd /hpsimlnx 11. Create the required directories: # mkdir pam.d etc opt var hpsimlnx.d scripts hp 12.
# rm -rf /etc/opt/mx # ln -sf /hpsimlnx/etc /etc/opt/mx # rm -rf /opt/mx # ln -sf /hpsimlnx/opt /opt/mx # rm -rf /var/opt/mx # ln -sf /hpsimlnx/var /var/opt/mx # ln -sf /hpsimlnx/hpsimlnx.d/hpsim /etc/init.d/ # rm -f /etc/init.d/postgresql # ln -sf /hpsimlnx/hpsimlnx.d/postgresql /etc/init.d/ # rm -f /etc/pam.d/mxpamauthrealm # ln -sf /hpsimlnx/pam.d/mxpamauthrealm /etc/pam.d # rm -rf /var/lib/pgsql # ln -sf /hpsimlnx/pgsql /var/lib/pgsql Installing the cluster layer 1. HP Serviceguard 11.16.
# chmod 600 .ssh/authorized_keys # Copy the SSH keys from node1 to node2 to ease further copy of configuration files between nodes # scp -rp .ssh/ hpsimlnx2: 2. Install SGLX on system1. # ls -1 sg pidentd-3.0.15sg-1.i386.rpm serviceguard-A.11.16.02-0.product.redhat.i386.rpm sgcmom-B.03.01.01-0.product.redhat.i386.rpm sgmanager-A.04.02.00-1.product.redhat.i386.rpm # cd sg #.rpm -ivh pidentd-3.0.15sg-1.i386.rpm serviceguard-A.11.16.020.product.redhat.i386.rpm sgcmom-B.03.01.01-0.product.redhat.i386.
# chkconfig identd on # ssh hpsimlnx2 chkconfig identd on # /etc/init.d/identd start # ssh hpsimlnx2 /etc/init.d/identd start Managing SGLX authorizations # cat > /usr/local/cmcluster/conf/cmclnodelist << EOF hpsimlnx1 root hpsimlnx2 root hpsimlnx1p root hpsimlnx2p root EOF # cat > $SGCONF/cluster.
# "qshost" with 120 seconds for the QS_POLLING_INTERVAL and to # add 2 seconds to the system assigned value for the quorum server # timeout, enter: # QS_HOST qshost # QS_POLLING_INTERVAL 120000000 # QS_TIMEOUT_EXTENSION 2000000 QS_HOST QS_POLLING_INTERVAL qs 300000000 # Definition of nodes in the cluster. # Repeat node definitions as necessary for additional nodes.
# Enter the maximum number of packages which will be configured in the cluster. # You can not add packages beyond this limit. # This parameter is required. MAX_CONFIGURED_PACKAGES 20 EOF Replication on node hpsimlnx2 # scp -p $SGCONF/cluster.conf $SGCONF/cmclnodelist hpsimlnx2:$SGCONF 1. Start the SGLX cluster # cmruncl -v 2. Create the HP SIM package by launching HP Serviceguard Manager and connect to the cluster to create the HP SIM package: Figure 2 • In the Package name field, enter HPSIM.
Figure 3 • Select Package autorun. • Select Configured system for Failover Policy. • Keep the default time out settings. Figure 4 • Add the 192.168.2.x and 10.0.0.x subnets to the Subnets monitored for the package field. • Enter thee IP address of the cluster, 192.1682.15 in our case, to the Specify addresses on subnet field and click Add(w) to add the IP address to the Configured IP Addresses box.
Figure 5 • Select Parallel for Concurrent vgchange operation. • Select Standard LVM activation for the Activation Method. • Enter the cluster aware volume groups, vgsg in our example, in the Cluster aware volume groups field and click Add to add it to the Package volume groups box. Figure 6 • Select Parallel for File system checking and enter1 in the Concurrent FSCK operations box. • Select Parallel for Mount operations and enter 1 in the Concurrent and unmount operations box.
• Click Add to add the FS Type (ext3), Volume Name (/dev/vgsg/lvsg), and the Mount Directory (/hpsimlnx). Figure 7 • In the Run command field, enter the path for the start script: /etc/init.d/sgsim start • In the Halt command field, enter the path for the stop script: /etc/init.d/sgsim stop # cat /etc/init.
# Check that networking is up. # Pretty much need it for postmaster. [ "${NETWORKING}" = "no" ] && exit 0 start(){ PSQL_START=$"Starting ${NAME} service: " /etc/init.d/postgresql start stat=$? if [ $stat -eq 0 ]; then /etc/init.d/hpsim start if [ $? -eq 0 ]; then success "$NAME" touch /var/lock/subsys/${NAME} echo else failure "$NAME (hpsim)" echo exit -1 fi else failure "$NAME (postgresql)" echo exit -1 fi } stop(){ echo -n $"Stopping ${NAME} service: " /etc/init.
fi echo /etc/init.d/postgresql stop ret=$? if [ $ret -eq 0 ]; then echo_success else echo_failure res=1 fi echo rm -f /var/lock/subsys/${NAME} exit $res } restart(){ stop start } # See how we were called.
exit 1 esac exit 0 Figure 8 • In the Configure HA Application Server box, select Post-IP. Figure 9 3. Start the package now. The HP SIM server is now ready for use.
Troubleshooting Finetuning of the HP SIM server • SELinux issue: If activated, postgreSQL does not start in the cluster script. You must apply the following patch: # # diff postgresql.
• Toolkit.sh modification: the script is not provided through HP Serviceguard Manager, for this paper the script from the MySQL toolkit was used and the following changes were applied: # diff HPSIM/toolkit.sh ../mysqltoolkit/toolkit.sh 43c43 < HA_SCRIPT="$PKG_DIR/HPSIM.sdf.sh" --> HA_SCRIPT="$PKG_DIR/hamysql.sh" 63c63 < Server." echo "$(date '+%b %e %T') - ERROR: Failed to $ACT SGSIM --> Server." echo "$(date '+%b %e %T') - ERROR: Failed to $ACT MySQL 107c107 < # . $HA_SCRIPT $ACT --> .
Related references • • http:/www.hp.com/go/hpsim http://www.hp.com/go/sglx © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Java is a U.S.