From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,739dc7aee6134cec X-Google-Attributes: gidfee84,public From: Neil Schellenberger Subject: Re: DECnsr (Networker) UNIX 3.2d warning / problem / tape density Date: 1996/09/09 Message-ID: #1/1 X-Deja-AN: 179757108 sender: nschelle@maugham references: <5100kt$ss9@lex.zippo.com> organization: CrossKeys Systems Corp. newsgroups: comp.unix.osf.osf1 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/