I have some Fujifilm LTO-6 tapes which come labelled with tape numbers. I'm writing a script and I would like to assign a variable from the tape number. Is this information stored anywhere on the tape? If it's not I'll just have to create a variable from an input prompt, but if it is it would be much better.
2 Answers
Every LTO cartridge has a so called MAM-chip (media auxiliary memory). This chip contains a lot of information like the manufacturer, manufacturing date, serial number etc.
There is also a field "barcode". When you use an autoloader that read the barcode and it inserts the tape into a drive it will then update this field.
When you ordered prelabeled tapes, it really depends. If they're factory made you might be lucky and the information in MAM is already set.
You can read the mam chip data using SCSI commands. There is a rudiementary software that can do this on linux: http://github.com/arogge/maminfo
- 2,670
- 10
- 24
As Andreas has already suggested, you can READ barcode attribute in MAM by maminfo
. However, this software can not write data to that field.
This Linux software can WRITE an arbitrary barcode sequence to that field, depending on your needs. This software is useful for users who ordered non pre-labeled products, and printing barcode by themselves. It is also helpful for users who ordered pre-labeled but there is no pre-written sequence in MAM.
Just as an example, if your barcode sequence is LTO012L6
then load the cartridge into the drive and invoke:
$ sudo lto-cm -f /dev/sg3 -w 2054 -m LTO012L6
NOTE that /dev/sg3
depends on your environment, but it means SCSI device path to your drive. -w 2054
option means write data to the Barcode field (the address of the field is 0x0806h
= 2054 in decimal). -m LTO012L6
option specifies barcode sequence which you need to write.
Also, you can verify the written sequence with the same program:
$ sudo lto-cm -f /dev/sg3 -r 2054
The options are the same idea as that of write
command above, but -r 2054
option means reading data from the Barcode filed in MAM.
- 81
- 4
-
1What software is that? Did you have something to do with creating it? – Michael Hampton Aug 13 '20 at 18:43
-
No problem, it's just that the site policy requires [disclosure](/help/promotion) if you're recommending your own product or solution, even if it's free and/or open source. – Michael Hampton Aug 14 '20 at 00:43