Alex Whites solution to end of tape recognition in UNIX

Greg Woods woods at hao.UUCP
Thu Mar 8 05:31:20 AEST 1984


   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



More information about the Comp.unix mailing list