I have put patches to camcontrol(8) to implement the attrib subcommand

FreeBSD/head as of SVN revision 283160:


FreeBSD stable/10 as of SVN revision 283161:


The patches also add libcam support for handling SCSI READ ATTRIBUTE data,
and adds a new sbuf_hexdump(3)/(9) routine.

The SCSI READ ATTRIBUTE command is used to read Medium Auxiliary Memory on
SCSI devices.  This is usually found in the small (4KB-16KB) flash chips on
LTO and other similar tapes.

I have not yet implemented attribute writing support.

Here is an abbreviated example of the output:

[root@black-pearl ~]# camcontrol attrib sa0 -r attr_val
Remaining Capacity in Partition (0x0000)[8](RO): 35048 MB
Maximum Capacity in Partition (0x0001)[8](RO): 35060 MB
TapeAlert Flags (0x0002)[8](RO): 0x0
Load Count (0x0003)[8](RO): 29
MAM Space Remaining (0x0004)[8](RO): 2321 bytes
Assigning Organization (0x0005)[8](RO): LTO-CVE
Format Density Code (0x0006)[1](RO): 0x5a
Initialization Count (0x0007)[2](RO): 20
Volume Change Reference (0x0009)[4](RO): 0x47
Device Vendor/Serial at Last Load (0x020a)[40](RO): IBM 1068022701
Device Vendor/Serial at Last Load - 1 (0x020b)[40](RO): IBM 1068022701
Device Vendor/Serial at Last Load - 2 (0x020c)[40](RO): IBM 1068022701
Device Vendor/Serial at Last Load - 3 (0x020d)[40](RO): IBM 1068022701
Total MB Written in Medium Life (0x0220)[8](RO): 40009 MB
Total MB Read in Medium Life (0x0221)[8](RO): 3149 MB
Total MB Written in Current/Last Load (0x0222)[8](RO): 0 MB
Total MB Read in Current/Last Load (0x0223)[8](RO): 12 MB
Logical Position of First Encrypted Block (0x0224)[8](RO): 18446744073709551615
Logical Position of First Unencrypted Block after First Encrypted Block 
(0x0225)[8](RO): 18446744073709551615
Medium Manufacturer (0x0400)[8](RO): HP
Medium Serial Number (0x0401)[32](RO): AE46TCFD0U
Medium Length (0x0402)[4](RO): 846 m
Medium Width (0x0403)[4](RO): 12.7 mm
Assigning Organization (0x0404)[8](RO): LTO-CVE
Medium Density Code (0x0405)[1](RO): 0x5a
Medium Manufacture Date (0x0406)[8](RO): 20130506
MAM Capacity (0x0407)[8](RO): 16384 bytes
Medium Type (0x0408)[1](RO): 0x0
Medium Type Information (0x0409)[2](RO): 0x0
Application Vendor (0x0800)[8](RW): IBM
Application Name (0x0801)[32](RW): LTFS
Application Version (0x0802)[8](RW):
User Medium Text Label (0x0803)[160](RW):
Text Localization Identifier (0x0805)[1](RW): 0x81
Barcode (0x0806)[32](RW):
Application Format Version (0x080b)[16](RW): 2.2.0
Volume Coherency Information (0x080c)[70](RW):
        Volume Change Reference Value: 0x45
        Volume Coherency Count: 1
        Volume Coherency Set Identifier: 0x5
        Application Client Specific Information: LTFS
        LTFS UUID: 28076791-d64e-4cd7-bc43-fa51ec097d83
        LTFS Version: 1

Testing and comments (on the camcontrol changes or the library changes) are


Kenneth Merry
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to