home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!decwrl!access.usask.ca!kakwa.ucs.ualberta.ca!news
- From: sherwood@fenris.space.ualberta.ca (Sherwood Botsford)
- Subject: Re: multiple dumps on EXB-8200 8mm tape
- Message-ID: <1992Jul24.181553.10455@kakwa.ucs.ualberta.ca>
- Sender: news@kakwa.ucs.ualberta.ca
- Nntp-Posting-Host: fenris.space.ualberta.ca
- Organization: University Of Alberta, Edmonton Canada
- References: <1992Jul23.141833.14606@ferrari.nmc.ed.ray.com>
- Distribution: usa
- Date: Fri, 24 Jul 1992 18:15:53 GMT
- Lines: 66
-
- Bill Heiser writes
- >
- > The problem I have is that when I write a tapefile to the non-rewinding
- > device, and then write another file, when I try to read the files I seem
- > to have to skip filemarks sometimes. For example: If I write a tape on
- > a SunOS 4.1.1_U1 or 4.0.3 system, I have a tape with several tapefiles.
- > If I try to read the tape by doing several consecutive 'restore' commands
- > on the non-rewinding device, the restores after the first one fail -- unless
- > I do a restore, then a "mt -f fsf 1". So basically I seem to be getting
- > extra file marks!
-
- This one threw me for a loop initially.
- The file mark is not (usually) explicitly written by the program, but is
- written by the computer on closing the file. It will aslo be done by the tape
- if the previous command was write data, and the the current command is any tape
- movement command.
-
- Now, a filemark on either exabyte or DAT drives has a front and back side.
- Front being on the Beginning of Tape side.
-
- Any command that writes to the tape, finishes with a write filemark, and
- leaves the head on the back side of the mark, ready to write the next file.
-
- Any command that reads the tape leaves the tape positioned on the BOT side of
- the file mark.
-
- mt fsf's and bsf's behave this way too. A bsf leaves the tape on the front
- edge of the filemakr, and an fsf leaves it on the back.
-
- So if you kill an operation, and want to reposition the tape to start it again,
- you must do this:
- mt bsf 1
- mt fsf 1
-
-
- In terms of your problem with the other machine, it may automatically put an
- fsf after a read finishes.
-
- I do modify my scripts behaviour for different machines with an environment
- variable. Since they are different drivers, I use that.
-
- e.g.
- #!/usr/local/bin/perl
- ..
- $TAPE = $ENV{TAPE};
- if ("$TAPE" eq ""); { # No device defined.
- print "TAPE is not defined in your environment.\n";
- &Finish
- }
- if ("$TAPE" eq "/dev/nrxt0"); { &ExabyteSetup; }
- if ("$TAPE" eq "/dev/nrst0"); { &HPDatSetup;}
- print "\tUsing tape device $TAPE \n";
-
-
- Then in the various setup you can define a command string that is null for the
- machine that doesn't need it, and does an mt fsf 1 for the machine that does
- need it.
-
- You could also do this by host name, host type, etc.
-
- Hope this helps.
-
- ---
- => Sherwood Botsford sherwood@space.ualberta.ca <=
- => University of Alberta Lab Manager, Space Physics Group <=
- => tel:403 492-3713 fax: 403 492-4256 <=
-