AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 559535
Accepted
Jonas Stein
Jonas Stein
Asked: 2019-12-31 04:10:34 +0800 CST2019-12-31 04:10:34 +0800 CST 2019-12-31 04:10:34 +0800 CST

从 LTO 磁带读取芯片数据

  • 772

维基百科 LTO 文章称,每个 LTO 驱动器都可以通过 13.56 MHz NFC 读取磁带的存储芯片。

我希望在这里找到序列号、磁带属性和使用数据。如何在 Linux 系统上使用免费和开源软件读取这些数据?

read tape
  • 2 2 个回答
  • 1054 Views

2 个回答

  • Voted
  1. Best Answer
    Kevin Nakamoto
    2020-07-31T12:32:23+08:002020-07-31T12:32:23+08:00

    Method.1 LTO 驱动器

    LTO 驱动器内部有一个 RFID 读取器,用于从芯片读取数据。客户端可以通过 SCSI 命令访问它。具体来说,READ ATTRIBUTE 命令(操作代码:8C)。

    READ ATTRIBUTE 命令应与指定要传输的数据字段的属性标识符一起调用。例如,根据IBM SCSI Reference,可以使用 Attribute Identifier 的 0401h 读取 MEDIUM SERIAL NUMBER,而 LOAD COUNT 为 0003h。

    这是一个向驱动器发送 READ ATTRIBUTE 命令的开源 Linux 软件。支持序列号、磁带属性(如介质长度、宽度)和使用数据(如负载计数、写入的总 MB 数等)。

    Method.2 通用 RFID 阅读器

    目前,Proxmark3和ACR122U支持 LTO 盒式存储器。

    Step.1 使用这些阅读器转储芯片中的所有数据。根据您的硬件安装 Proxmark3 软件或 nfc-ltocm,将 LTO 盒式磁带放在读卡器上,然后发送转储命令。芯片的二进制数据将存储在您的存储设备上。

    Step.2 使用此脚本使此二进制数据具有人类可读性。这是用于演示的YouTube视频。

    • 2
  2. Mathieu
    2022-03-27T08:42:22+08:002022-03-27T08:42:22+08:00

    如果您安装了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 阅读它们

    • 2

相关问题

  • 读取输出文件和 rsync 中的变量

  • 一行读取验证[关闭]

  • 我如何让 read 回显除键入结束时的末行之外的所有输入?

  • (如何)我可以获得 read var 以将文字 \b(退格键)添加到 var?

  • 逐行读取文件并记住文件中的最后一个位置

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve