home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!olivea!charnel!rat!usc!sdd.hp.com!hpscit.sc.hp.com!scd.hp.com!hpscdm!hplextra!otter.hpl.hp.com!hpltoad!hpopd!hpcpbla!mark
- From: mark@hpcpbla.bri.hp.com (Mark Simms)
- Newsgroups: comp.sys.hp
- Subject: Re: multiple tape files on 9144
- Message-ID: <9740070@hpcpbla.bri.hp.com>
- Date: 13 Nov 92 15:09:01 GMT
- References: <JEFF.92Nov12091641@dsndata.uucp>
- Organization: HP Computer Peripherals Bristol, UK
- Lines: 49
-
- >> I have an application that needs to write multiple tape files to cs80
- >> cartridge tapes on a 9144 tape drive.
-
- It is hard to know what the best solution is without more information
- on the problem. It is possible to write a tape such as you describe
- on a 9144 tape drive, but there is little reason to do it.
-
- To write the tape would require access to the raw device file for the
- 9144. You would have to issue an ioctl(2) call to place the drive in
- immediate report mode. You would have to write each file using a
- transfer size that was a multiple of 1024 bytes except for the last
- transfer in the file that would have to be the exact number of
- remaining bytes. After each file you would have to use another
- ioctl(2) call to write a file mark.
-
- On reading back, you would read multiples of 1024 bytes in each
- transfer. The last transfer in a file would complete with less than
- the requested length and a file mark error.
-
- You cannot space to marks on a 9144, but this could be simulated by
- reading until a mark is detected. Spacing backwards in this manner
- would be exceptionally slow and would put a large amount of stress on
- both the media and the mechanism.
-
- If you really want to go down this path, have a good look at the ct(7)
- manual page and the sys/cs80.h include file. Remember that the 9144
- uses 1024 byte blocks on tape and that any write to tape will write a
- whole number of blocks. If there are too few bytes in a write to fill
- a block, the block is written with the number of bytes given. When
- read, only that number of bytes will be returned from that block. If
- a read requests fewer bytes than are in a block, the rest of the block
- is skipped and the read starts at the next block.
-
- This whole process is undocumented and unsupported. Again, I have
- doubts whether it is worth the effort. Think strongly about what you
- are doing and why. If you really need to do things this way then
- okay. I would like to know what your reasons are though.
-
- Mark Simms
-
- ----------------------------------------------------------------------
- Opinions expressed are my own and are not intended to be an official
- statement by Hewlett-Packard Company
- ----------------------------------------------------------------------
- Name: Mark Simms
- Profession: Software Engineer
- Organization: Hewlett-Packard Computer Peripherals Division
- Unix-mail: mark@hpcpbla.bri.hp.com
- ----------------------------------------------------------------------
-