SUMMARY: Running VDUMP to multiple tapes in the background...

From: Keith Feggans <HRSFEGGANS_at_hrs.gsfc.nasa.gov>
Date: Mon, 29 Sep 1997 22:14:23 -0400

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_at_nabeth.cxo.dec.com,
      crossmd_at_mh.uk.sbphrd.com,
      belonis_at_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_at_allianceelec.com,
        Shalless_at_mail.dec.com

   Me-too...please summarize.
      
From: rlm_at_syseca-us.com

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

From: tpb_at_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)
Received on Tue Sep 30 1997 - 04:29:05 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT