Re: lexical.pm last_use_label ignores "storage" field on tapelist
Nathan Stratton Treadway <[email protected]> Mon, 12 Mar 2018 08:38:49 -0400
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Mar 11, 2018 at 19:58:07 -0400, Nathan Stratton Treadway wrote:
> I have two storages defined in my test environment, "TestBackup" with
> tables labeled TESTBACKUP-01 through TESTBACKUP-21 and "TestOffsite" with
> tapes labeled TESTBACKUP-101 through TESTBACKUP-109.
>
> I'm using the lexical taper scan algorithm (for both storages), and the
> TestBackup storage is a vtape array constantly left mounted (so all 21
> vtapes are always available).
>
> I noticed that when left to its own devices (for the "TestBackup"
> storage), Amanda seemed to jump right to tape TESTBACKUP-11 as soon as
> it was available for use (i.e. once it rolled out of the Tapecycle
> count).
>
> In attempting to track this down within at lexical.pm, I see that that
> the last_use_label() function ignores the storage parameter when
> searching the tapelist -- which means that in my case $last_label is
> always set to "TESTBACKUP-10x", and thus when the TestBackup tables are
> sorted lexically compared to that, TESTBACKUP-11 always comes up "next".
Looking back at my Amanda mail reports, I see that this cross-storage
label issue also explains why amdump frequently skips over
TESTBACKUP-109 and jumps to TESTBACKUP-101, even though "amcheck ...
-ostorage=TestOffsite" run right beforehand says the next run will write
to 109:
* when amcheck is run, TESTBACKUP-108 is the most recent tape in the
tapelist file, and the lexical taperscan correctly picks 109 as
the next tape "after" the current one.
* when amdump runs, it write to TESTBACKUP-03 (or TESTBACKUP-20 or
whatever), thus making that the most recent entry in the tapelist
file. Then when it starts up the the vault-storage phase, all of
the TESTBACKUP-10x tape labels sort either before or after that new
"last used" label, and TESTBACKUP-101 is chosen from the front of
the resulting list.
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239