[comp.sys.att] Accessing the ctc on a 3B2/400 from a program ?

storm@ambush.UUCP (Kim F. Storm) (05/02/88)

We have to port a program to backup large files (and disks) on the
23 Mbyte cartridge tape on the 3b2/400.

There is no problems in moving the code (isn't C+UNIX wonderful),
but we cannot get any good performance out of the tape drive, because
we cannot make it stream.

We have no information about the programming of this beast, so we are
left with guessing from what we can find in sys/ct.h which is not
much.  It seems that some combination of open flags and ioctls is
needed, using the following defines:

	#define O_CTSPECIAL	0200

	#define	STREAMON	's'

Most attempts have resulted in the following error:

	ENOTOPN  (205)	sub-device not open 

(Which "sub-device" ?)


We are completely stuck, so if you know how it is node, please let us
know.  Any help will be received with gratitude.

--
Kim F. Storm, storm@ambush.dk (or ..!mcvax!diku!ambush!storm)
AmbraSoft A/S, Rojelskaer 15, DK-2840 Holte, Denmark.  tel: +45 2424 111

		No news is good news, but nn is better!

les@chinet.UUCP (Leslie Mikesell) (05/08/88)

In article <744@ambush.UUCP> storm@ambush.UUCP (Kim F. Storm) writes:
>
>We have to port a program to backup large files (and disks) on the
>23 Mbyte cartridge tape on the 3b2/400.
>
>There is no problems in moving the code (isn't C+UNIX wonderful),
>but we cannot get any good performance out of the tape drive, because
>we cannot make it stream.
>
The "afio" program posted a while back included support for the 3B2
streaming tape by doing the following:

  the flags to open() are  O_RDWR | O_CTSPECIAL

  after the open, ioctl(fd,STREAMON) is used to enable streaming

  streaming mode writes (and reads) must multiples of a certain size.
  Afio uses 31 * 512, and limits the total output to 1469 such blocks instead
  of watching for EOT from the device.

  Les Mikesell

eric@magic4.UUCP (Eric Kozowski) (05/10/88)

In article <744@ambush.UUCP>, storm@ambush.UUCP (Kim F. Storm) writes:
> 
> We have to port a program to backup large files (and disks) on the
> 23 Mbyte cartridge tape on the 3b2/400.
> 
> There is no problems in moving the code (isn't C+UNIX wonderful),
> but we cannot get any good performance out of the tape drive, because
> we cannot make it stream.

Try using the ctccpio command, and/or the savecpio command with the -C ctccpio
option.  If you need more info send me e-mail.


-- 
Eric Kozowski  AT&T GBS  Portland, Or        || ... I have become 
(503)295-4250  2020 SW 4th  Suite 500 97201  || comfortably numb ...
UUCP: ...!tektronix!tessi!bucket!magic4!eric || 
All of the above opinions are mine           || -- Pink Floyd