home *** CD-ROM | disk | FTP | other *** search
-
- TAPE-HANDLER
-
- By Matthew Dillon
-
- This distribution contains a SCSI TAPE handler (uses SCSI-DIRECT).
-
-
- (I) STARTING UP THE HANDLER
-
- This handler must NOT be mounted. To start the handler, run it in the
- background. For example, if your tape drive is on "scsi.device" unit 4
- and you wanted to call it TAPE: then you would say:
-
- run <nil: >nil: l:tape-handler TAPE -Dscsi.device -U4
-
- Note that the handler defaults to 'scsi.device' so you really only
- need to specify the unit number if that is indeed your scsi device:
-
- run <nil: >nil: l:tape-handler TAPE -U4
-
- (II) READING AND WRITING THE TAPE
-
- Being a handler you may read and write the tape through standard DOS
- redirection or via an archive program such as Tar, or you can use Copy.
- You should beware that, when not using an archiver, any files copied to
- tape will be zero padded to the tape's sector size which is normally
- 512 bytes.
-
- The notation for accessing the TAPE: device works as follows. You may
- specify almost any combination of flags and an optional buffer size
- (256K is used if none specified). There are NO spaces in the
- specification.
-
- TAPE:<flags><buffer_size>
-
- r - rewind tape before accessing
- a - append to tape
- e - short erase (may not be supported on tape drive)
- E - FULL erase (should be supported on all tape drives)
-
- The following example will copy a huge lharc file to the beginning of
- the tape using a 1MB ram buffer. A rewind before writing effectively
- erases the tape. Note that I do not specify the 'r'ewind flag for
- remaining operations.
-
- 1> copy huge1.lzh tape:r1024 ; write to tape
- 1> copy huge2.lzh tape:1024
- 1> copy huge3.lzh tape:1024
-
- 1> copy tape:r1024 huge1.lzh ; read back from tape
- 1> copy tape:1024 huge2.lzh
- 1> copy tape:1024 huge3.lzh
-
- If you do not specify rewind or append then tape operations begin at
- the tape's current position.
-
- (III) APPENDING TO THE TAPE
-
- The tape-handler implements an append flag that allows you to position
- the tape head to the end of currently existing data before beginning a
- write. In order to get around the brain-dead Commodore tape drive I've
- implemented Append mode by fully rewinding the tape and the skipping
- filemarks until I get a BLANK status. This should work on all known
- tape drives.
-
- To append to a tape the tape should already contain some data. Note
- that you only have to specify the 'a' flag the first time. After that,
- the tape head will be positioned properly (unless you rewind it or
- something).
-
- 1> copy huge4.lzh tape:a1024
- 1> copy huge5.lzh tape:1024
-
- (IV) Manual Tape Operations
-
- You can run manual tape operations by simply openning TAPE: with the
- appropriate flags and closing it again without reading or writing
- data. For example:
-
- 1> echo >tape:r1 rewind the tape
- 1> echo >tape:a1 position tape at end
- 1> echo >tape:E1 erase entire tape
-
- (V) GnuTar
-
- GnuTar is included in this distribution and is an excellent program for
- making backups and tape archives. Note that I am specifying the 'r'
- flag and a 1MB buffer in my examples. You will not necessarily wish to
- do this depending on whether you are creating a new tape, appending to
- a tape, etc...
-
- (a) archive a directory to tape
-
- 1> gnutar cvf tape:r1024 directory1 directory2 ... directoryN
-
- (b) check a directory against a tape archive
-
- 1> gnutar +verbose +diff +file tape:r1024 directory1 directory2 ...
-
- (c) extract a directory from the tape (note, will overwrite directory
- if it already exists)
-
- 1> gnutar xvf tape:r1024
-
- There are many other options to GnuTar. Note that the compress options
- are not available at this time. I do not have a manual page for GnuTar
- but typing 'gnutar +help' should give you enough information at least
- for basic features.
-
- (VI) FEATURES OF TAPE-HANDLER
-
- My tape-handler implements fully asynchronous double-buffered read and
- write operations. If you have disk/tape drives which support
- reselection then the handler will be able to operate on the tape
- concurrently with disk accesses meaning that an archiver such as
- Tar will not 'freeze' while tape operations are in progress.
-
- To take the greatest advantage of this feature you should specify as
- large a buffer as possible. Anywhere from 500K to 2MB will yield
- reasonable throughput.
-
-
-
-