[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tar -r on tape
Re: tar -r on tape
Thu, 17 Jul 2003 14:46:59 +0200
On Thu, Jul 17, 2003 at 11:12:33AM +0200, Rüdiger Hees wrote:
> tar -cvf /tmp/save.tar file1
> tar -rvf /tmp/save.tar file2
> Using /dev/rmt0 instead of /tmp/save.tar the same way -tvf shows only file1.
> The tape works as if its saving (large file2). -xvf restores only file1
> I'm using AIX 4.3.3 and a HP-SureStore dds3 tape.
> Maybe You tell me if its a bug of tar or of mine.
it's a bug of tar or of the tape device. The question is whether the
tape is able to rewind a few bytes back or not.
Here is a quote from the tar manual explaining the problem:
--zz-Info: (tar.info.gz)Remote Tape Server:
In order to update an archive, `tar' must be able to backspace the
archive in order to reread or rewrite a record that was just read (or
written). This is currently possible only on two kinds of files: normal
disk files (or any other file that can be backspaced with `lseek'), and
industry-standard 9-track magnetic tape (or any other kind of tape that
can be backspaced with the `MTIOCTOP' `ioctl'.
This means that the `--append' (`-r'), `--update' (`-u'),
`--concatenate' (`--catenate', `-A'), and `--delete' commands will not
work on any other kind of file. Some media simply cannot be
backspaced, which means these commands and options will never be able
to work on them. These non-backspacing media include pipes and
cartridge tape drives.
Some other media can be backspaced, and `tar' will work on them once
`tar' is modified to do so.
--zz-Info: (tar.info.gz)Remote Tape Server--
I personally don't know whether HP-SureStore dds3 could rewind.
Perhaps someone else on this bug-report list will tell you.
Or you decide to investigate yourself. If you succeed and fix the bug
in tar (or get positive information that it is not possible), please
let us know.
That's all I can tell. Have a nice day,