Monday, March 2, 2009

SystemRescueCD and IBM TSM backup client

SystemRescueCD is nice
SystemRescueCD is fresh
SystemRescueCD is gentoo
SystemRescueCD is a successor of R.I.P.

Addon script tested with sysrcd 1.1.6 and TSM 5.5.0

#!/bin/bash
#
# SystemRescueCD autorun script for IBM TSM backup client support
#
# function:
# by default SystemRescueCd executes /autorun script if exist
# This autorun script extract archive at SystemRescueCd live filesystem
#
# prerequisite:
# 0) need working server with installed tsm client rpms
# 1) check on working server # rpm -qa | grep TIVsm
# TIVsm-API-5.5.0-4
# TIVsm-BA-5.5.0-4
# 3) create tsm-client.tar.bz2 archive with
# # tar -jcvf tsm-client.tar.bz2 --exclude=/opt/tivoli/tsm/client/ba/bin/tsmstats.* /opt/tivoli/tsm/client
# 4) copy this autorun script at /
# 5) chmod +x /autorun
# 5) copy tsm-client.tar.bz2 at /isolinux/sysrcd-addon/tsm/
# 6) copy your custom dsm.opt and dsm.sys at /isolinux/sysrcd-addon/tsm/
# 7) crosscheck # ls -al /isolinux/sysrcd-addon/tsm/
# -rw-r--r-- 1 root root 856 Dec 19 13:54 dsm.opt
# -rw-r--r-- 1 root root 8774 Dec 19 13:54 dsm.sys
# -rw-r--r-- 1 root root 17948367 Dec 19 15:10 tsm-client.tar.bz2
# 8) optional: example for a isolinux bootcd with sysrcd menu
# # ls -al /isolinux/sysrcd116/
# -r--r--r-- 1 root root 5211568 Feb 24 08:08 altker32
# -r--r--r-- 1 root root 5176624 Feb 24 01:21 altker64
# -r--r--r-- 1 root root 12821248 Feb 25 21:30 initram.igz
# -r--r--r-- 1 root root 3524496 Feb 23 20:40 rescue64
# -r--r--r-- 1 root root 3565712 Feb 25 21:10 rescuecd
# -r--r--r-- 1 root root 212766720 Feb 25 21:19 sysrcd.dat
# -r--r--r-- 1 root root 45 Feb 25 21:30 sysrcd.md5
# # cat /isolinux/rescue_sysrcd.menu
# LABEL 64
# MENU LABEL Kernel for amd64
# KERNEL sysrcd116/rescue64
# APPEND initrd=sysrcd116/initram.igz subdir=isolinux/sysrcd116 backstore=off
#
# history:
# date description
# 01.03.2009 created
##############################################################################
SRCDIR=/mnt/cdrom/isolinux/sysrcd-addon

echo "SystemRescueCd autorun - enable tsm client support"
tar -jxf $SRCDIR/tsm/tsm-client.tar.bz2 -C /
mkdir -p /var/adsmlog
cp $SRCDIR/tsm/dsm.opt /opt/tivoli/tsm/client/ba/bin/
cp $SRCDIR/tsm/dsm.sys /opt/tivoli/tsm/client/ba/bin/
for prog in dsmadmc dsmagent dsmc dsmcad dsmj dsmswitch dsmtca dsmtrace ; do
ln -s ../../opt/tivoli/tsm/client/ba/bin/$prog /usr/bin/$prog
done
for f in libApiDS.so libtsm551xerces-c1_6_0.so libxmlutil-5.5.1.0.so ; do
ln -s ../../opt/tivoli/tsm/client/api/bin/$f /usr/lib/$f
done
for f in libgpfs.so libdmapi.so libha_gs_r.so libct_cu.so ; do
if [ ! -f /usr/lib/$f ] ; then
cp /opt/tivoli/tsm/client/api/bin/$f /usr/lib
fi
done
# EOF