Re: lexical.pm last_use_label ignores "storage" field on tapelist
Jean-Louis Martineau <[email protected]> Mon, 12 Mar 2018 14:53:08 +0000
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <CY4PR06MB339868D229052B837A60B381C8D30@CY4PR06MB3398.namprd06.prod.outlook.com> |
Both storage must use a different pool ________________________________________ From: Jean-Louis Martineau Sent: March 12, 2018 10:49 AM To: Nathan Stratton Treadway; [email protected] Subject: Re: lexical.pm last_use_label ignores "storage" field on tapelist Nathan, try this patch. Jean-Louis ________________________________________ From: [email protected] <[email protected]> on behalf of Nathan Stratton Treadway <[email protected]> Sent: March 12, 2018 8:38 AM To: [email protected] Subject: Re: lexical.pm last_use_label ignores "storage" field on tapelist 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<http://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/<http://www.ontko.com/> GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt<http://www.ontko.com/~nathanst/gpg_key.txt> ID: 1023D/ECFB6239 Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239 This message is the property of CARBONITE, INC. and may contain confidential or privileged information. If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone. Instead, destroy it and notify me by reply e-mail