• 1 reply
  • Latest Post - ‏2012-11-22T16:50:03Z by SystemAdmin
4779 Posts

Pinned topic LTO Cartridge Memory Read Write

‏2012-11-05T13:32:34Z |
I'm reposting in the right section ... :

Hi everybody,

We currently use an IBM ULTRIUM-TD4 tape drive for data storage.

SCSI ref. guide specifies we can read/write data on a portion of this kindof rfid chip, called "Host Attribute".
Specifically, I'd like to update the 160bytes "User Medium Text Label" for database purposes.

I've searched the internet and can't find any software/tool dedicated to this purpose -neither does IBM's "ITDT"-

So my questions are :

Is it a good idea to use that MAM chip, if so why is there no tool available ?
Will I have to do SCSI IOCTL's programming ?

Updated on 2012-11-22T16:50:03Z at 2012-11-22T16:50:03Z by SystemAdmin
  • SystemAdmin
    4779 Posts

    Re: LTO Cartridge Memory Read Write

    Please only continue to read if you're really knowing what you're doing ;-) as you'll need to read and understand the SCSI Reference to continue...

    ITDT versions 6.1 and later have undocumented (as not officially tested) commands readattr and writeattr to read from and write to the MAM.
    Syntax is the following:

    itdt -f <device> readattr -p <partition> -a <attribute> -d <filename> itdt -f <device> writeattr -p <partition> -a <attribute> -s <filename>

    where for writeattr <filename> needs to be a binary file containing the MAM attribute data:
    2 bytes attribute identifier, 1 byte read only/format, 2 bytes attribute length, then the attribute data.
    <attribute> is specified in Hex.
    <device> should be a generic device file (Host/Bus/ID/Lun addressing)
    <partition> is only effective for LTO-5 and later, but needs to be specified as zero for LTO-4 as well.

    Example to write the User Medium Text Label:

    itdt -f 3 0 1 0 writeattr -p 0 -a 803 -s 165.bytes

    where the first 5 bytes of the file 165.bytes need to be the following:
    08 03 02 00 a0
    (attribute 0803, read/write in TEXT format, data length 160 bytes) followed by the 160 bytes text to write.

    Note that the readattr command always writes a binary file as specified in -d <filename> starting with the same first 5 payload bytes followed by the attribute data.