Odd error from amcheck

Jason L Tibbitts III <[email protected]> Wed, 17 Apr 2019 12:15:43 -0500
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
I had a bit of downtime with my backup server (not related to Amanda)
and after getting things running again I've seen a couple of odd
problems related to labels.

Today I got the following from amcheck:

NOTE: Holding disk '/local/amanda/work': 7461020 MB disk space available, using 7460920 MB
slot 19:amcheck-device: TypeError in method 'storage_getconf', argument 1 of type 'storage_t *' at /usr/lib64/amanda/amcheck-device line 165.

That corresponds to this block of code:

                } elsif ($dev->status & $DEVICE_STATUS_VOLUME_UNLABELED and
                         $dev->volume_header and
                         $dev->volume_header->{'type'} == $Amanda::Header::F_WEIRD) {
                    my $autolabel = storage_getconf($storage, $STORAGE_AUTOLABEL);
                    if ($autolabel->{'non_amanda'}) {
                        print STDERR " contains a non-Amanda volume\n";
                    } else {
                        print STDERR " contains a non-Amanda volume; check and relabel it with 'amlabel -f'\n";
                    }

which would seem to suggest that it's finding the tape to be unlabeled.
And last night in order to get things to run, I had to relabel a tape.
But these tapes have all been previously labeled, and in fact I've been
using them for a while.  I have no idea what could cause them to become
unlabeled, besides the obvious cause of something writing to them.  But
the tape in slot 19 was just loaded and hasn't been in the drive in some
time.

If I run amtape inventory, it tells me

[...]
slot 18: label C00018 barcode C00018L6 [retention-tapes]
slot 19: blank barcode C00019L6
slot 20: label C00020 barcode C00020L6 [retention-tapes]
[...]

but... it was fine and had a label last night.  And I have a feeling
that tape C00020 will end up being unlabeled tomorrow.

Has anyone seen anything like this?  What's the magic incarnation to
read the amanda label from a tape without running amanda tools?  (I know
dd should do it but I can't seem to find the right combination of
options.)

 - J<