System information
Sharing and maintaining SLES 10 SP2 Linux under z/VM 75
#+--------------------------------------------------------------------------+
{
source=$1
target=$2
echo ""
echo "copying $source to $target ..."
sDev=/dev/$(egrep ^0.0.$source /proc/dasd/devices | awk '{ print $7 }')
if [ "$?" != 0 ]; then exit 33; fi
tDev=/dev/$(egrep ^0.0.$target /proc/dasd/devices | awk '{ print $7 }')
if [ "$?" != 0 ]; then exit 34; fi
echo ""
echo "dasdfmt-ing $tDev ..."
dasdfmt -y -b 4096 -f $tDev
if [ "$?" != 0 ]; then exit 35; fi
echo ""
echo "dd-ing $sDev to $tDev ..."
dd bs=4096 if=$sDev of=$tDev
if [ "$?" != 0 ]; then exit 36; fi
echo ""
echo "disabling and re-enabling $target ..."
chccwdev -d $target
if [ $? != 0 ]; then exit 37; fi
chccwdev -e $target
if [ $? != 0 ]; then exit 38; fi
}
#+--------------------------------------------------------------------------+
function copySystem()
# Copy /mnt/source to /mnt/target
#+--------------------------------------------------------------------------+
{
echo ""
echo "Copying root file system ..."
copyDisk 11b1 21b1
echo ""
echo "Copying /boot/ ..."
copyDisk 11b0 21b0
echo ""
echo "Copying minidisk swap space ..."
copyDisk 11b4 21b4
echo ""
echo "Copying /local/ ..."
copyDisk 11b5 21b5
echo ""
echo "Copying /var/ ..."
copyDisk 11b6 21b6
echo ""
echo "Copying /usr/ ..."
copyDisk 11b7 21b7
echo ""
echo "Copying /opt/ ..."
copyDisk 11b8 21b8
}