Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 6/7/83; site hao.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!woods From: woods@hao.UUCP (Greg Woods) Newsgroups: net.unix,net.unix-wizards Subject: Re: Alex Whites solution to end of tape recognition in UNIX Message-ID: <873@hao.UUCP> Date: Wed, 7-Mar-84 14:31:20 EST Article-I.D.: hao.873 Posted: Wed Mar 7 14:31:20 1984 Date-Received: Fri, 9-Mar-84 01:01:30 EST References: <490@abnjh.UUCP> Organization: High Altitude Obs./NCAR, Boulder CO Lines: 21 Regarding keeping exclusive access to a tape drive: we have a program here that does it. It runs as three commands: "all", "deall" and "ft". The "all" command first checks to make sure no one else has allocated the drive, and if not, it chowns all the /dev/mt and /dev/rmt files pertaining to that drive to you, and makes them mode 600 (then no one else can read or write on that drive). "deall" chowns them back to root and makes them mode 000 (so that no one can read or write an unallocated drive). The "ft" command (for Free Tape) was added later because of course some users forget to deallocate. "ft" first checks to see if there are any free drives, and if so, it informs you immediately. If not, it checks to see if any of the allocated drives have not been read or written in the last 15 minutes, and if so, deallocates it and informs you of the now-free drive. This system has been running here since before I came here (over 3 years) and we have never had a problem with it (except for the crappy old DEC tape drives always breaking! :-) GREG -- {ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax} !hao!woods