[1298] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: SCSI tape control - and some other bits

daemon@ATHENA.MIT.EDU (Hartmut Niemann)
Thu Jan 23 13:12:17 1997

From: Hartmut Niemann <niemann@cip.e-technik.uni-erlangen.de>
To: andy@realbig.com (Andy Poling)
Date: 	Thu, 23 Jan 1997 13:43:53 +0100 (MEZ)
Cc: linux-scsi@vger.rutgers.edu (Linux SCSI)
In-Reply-To: <Pine.LNX.3.91.970123024507.2435K-100000@ws.realbig.com> from "Andy Poling" at Jan 23, 97 02:55:45 am

> On Wed, 22 Jan 1997, Matt Swanson wrote:
> [...]
> > 3) Last (but I'm sure not least) I have familiarised myself with the
> > tar and mt commands but cannot get my tape unit to append to an
> > existing tar file on the tape. Considering the TR4 is 4gb native and
> > 8bg compressed (2:1 ha ha) it seems a waste of tape if I can't append.
> > I have started writing my own backup/restore scripts but have become
> > stumped with the SCSI tape control required for this operation. 
> 
> Welcome to UNIX (er, Linux too) tape hell.
> 
> AFAIK you cannot append to a tape file.  The driver insists on writing a
> tape mark when you close the device, and if you manage to get the tape
> positioned before the tape mark before writing (hint: mt bsf) I'm pretty
> sure that a tape mark will still somehow get between the old data and the
> new data.
> 
> idea anyhow.  In trying to append to an existent tape file, you risk
> damaging it, or confusing whatever tries to read it later.  You're better
> off putting your additional tar output in the next tape file and just
> reading it after the first one when the time comes to read.
Isn't that what the original poster wants?
I.e. having one tape file with 400 MB, then anything to make the tape
write a second file after the first one instead of starting at
the beginning?
This is possible (maybe man mt gives enough info???), but I don't know
how.
I would call appending directly to a tar file - at least - risky.
But writing after the first archive's end mark should work.
> 
> > I am
> > using /dev/nst0 so the tape should not rewind.
> 
> That's true, but it did write a tape mark when you closed the device, so
> you'll now start writing the next tape file.
Wasn't it

- move forward <n> archives with   mt -f /dev/nst0 fsf <n>
- and start writing/reading?       tar ....

> 
> -Andy
> 
> Global Auctions
> 
> 
+--+
!cu!
+--+  Hartmut

--
Hartmut Niemann
niemann@cip.e-technik.uni-erlangen.de
Zum Aussichtsturm 18  D-91080 Marloffstein

home help back first fref pref prev next nref lref last post