[comp.sys.hp] Tips for a new HP admin?

lindner@cs.umn.edu (Paul Lindner) (12/11/90)

I've been "appointed" to take care of a brand new batch of HP 400 Series.
I've had some experience with HP-UX in the past.  (Specifically a
HP9000/320 with a couple of 310 clients!).  I didn't really do much 
sysadmin stuff on em though.  I've done quite a bit of admin work on
Suns, Nexts, and RS/6000's though, so I'm not completely in the dark.

What I'd like is any information that you think is imperative for the
first time HP admin.  Basically if you've got a nugget of information
that saved you a bunch of time, by all means let me know!  I'm
looking for information in the following areas.  (Hopefully some
of these questions will be answered by the Manual set which hasn't
arrived yet.)

1) Printing appears different.  What does an old lpd hacker have to do?
2) HP NCS, what is this?  NFS support is there, after I reconfigged the
   kernel.  Is NCS better?  I seem to recall that OSF liked it.
3) In the same vein, what about YP, errr NIS.  It's there, I tried it
   but it doesn't seem to work correctly.
4) finger seems broken, "finger lindner@mermaid.micro.umn.edu" doesn't
   want to work.  (My resolv.conf file is correct so it ain't that).
5) Will rdump/rrestore work correctly for a remote Exabyte tape drive?
6) .....

I could go on and on.  I've got the machines here and I'm itching to
get them up and running correctly.  Right now they're in that booted
but not the way I like them state.  Any tips and techniques will be 
greatly appreciated!

Thanks!

-- 
Paul Lindner, Univ. of MN   \ Microcomputer /  Pauls Law: You can't
IT Sun dude, & UofM ACM pres \ Workstation / fall off the floor.
lindner@boombox.micro.umn.edu \ Networks  / {...!rutgers!umn-cs!lindner}
     |   |  |  |  | | | | |||||\ Center  /||||| | | | |  |  |  |   |

jwright@cfht.hawaii.edu (Jim Wright) (12/14/90)

lindner@cs.umn.edu (Paul Lindner) writes:
>5) Will rdump/rrestore work correctly for a remote Exabyte tape drive?

Here are samples of the scripts I use to backup our 300's, 400's and 800's
to an Exabyte on a Sun 3/60.

---- /usr/adm/backups/remote_backup_400 -------------------------------------

#!/bin/csh
#
# jrw  23 oct 90  stole from script to do 300's, modified for use on 400's

