Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site sal.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!enea!sal!jf From: jf@sal.UUCP (Johan Finnved) Newsgroups: net.unix Subject: Is anybody *USING* ANSI tapes on UNIX (label handling) Message-ID: <504@sal.UUCP> Date: Thu, 11-Apr-85 02:17:14 EST Article-I.D.: sal.504 Posted: Thu Apr 11 02:17:14 1985 Date-Received: Tue, 9-Apr-85 01:07:34 EST Reply-To: jf@sal.UUCP (Johan Finnved) Organization: Objecta, Taby, Sweden Lines: 45 There has been some talk on the net about protecting people from writing on wrong tapes. So far it has been assumed the nobody mounts the wrong tape on a tape drive which is not always correct. There has also been a package for reading and writing ANSI-tape recently but without multiple volume handling and without enforcement of protection. I think that an implementation of the ANSI standard for Tape Labels and File Structure for Information Interchange (X3.27-1978) would solve several problems. Most notably positive tape identification and continuation of big files on multiple volumes (without having applications to limit their output). I think that this could also solve the problem of two users accidently using the same tape drive. Possible implementation suggestions: The driver is helped by a tape managing program which handles labels and blocks-unblocks data. Data is moved between tapes and files or pipes. The raw device is not accessible by ordinary users. The driver allows only one open at a time, and the server does only one open and thus knows that nobody can interfere with its tapehandling. It starts by rewinding the tape and checking its volume label in order to make sure that this user (real uid) has really the right to use this tape. There has to be IOCTL:s for tape positioning, rewinding ,writing of tapemarks and for forcing writes after EOT. I think it is most efficient to allow reads until a few blocks after EOT and writes up to EOT and then let the first after EOT has been seen return an error (or zero count) and then have an ioctl that allows you to write a few blocks more to make the volume finish correctly. The tape managing program is set-uid "tape". Has anybody assigned IOCTL subfunctions for the above magtape commands ? Does anybody have ideas on what to put in the fields for Owner Identifier (in VOL1 lables), Accessibility (In VOL1 and HDR1-EOV1-EOF1 labels) and System Code (in HDR1-EOV1-EOF1 labels) ? Maybe somebody has already assigned codes in some other system? (VMS?) Unfortunately the fields seems to be too short for domain type identifiers (site.subdomain.subdomain.DOMAIN) Johan Finnved, Objecta, Sweden