Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Neil Schellenberger <nschelle@west.crosskeys.com>
Subject: Re: DECnsr (Networker) UNIX 3.2d warning / problem / tape density
Date: 1996/09/09	[thread overview]
Message-ID: <xre20gbz36j.fsf@west.crosskeys.com> (raw)
In-Reply-To: 5100kt$ss9@lex.zippo.com



wzambotti@southmark.xlane.net.au writes:
> What happend to my last backup was the system lost power for a few moments
> about half an hour before the unattended backup started.  When it did start it
> saved the files in low density format to the tape unit.  Even though the
> "Devices" list clearly shows /dev/nrmt0h (h for high density) is been used.  This
> meant that the follwoing morning there wasn't enough tapes or time to complete
> the backup.
> 

Ack. Oop. Thhppt.  This annoyed me enough that I've arranged for our
system to automatically reset the tape drive density on reboot and also
(via cron) a few minutes before our nightly backups start.

Here's the expect script I hacked up (my very first one, so be gentle
about the programming style).  Note that the exec hack on line 3 is
mandatory if you will be using this as an rc3.d script (they are
unconditionally executed by /bin/sh).  Alternately, you could add it to
inittab and/or as a cronjob.

This works on our 3.2D-1 AlphaServer 1000A with a TLZ07 drive.  Your
mileage may vary.  Offer void where prohibited.  No warranty expressed
or implied.  Neither I nor CrossKeys takes any responsibility whatsoever
for any expense or damage arising from the use....  You get the picture.


Regards,
Neil


#!/usr/local/bin/expect --
#   avoid execution under /bin/sh using backslashed comment \
exec /usr/local/bin/expect "$0" "$@"

log_user 0

proc usage {} {
  global argv0
  send_error "usage: $argv0 {start|restart|high|on|1|stop|low|off|0}\n"
  exit
}

if { $argc == 1 } {

  switch -regexp -- [lindex $argv 0] {

    start|restart|high|on|1     { set compression 1 }
    stop|low|off|0              { set compression 0 }

  }

} elseif { $argc == 0 } {

  set compression 1

}

if { ! [info exists compression] } {
  usage
}

spawn /sbin/scu -f /dev/nrmt0h change page device-configuration

while 1 {
  expect {
    eof break
    "Compression*: " { send "$compression\r" }
    ": " { send "\r" }
  }
}

-- 
Neil Schellenberger             | Voice : (604) 205-9900 ext. 5922
CrossKeys Systems Corp. (West)	| Fax   : (604) 205-9940
#502 - 4180 Lougheed Highway	| E-Mail: nschelle@crosskeys.com
Burnaby, B.C., Canada, V5C 6A7  | URL   : http://www.crosskeys.com/



  parent reply	other threads:[~1996-09-09  4:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-08  4:00 DECnsr (Networker) UNIX 3.2d warning / problem / tape density wzambotti
1996-09-09  4:00 ` Amy Lenox
1996-09-09  4:00   ` wzambotti
1996-09-10  4:00     ` Amy Lenox
1996-09-09  4:00   ` wzambotti
1996-09-09  4:00 ` Neil Schellenberger [this message]
1996-09-09  4:00 ` Tim Mooney
1996-09-10  4:00 ` Wes Ono
  -- strict thread matches above, loose matches on Subject: below --
1996-09-08  4:00 wzambotti
1996-09-09  4:00 ` Murray S. Kucherawy
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox