6

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.

kasperd
  • 29,894
  • 16
  • 72
  • 122
neilH
  • 937
  • 1
  • 6
  • 16
  • 1
    I think the chip in the cartridge has a serial number, but it is unrelated to the barcode on the tape. – kasperd Feb 13 '18 at 23:43

2 Answers2

1

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

Andreas Rogge
  • 2,670
  • 10
  • 24
0

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.