#12 better move to tape file n method

open
nobody
None
5
2012-12-07
2002-02-28
Anonymous
No

The current design of the tape motion is bad for large
slow tape drives (like big travan tapes.) Also, it
needlessly puts wear on the tape and drive as it
reqinds and goes to the exact place it last was. With
my 35GB AIT drive, that's a whole bunch of incremental
backups and a whole bunch of tape passes.

I didn't dive deep into the code, but if there was a
file header in each file that was identifiable and
indicated which file number, you could just go back one
file, read the header and decide how to position the tape.

I was thinking of an external perl script that could
read and position the tape, but I don't know what to
look for on the tape that would tell from the beginning
of a file where the tape is at.

I'm using in a couple settings and it is doing
everything else I need.

thanks,
jerry

Discussion

  • Albert Fluegel
    Albert Fluegel
    2002-03-01

    Logged In: YES
    user_id=251048

    The tape file header would break the very very often
    requested feature to be able to restore directly from
    tape without the server (don't know, why people want
    this anyway). The tape driver should nonetheless know, what
    the current tape file is (mt -f ... status shows it
    sometimes). Also the mtio calls might be used. But then
    the verification what tape this really is, could not be
    done. This information would be necessary in each tape
    file header.
    I have thought about that very often, but haven't found
    a solution to bring all the demands together. Forthermore
    backward compatibility to existing backups would be broken
    quite likely, if we don't want to mess with other data
    probably present at the beginning of a tape file. This
    had to be clearly distinguished from the header.
    So the current layout will survive for quite a while.

     
  • Logged In: YES
    user_id=561348

    I would like to second the feature request Jerry made,
    though I understand that it is safe to rely on the tape
    label to identify which tape is in the drive. I am wondering
    if the following scheme wouldn't work.

    1. At the end of each backup process, put a copy of the
    tape label right after the last record of the backup.

    2. When starting a backup, read the record right before
    the current tape position.

    a) If the tape label is found there, use the
    information in it to see which tape is in the drive. The
    label in the last record should be overwritten in the
    current backup.

    b) If the tape label is not found there, rewind the
    tape to check the tape label at the beginning of the tape,
    and do what the current version of afbackup does.

    I admit that I have no idea on how afbackup actually works.
    I apologize if this idea is completely useless.

    Happy holidays,

    Shinichi