这维基百科 LTO 文章据说每个 LTO 驱动器都可以通过 13.56 MHz NFC 读取磁带的存储芯片。
我希望在这里找到序列号、磁带属性和使用数据。如何在 Linux 系统上使用免费开源软件读取这些数据?
答案1
方法.1 LTO 驱动
LTO驱动器内部有一个RFID读取器,用于从芯片读取数据。客户端可以通过 SCSI 命令访问它。具体来说,READ ATTRIBUTE命令(操作代码:8C)。
READ ATTRIBUTE 命令应与指定要传输的数据字段的属性标识符一起调用。例如,根据IBM SCSI 参考, MEDIUM SERIAL NUMBER 可以通过属性标识符 0401h 读取,并且 LOAD COUNT 为 0003h。
这是一个开源 Linux 软件,向驱动器发送 READ ATTRIBUTE 命令。支持序列号、磁带属性(例如介质长度、宽度)和使用数据(例如负载计数、写入的总 MB 等)。
方法2 通用RFID阅读器
现在,Proxmark3和ACR122U支持 LTO 磁带内存。
步骤 1 使用这些读取器转储芯片中的所有数据。根据您的硬件安装 Proxmark3 软件或 nfc-ltocm,将 LTO 磁带放入读卡器上,然后发送转储命令。芯片的二进制数据将存储在您的存储设备上。
答案2
如果您有sg3_utils / sg3-utils安装(名称取决于您的发行版),您可以使用 sg_read_attr 来执行此操作。使用 -e 它将枚举它知道的所有属性。
$ sg_read_attr -e
Attribute ID Length Format Name
------------------------------------------
0x0000: 8 binary Remaining capacity in partition [MiB]
0x0001: 8 binary Maximum capacity in partition [MiB]
0x0002: 8 binary TapeAlert flags
0x0003: 8 binary Load count
0x0004: 8 binary MAM space remaining [B]
0x0005: 8 ascii Assigning organization
0x0006: 1 binary Format density code
0x0007: 2 binary Initialization count
0x0008: 32 ascii Volume identifier
0x0009: -1 binary Volume change reference
0x020a: 40 ascii Density vendor/serial number at last load
0x020b: 40 ascii Density vendor/serial number at load-1
0x020c: 40 ascii Density vendor/serial number at load-2
0x020d: 40 ascii Density vendor/serial number at load-3
0x0220: 8 binary Total MiB written in medium life
0x0221: 8 binary Total MiB read in medium life
0x0222: 8 binary Total MiB written in current/last load
0x0223: 8 binary Total MiB read in current/last load
0x0224: 8 binary Logical position of first encrypted block
0x0225: 8 binary Logical position of first unencrypted block
after first encrypted block
0x0340: 90 binary Medium usage history
0x0341: 60 binary Partition usage history
0x0400: 8 ascii Medium manufacturer
0x0401: 32 ascii Medium serial number
0x0402: 4 binary Medium length [m]
0x0403: 4 binary Medium width [0.1 mm]
0x0404: 8 ascii Assigning organization
0x0405: 1 binary Medium density code
0x0406: 8 ascii Medium manufacture date
0x0407: 8 binary MAM capacity [B]
0x0408: 1 binary Medium type
0x0409: 2 binary Medium type information
0x040a: -1 unknown Numeric medium serial number
0x0800: 8 ascii Application vendor
0x0801: 32 ascii Application name
0x0802: 8 ascii Application version
0x0803: 160 text User medium text label
0x0804: 12 ascii Date and time last written
0x0805: 1 binary Text localization identifier
0x0806: 32 ascii Barcode
0x0807: 80 text Owning host textual name
0x0808: 160 text Media pool
0x0809: 16 ascii Partition user text label
0x080a: 1 binary Load/unload at partition
0x080a: 16 ascii Application format version
0x080c: -1 binary Volume coherency information
0x0820: 36 binary Medium globally unique identifier
0x0821: 36 binary Media pool globally unique identifier
SA_value Acronym Description
------------------------------------------
0: av attribute values
1: al attribute list
2: lvl logical volume list
3: pl partition list
4: smc SMC-2 should define this
5: sa supported attributes
那么你可以读取 0x0401 或 0x003 (/dev/sg0 是我的磁带设备):
$ sudo sg_read_attr -f 0x401 /dev/sg0
Medium serial number: SOMESERIAL
$ sudo sg_read_attr -f 0x3 /dev/sg0
Load count: 14
或者使用 -f all 读取所有内容