tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:  Running VDUMP to multiple tapes in the background...
@ 1997-09-30  2:14 Keith Feggans
  0 siblings, 0 replies; only message in thread
From: Keith Feggans @ 1997-09-30  2:14 UTC (permalink / raw)
  To: tru64-unix-managers

Hello
  Many thanks to the folks who responded. Sorry for the delayed response
but we are just getting around to trying to resolve the problem. My 
original posting was for help using VDUMP to backup AdvFS filesystems
which require more than 1 tape. We have a 12 cartridge 4mm autoloader
which worked in the past for Unix filesystems under the DUMP command.
The main problem was that once VDUMP filled up a tape, it would prompt
the operator "interactively" to change to the next tape as in:

  vdump: Press RETURN when tape is mounted...
 
Summary of respondants:
From: alan@nabeth.cxo.dec.com,
      crossmd@mh.uk.sbphrd.com,
      belonis@dirac.phys.washington.edu (recommended but had not tried "expect")

  What you might try is using the "expect" program to
	- wait for the prompt
	- then issue the tape "offline" command to change to next tape.
	- response "yes" to the prompt to continue automatically.
 
From: treahy@allianceelec.com,
	Shalless@mail.dec.com

   Me-too...please summarize.
      
From: rlm@syseca-us.com

  I think the answer to your problems is the Media Robot software (QM-50TAA-SA)
  for about $300.

From: tpb@zk3.dec.com (DEC Unix software group)

  ...did a quick compare of source between the vdump and dump programs
  and I believe we could fix this. I asked the storage group to loan
  me an autoloader to help fix this. However, there are a number of things
  on everyone's plates...it would be best if you entered a formal problem
  report.

From the great responses we have done the following:

  Interim solution: Installed the "expect" program to respond to the
	VDUMP prompt while running in batch mode. For those interested,
	we included more information below.

  Longterm solution: Submitted a formal problem report with "priority
  	status" to the DEC. Extra thanks to Dr Thomas Blinn of DEC for 
	responding.

Notes on using "expect" program:

  1) Downloaded and installed
	a) expect.tar.gz (version 5.24) (http:/expect.nist.gov)
	b) tcl8.0.tar.gz -required - (used version 8.0)
		http://sunscriptsunscript.sun.com/TclTkCore/
  2) Create a script to start "expect" and the VDUMP operation. "expect"
        then waits for the prompt to continue after changing tapes and
	responds "yes". The tape autoloader will automatically eject
	the current tape and load the next. So all we had to do is to
	have the "expect" wait long enough for the tape to be changed,
	and then respond "yes". Please note that we have only tested
	this script once and have not tried to restore data yet.

     #!/local/bin/expect -f
     # (for debug mode you can change the line above to -df
     #
     set timeout -1
     spawn /sbin/vdump -0 -C -u -b 60 -f /dev/nrmt0h    /stis0
     expect {
	"vdump: Press RETURN"  {sleep 240; send "yes\n"; exp_continue}
	eof			{exit 0}
	}

     In example above, we are using VDUMP from a 20GB raid disk system
     (/stis0) to a 12 cartridge 4mm autoloader tapedrive (/dev/nrmt0h).
     The "expect" line has 2 commands. Each command is on a separate line
     and contains two parts ( (1) what to look for (2) response). For line 1,
     expects looks for the substring "vdump: Press RETURN" (you can add
     more if you'd like), and if it is found, "expect" will wait 240
     seconds (tape changing in progress), response "yes" to continue,
     and then wait for the next occurance (i.e. the next tape fills out).
     The 2ond line tells "expect" to exit at the very end. 

     It seems that the "timeout" line and "eof" lines were required but
     I do not know if there are other/better solutions. This was my first
     tcl/expect programming attempt.

     Lastly, we started the script (vbackup) from the root crontab using the 
     following command so the job starts at 11pm every Friday night:

     0 23 * * 5 /usr/local/backups/vbackup > \
	/usr/local/backups/logs/vbackup.log  2>&1

Thanks again to all who responded and I hope my summary was not too long!
Keith Feggans
(HST/STIS Project at GSFC)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-09-30  2:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-09-30  2:14 SUMMARY: Running VDUMP to multiple tapes in the background Keith Feggans

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