if ( $#argv != 0 ) then
    echo "usage: $0"
    exit (1)
endif

if ( `id -u` != 0 ) then
    echo "must be root to perform backup"
    exit (1)
endif

echo " "
echo "performing backups to remote tape device"
echo " "

set HOST = `hostname`

foreach MACHINE in ( mercury nano fireball topgun )
    echo " "
    echo "backing up $MACHINE..."
    echo " "
    if ( "$HOST" != $MACHINE ) then
        remsh $MACHINE /usr/adm/backups/backup_rdump
    else
        /usr/adm/backups/backup_rdump
    endif
end

/usr/adm/backups/eject_remote

exit (0)

---- /usr/adm/backups/backup_rdump ------------------------------------------

#!/bin/csh
#
# jrw  ?          created
# jrw  31 may 90  modifications to work with mahina and sunos 4.1
# jrw  15 sep 90  make script which is invoked by master backup_HP script
#
# THIS SCRIPT MUST BE THE FIRST ONE TO WRITE TO A TAPE
# This will write the first, second and third save sets to the tape.  All
# the other hosts' disks will come later.

#### Note for usenet: Each backup_rdump script is specific to the machine
#### it resides on.  It has hard-coded knowledge of which save-set on the
#### tape it will write.  This is not bad, in that 100% consistent backups
#### are good.

if ( $#argv != 0 ) then
    echo "usage: $0"
    exit (1)
endif

if ( `id -u` != 0 ) then
    echo "must be root to perform backup"
    exit (1)
endif

# snag the current configuration file
rcp quonset:/usr/adm/backups/config /usr/adm/backups/config
set location = remote
source /usr/adm/backups/config

echo " "
echo "performing level 0 dump on MERCURY; remote device is $rdevice"
echo " "
# one rewind is done asychronously, two forces a wait until completion
remsh $machine /bin/mt -t $device rewind
remsh $machine /bin/mt -t $device rewind
# or do /bin/mt -t $device fsf N, where N is the number of this save-set
# but this machine is the first in line
echo "/etc/rdump $backopt $rdevice $block $density $size /dev/dsk/0s0"
      /etc/rdump $backopt $rdevice $block $density $size /dev/dsk/0s0
echo "/etc/rdump $backopt $rdevice $block $density $size /dev/dsk/2s0"
      /etc/rdump $backopt $rdevice $block $density $size /dev/dsk/2s0
echo "/etc/rdump $backopt $rdevice $block $density $size /dev/dsk/3s0"
      /etc/rdump $backopt $rdevice $block $density $size /dev/dsk/3s0

echo " "
echo "checking dump tape for correctness"
echo " "
echo "retrieving file -- ignore prompts, I will provide the responses needed"
cd /usr/local/cfht/backup_verify
mv VerificationFile VerificationFileOrig
remsh $machine /bin/mt -t $device rewind
remsh $machine /bin/mt -t $device rewind
cd /usr/local/cfht
/etc/rrestore $restopt $rdevice $block 3 backup_verify/VerificationFile << E-O-I
1
n
E-O-I
echo " "
echo "file retrieved, now comparing for differences"
cd /usr/local/cfht/backup_verify
cmp VerificationFile VerificationFileOrig
echo "comparison complete"
mv VerificationFileOrig VerificationFile

echo " "
echo "dump completed; now rewinding tape"
echo " "
remsh $machine /bin/mt -t $device rewind
remsh $machine /bin/mt -t $device rewind

exit (0)

---- /usr/adm/backups/eject_remote ------------------------------------------

#!/bin/csh
#
# jrw  04 oct 90  created
#
# Eject a remote Exabyte

set location = remote

source config

echo " "
echo "now ejecting tape"
remsh $machine /bin/mt -t $device offline

exit(0)

---- /usr/adm/backups/config ------------------------------------------------

#!/bin/csh
#
# jrw  04 oct 90  created
#
# This will set up the current parameters for the exabyte drive.
# To use it, source this script (don't just execute it!).
#
# Before sourcing this script, you should have the variable $location
# set to either "remote" or "local", depending on whether the exabyte
# drive is locally connected or somewhere on the network.
#
# The master copy of this file is in quonset:/usr/adm/backups/config.
# Any other machine which uses this file should always retrieve a
# fresh copy from quonset before sourcing this.  Only make changes
# to the copy of this file on quonset.

if ( "$location" == "remote" ) then

    ## for use with standard Sun scsi driver
    ##
    # set tape    = st1
    # set backopt = 0ufbds
    # set restopt = fbsvx
    # set browopt = ifs
    # set block   = 124
    # set size    = 6000
    # set density = 54000

    ## for use with delta microsystems scsi driver on Sun
    ##
    set tape    = smt0
    set backopt = 0ufbs
    set restopt = fbsvx
    set browopt = ifs
    set block   = 124
    set size    = 105000
    set density = ""

else if ( "$location" == "local" ) then

    ## for use with delta microsystems scsi driver on HP
    ##
    set tape    = smt0
    set backopt = 0fbs
    set restopt = fsvx
    set browopt = ifbs
    set block   = 124
    set size    = 103400
    set density = ""

else

    echo "$0: don't know if tape drive is local or remote"
    set tape    = ""
    set backopt = ""
    set restopt = ""
    set block   = ""
    set size    = ""
    set density = ""

endif

set device  = /dev/nr$tape

set machine = mahina
set rdevice = "$machine":$device

exit(0)

--
Jim Wright
jwright@cfht.hawaii.edu
Canada-France-Hawaii Telescope Corp.

rek@hpwrce.HP.COM (Ron Kittle) (12/15/90)

re: csh backup scripts

Thanks for posting your backup scripts, Jim.  I'd like to pass along a tip
to the net regarding csh scripts.  When using csh for writing scripts, it's
a good idea to use the following as the first line of the script:

#!/bin/csh -f

This will invoke csh with the "-f" (fast) option, which suppresses reading
the $HOME/.cshrc file.  This improves startup time, and more importantly,
it eliminates the possibility that aliases from the .cshrc file will change
the functionality of the shell script.

The (roughly) analogous option to ksh is "-p".  Since /bin/sh doesn't use a
startup script for non-login shells, this is not an issue for sh.

Ron Kittle
rek@hpwrc.hp.com
#include <std/disclaimer>