StoreEver Tape Storage

Re: LTO cartridge barcode/volser


LTO cartridge barcode/volser

Some of my LTO cartridges were previously used in a library and have barcode labels.

This barcode is somehow read my my LTO-4 (HP 1840) drive even if the barcode label has been removed from the cartridge.  This is reported by backup applications and by LTT.

1. How can I read this data from the cartridge in my own code?

2. Can I re-write (new value) the barcode data of a cartridge? If so, how can I achieve this?

I've googled for ages but always ended up with sites selling barcode labels. 

Thanks. Dave


Re: LTO cartridge barcode/volser

The barcode value is stored in the LTO cartridge memory which contains a number of values called "Medium Auxiliary Memory Attributes" (MAM attributes) which are accessible using SCSI commands. In particular it is in MAM attribute 0806h.

The interface to read/write MAM attributes is defined in the SPC specification which is available from: 

The SPC specification is written and maintained by the INCITS/T10 organization

The excellent sg utilities for Linux contain a command for reading MAM attributes.  I don't see a corresponding command for writing attributes but you can create one with sg_raw.

I work for HPE

Accept or Kudo

Re: LTO cartridge barcode/volser

That looks like sg_read_attr - I'll do some digging.  Thanks for the "starter for 10".   BTW the "IBM LTO SCSI Reference" manual is mighty helpful.

Thanks, Dave