PDA

View Full Version : problem with chg-disk and slot numbers greater 9



ghosts
September 13th, 2010, 07:28 AM
Hi,

i hope i'm in the correct place her for this, i couldn't find any other place to send a patch ... :(

we have an problem with chg-disk and slot numbers greater 9
if we have 10 or more slots as virtual tapes, in our case 18, slot1 wouldn't be loaded.

The problem seems in the Amanda::Changer::disk.pm, in the _get_next function in the line:
# Otherwise, search through all slots
my @all_slots = $self->_all_slots();
my $prev = $all_slots[-1];
for $next_slot (@all_slots) {
return $next_slot if ($prev == $slot);
$prev = $next_slot;
}

after the function _all_slots deliveres an lexical sorted list of list, not numerical, the the number 18 would be before 2 and not 1 :(

to fix this short we had patched the function _all_slots to give back an numerical sorted list, so the behavior would be right.

i add an patch against the 3.1.2 source code

dustin
September 19th, 2010, 07:49 AM
Thanks! I've committed the patch in r3419.

Generally the best place for patches is on the amanda-users or amanda-hackers mailing lists - http://amanda.org/support/mailinglists.php.

Please let us know of any other fixes or improvements you might have!

ghosts
September 20th, 2010, 02:04 AM
thx for the commit and the information, i will keep the mailing lists in mind :)

this was the only fix we needed by now :)

zbackup
September 20th, 2010, 09:45 PM
Great. Please do post details about your configuration, storage device(s) used, observed performance etc. These details are very useful for other Amanda users.

Thanks