home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / sun / misc / 4155 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  3.0 KB

  1. Xref: sparky comp.sys.sun.misc:4155 comp.sys.sun.hardware:4309 comp.unix.solaris:209
  2. Path: sparky!uunet!sun-barr!ames!think.com!eplunix!das
  3. From: das@eplunix.UUCP (David Steffens)
  4. Newsgroups: comp.sys.sun.misc,comp.sys.sun.hardware,comp.unix.solaris
  5. Subject: Re: Adding to a TAR tape
  6. Message-ID: <1269@eplunix.UUCP>
  7. Date: 9 Sep 92 21:14:28 GMT
  8. References: <1992Sep8.154726.18675@utdallas.edu> <1992Sep8.211434.6509@zia.aoc.nrao.edu> <1992Sep9.083842.19758@onionsnatcorp.ox.ac.uk>
  9. Organization: Eaton-Peabody Lab, Boston, MA
  10. Lines: 44
  11.  
  12. In article <1992Sep8.154726.18675@utdallas.edu>,
  13. karches@utdallas.edu (Tom Karches) writes:
  14. > Adding files to existing tar files is only possible on a 9 track tape
  15. > drive. The reason is that other tape drives can not accurately position
  16. > the write head to the exact spot on the tape where the additional files
  17. > would be appended.
  18.  
  19. In article <1992Sep8.211434.6509@zia.aoc.nrao.edu>,
  20. rmilner@zia.aoc.nrao.edu (Ruth Milner) writes:
  21. > ... Exabytes using long filemarks (which Suns do by default... )
  22. > are able to position between double EOFs to append another file.
  23. > If it can position at the beginning of the second EOF, isn't this
  24. > accurate enough to position at the beginning of the first EOF?
  25.  
  26. You have confused writing another file onto the logical end of a tape
  27. with appending another file to an existing tar archive.  The former simply
  28. requires positioning between the two file marks that indicate logical
  29. end-of-tape and writing over the second one with the new tape file.
  30. The latter is more complicated as it requires _updating_ the last record
  31. of the tar archive itself in order to remove the logical end-of-archive
  32. that tar has written while preserving whatever data may be present.
  33. This process requires reading to logical end-of-archive, backspacing
  34. one record, and rewriting said record with an updated version containing
  35. the data from the old record plus the data from the head of the new file.
  36.  
  37. In article <1992Sep9.083842.19758@onionsnatcorp.ox.ac.uk>,
  38. dominic@natcorp.ox.ac.uk (Dominic Dunlop) writes:
  39. > ...  There are two (512 byte) blocks full of nulls at
  40. > the end of a tar archive, indicating end-of-archive.  (See also
  41. > tar(5).)  If you want to extend the archive, you've got to update the
  42. > contents of those two blocks.  Only block-structured devices (/dev/mt8
  43. > and so on) are capable of doing updates in place...
  44.  
  45. Close, but not quite, since tar always uses the raw tape device not the
  46. block tape device.  The tape driver and transport hardware must support
  47. the magtape ioctl's that allow backspacing and rewriting the last record.
  48. The old 1/4" cartridge tapes did not support this interface and so were
  49. unable to update a tar archive in place.  Newer drives should be able to,
  50. but perhaps the software has not been updated to reflect this change.
  51. -- 
  52. David Allan Steffens       | I believe in learning from past mistakes...
  53. Eaton-Peabody Laboratory   | but why does a good education require so many?
  54. Mass. Eye & Ear Infirmary, 243 Charles Street, Boston, MA 02114
  55. {harvard,mit-eddie}!eplunix!das    Tel (617) 573-3748    Fax (617) 720-4408
  56.