It could be bad barcodes on some tapes or faulty/dirty barcode reader. I would think that if the barcode reader were at fault, it would affect random volumes and not the same volumes each time. If it is always the same volumes that have the issue, then maybe the barcodes on those tapes are bad.

You can check the barcodes with the mtx-changer script using the LIST command.

mtx-changer <changer dev> LIST

The output should be slot:barcode, such as:

1:00001
2:00002
... etc.

If there are any slots listed with a blank barcode, then there is no tape in that slot or else that slot's tape has no barcode or has a bad/unreadable barcode.

Note that the Add command doesn't write a volume label to the tape. After ensuring that the barcodes are all readable, I would probably delete those volumes you added with the Add command, manually erase those tapes, and then issue a 'label barcodes' command. A 'label barcodes' will only attempt to label any tapes it finds that do not already have labels.


On 1/22/2020 7:14 PM, John H Nyhuis wrote:
The Bacula "update slots" command fails to update the catalog for a
specific volume.  The volume is labeled correctly, and bacula can read
the label using "update slots scan"

To resolve, I had to manually add the volume to the catalog using the
"add" command.  I am still at a lose to understand why "label" failed
silently for a random number of volumes.

Can anyone give me some pointers on figuring out why label keeps
silently failing?

*update slots
Automatically selected Catalog: GACCatalog
Using Catalog "GACCatalog"
Automatically selected Storage: Scalar-i40
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
Enter autochanger drive[0]:
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3306 Issuing autochanger "slots" command.
Device "AutoChanger-Scalar-i40" has 38 slots.
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3306 Issuing autochanger "list" command.
Catalog record for Volume "000001" is up to date.
Catalog record for Volume "000002" is up to date.
Catalog record for Volume "000003" is up to date.
Catalog record for Volume "000007" is up to date.
Volume "000005" not found in catalog. Slot=5 InChanger set to zero.
Catalog record for Volume "000006" is up to date.
Catalog record for Volume "000008" is up to date.
Catalog record for Volume "000009" is up to date.
Catalog record for Volume "000010" updated to reference slot 10.
Catalog record for Volume "000011" is up to date.
Catalog record for Volume "000012" is up to date.
Catalog record for Volume "000013" is up to date.
Catalog record for Volume "000014" is up to date.
Catalog record for Volume "000015" is up to date.
Catalog record for Volume "000016" is up to date.
Catalog record for Volume "000017" is up to date.
Catalog record for Volume "000018" is up to date.
Volume "000019" not found in catalog. Slot=19 InChanger set to zero.
Volume "000020" not found in catalog. Slot=20 InChanger set to zero.
*update slot=5 scan
Automatically selected Storage: Scalar-i40
Enter autochanger drive[0]:
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3306 Issuing autochanger "slots" command.
Device "AutoChanger-Scalar-i40" has 38 slots.
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3306 Issuing autochanger "list" command.
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3304 Issuing autochanger "load slot 5, drive 0" command.
3305 Autochanger "load slot 5, drive 0", status is OK.
3001 Volume=000005 Slot=5
Volume "000005" not found in catalog. Slot=5 InChanger set to zero.
*

So the volume is present in the changer, Bacula can read the volume,
it's labeled correctly, but Bacula does not add it to the catalog.
Finally, I had to force the issue using the add command:

*add pool=lto6-pool
You probably don't want to be using this command since it
creates database records without labeling the Volumes.
You probably want to use the "label" command.
Automatically selected Storage: Scalar-i40
Enter number of Volumes to create. 0=>fixed name. Max=1000: 0
Enter Volume name: 000005
Enter slot (0 for none): 5
InChanger? yes/no: yes
1 Volumes created in pool lto6-pool
*update slot=000005
Automatically selected Storage: Scalar-i40
Enter autochanger drive[0]:
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3306 Issuing autochanger "slots" command.
Device "AutoChanger-Scalar-i40" has 38 slots.
Connecting to Storage daemon Scalar-i40 at 127.0.0.1:9103 ...
3306 Issuing autochanger "list" command.
Catalog record for Volume "000005" is up to date.

Any ideas as to why bacula looses references to inchanger volumes, and
then refuses to update them with update slots?  As you can see, I will
need to repeat the process for scratch volumes 000019 and 000020 as well.


Could it be a misalignment of the barcode reader in the changer?



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to