bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tar and tape changers


From: Paul Eggert
Subject: Re: tar and tape changers
Date: Sun, 11 Mar 2001 12:03:08 -0800 (PST)

> Date: Sun, 11 Mar 2001 03:39:29 -0500 (EST)
> From: Tavis Barr <address@hidden>
>
> I am insterested in adding a couple of options to tar so that it works
> better with tape changers.  Right now, it can be done using --info-script
> = [some shell script that calls the tape changer], however I see two
> shortcomings of using a tape changer this way:
> 
> (1) It's hackish and gangly: the script has to keep track
> of what tape number it's on, which means it in turn has to store these
> numbers somewhere in a temporary file that it can source and then
> overwrite each time.  For each archive I want to create, I have to create
> separate info script, which in turn has to create a separate file to store
> its variables.

Yes, that's a problem.

> (2) If we're out of new tapes to write to, the call to tar really should
> fail.  Right now, tar just runs the script and continues about its
> business.  While I can cause tar to exit by leaving the loader unloaded
> (giving me a device not ready error), it seems like bad form to exit with
> the wrong error.

Tar should check the exit status of the script.  I'll fix that in the
next version.

> (3) It can't pre-load a tape.  Of course this can also be done by calling
> a script before executing tar, it would just be nice to have it all part
> of the same command.

What is the difference between preloading and loading?  In other
words, why not have tar load the tape as soon as it can?

> What I'd like to do is add the following command line options (or
> something similar) for multi-volume archives:
> 
> --pre-load
> --tape-unload-program=[file]
> --tape-load-program=[file]
> --tape list=[comma-or-dash-separated-list-of-tapes]
> --sleep-on-load=[number of seconds]

I like the general idea, but have some suggestions:

* I don't yet see why --pre-load is needed.

* I don't see why --sleep-on-load is needed.
  The --tape-load-program can sleep if needed.

* We shouldn't need a --tape-list option.  Just let the user specify
  multiple -f options, as is already done with GNU tar.

* I'd rather not use "tape" in the option name, as the devices might
  not be tape devices.

So, how about the following suggestion instead.  Add two new options:

--pre-archive=COMMAND
  Run "COMMAND ARCHIVE" just before opening ARCHIVE.

--post-archive=COMMAND
  Run "COMMAND ARCHIVE" just after closing ARCHIVE.


> If there is a mailing list (or another person/address) I should
> write to instead, please let me know.

The only mailing list is address@hidden; I'll CC: this message to that
mailing list.


> [One thing I don't know about this format is how well-suited it is to
> fibre channel tape libraries, since I know nothing about how they are
> handled under linux, or if the code to handle them even exists at all.]

Likewise.  But we can worry about them later.


> My question is this: If I code this up, would you be willing to add it to
> the standard tar program?

Sure!  Volunteers are always welcome.  We'd need the usual copyright
assignments (contact me if you don't know about those).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]