home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / sysadmin / 4444 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.8 KB  |  59 lines

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!haven.umd.edu!ni.umd.edu!sayshell.umd.edu!louie
  3. From: louie@sayshell.umd.edu (Louis A. Mamakos)
  4. Subject: Re: WangDAT: How to fseek() ?
  5. Message-ID: <1992Jul29.233415.26017@ni.umd.edu>
  6. Keywords: cron
  7. Sender: usenet@ni.umd.edu (USENET News System)
  8. Nntp-Posting-Host: sayshell.umd.edu
  9. Organization: University of Maryland College Park
  10. References: <nq9sp2o@zuni.esd.sgi.com> <1992Jul28.215226.9960@ni.umd.edu> <1992Jul29.112201.9064@mic.ucla.edu>
  11. Date: Wed, 29 Jul 1992 23:34:15 GMT
  12. Lines: 45
  13.  
  14. In article <1992Jul29.112201.9064@mic.ucla.edu> iwelch@agsm.ucla.edu (Ivo Welch) writes:
  15. >
  16. >> There is no "built-in" support for random seeking to blocks on DAT
  17. >> tape media, but it is not too difficult to issue "raw" SCSI commands
  18. >> to the tape driver with the appropriate commands to perform the
  19. >> seeking.  
  20. >
  21. >Yes, but the question remains: WHAT ARE THE COMMANDS TO DO SO FOR WANGDATS?
  22.  
  23. Well, I don't know what they are on a WangDAT drive; the code that I
  24. wrote for an Archive Python uses the SCSI-2 standard positioning
  25. commands for sequential access devices.  The specific commands are
  26. LOCATE (0x2B) and READ POSITION (0x34).  You use the MTIOCSRQ ioctl to
  27. issue raw SCSI commands to the tape device that you have open.
  28.  
  29. >(I got 4 messages asking me to forward any responses; unfortunately I have not
  30. >received any). Again, has anybody written C functions that can substitute for
  31. >fseek() and ftell() (probably over the whole tape, rather than a file, which
  32. >would be just fine).
  33.  
  34. Well, you can't write direct substitutes for fseek() and ftell() which
  35. return file positions which on the NeXT (and most UNIX platforms) are
  36. byte offsets.  The code that I wrote treats the 4 byte quantities
  37. returned by LOCATE as opaque values; it turns out that they (on the
  38. Archive Python, at least) number tape blocks, including file marks.
  39. That's why I mentioned that you need someway to construct a database
  40. or index of these values, preferably while you are writing the tape.
  41.  
  42. >I can no longer get a hold of the author of Safteynet, nor will Safetynet do
  43. >what I need: maintaining data-bases to be read by programs. I do not primarily
  44. >want to increase dump/tar/etc speed!!
  45.  
  46. You can try <brian@Systemix.COM> to get further information about the
  47. SafetyNet program.  Alternatively, you can get get the OEM or
  48. programmer's manual for the WangDAT drive and/or a SCSI-2 speci and
  49. combine that with 'man 4 st' and 'man 4 sg' to hack up some code to do
  50. what you'd like.
  51.  
  52. As I mentioned, I don't know for certain if the WangDAT uses LOCATE
  53. and READ POSITION commands or some vendor specific commands.  The
  54. Archive Python, for instance, provide the SCSI-2 LOCATE/READ POSITION
  55. as well as some vendor specific commands that do much the same sort of
  56. thing, but the tape positions are encoded differently.
  57.  
  58. louie
  59.