Can't mount LTFS tape with HBA in Thunderbolt PCIe Enclosure
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- c, linux, ubuntu
调研方向
首先使用 ltfs -o devname=/dev/sg1 /mnt/ltfs 和 ltfsck /dev/sg1 重现失败,重点关注 sg 后端失败的 SCSI READ 和 SG_IO 调用。将 Thunderbolt 外置盒的行为与直接 HBA 配置进行比较,并检查报告中显示的 qla2xxx 设备详细信息。完成标准是确定 transport 或 backend 原因,并实现成功挂载,或记录可复现的 incompatibility。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
I have written several LTO-7 tapes with LTFS, never had a major problem with old QLogic 8GB FC HBA (HP part number) directly connected to the mainboard.
For a portable solution, I put an HBA into a Thunderbolt 3 expansion enclosure. Thunderbolt works, HBA and tape drive are recognized, but I can't mount tapes.
I have tested it via Thunderbolt on several devices with Ubuntu, it is always the same error messages.
Tapes were formatted weeks ago with mkltfs -d ... without further arguments and written with data and unmounted cleanly.
Does anyone have any idea what the problem could be?
To Reproduce
# sudo ltfs -o device_list
11ab LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
11ab LTFS14058I LTFS Format Specification version 2.4.0.
11ab LTFS14104I Launched by "ltfs -o device_list".
11ab LTFS14105I This binary is built for Linux (x86_64).
11ab LTFS14106I GCC version is 14.2.0.
11ab LTFS17087I Kernel version: Linux version 6.14.0-15-generic (buildd@lcy02-amd64-022) (x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0, GNU ld (GNU Binutils for Ubuntu) 2.44) #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 i386.
11ab LTFS17089I Distribution: PRETTY_NAME="Ubuntu 25.04".
11ab LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
11ab LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
Device Name = /dev/sg1 (2.0.0.0), Vendor ID = IBM , Product ID = ULTRIUM-TD7 , Serial Number = F002------, Product Name =[ULTRIUM-TD7].
# sudo ltfs -o devname=/dev/sg1 /mnt/ltfs
138c LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
138c LTFS14058I LTFS Format Specification version 2.4.0.
138c LTFS14104I Launched by "ltfs -o devname=/dev/sg1 /mnt/ltfs".
138c LTFS14105I This binary is built for Linux (x86_64).
138c LTFS14106I GCC version is 14.2.0.
138c LTFS17087I Kernel version: Linux version 6.14.0-15-generic (buildd@lcy02-amd64-022) (x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0, GNU ld (GNU Binutils for Ubuntu) 2.44) #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 i386.
138c LTFS17089I Distribution: PRETTY_NAME="Ubuntu 25.04".
138c LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
138c LTFS14063I Sync type is "time", Sync time is 300 sec.
138c LTFS17085I Plugin: Loading "sg" tape backend.
138c LTFS17085I Plugin: Loading "unified" iosched backend.
138c LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
138c LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg1).
138c LTFS30250I Opened the SCSI tape device 2.0.0.0 (/dev/sg1).
138c LTFS30207I Vendor ID is IBM .
138c LTFS30208I Product ID is ULTRIUM-TD7 .
138c LTFS30214I Firmware revision is Q386.
138c LTFS30215I Drive serial is F002------.
138c LTFS30285I The reserved buffer size of /dev/sg1 is 262144.
138c LTFS30205I RSOC (0xa3) returns -20603.
138c LTFS30263I RSOC returns Power On, Reset, or Bus Device Reset Occurred (-20603) /dev/sg1.
138c LTFS30262I Forcing drive dump.
138c LTFS39802W Unknown SCSI OP code 0x1d, use default timeout.
138c LTFS30253I Saving drive dump to /tmp/ltfs_F002------_2025_0607_181437_f.dmp.
138c LTFS39802W Unknown SCSI OP code 0x3c, use default timeout.
138c LTFS39802W Unknown SCSI OP code 0x3c, use default timeout.
138c LTFS30200I Failed to execute SG_IO ioctl, opcode = 3c (22).
138c LTFS30263I READ_BUFFER returns ioctl error (-21700) /dev/sg1.
138c LTFS30258W Cannot retrieve drive dump: failed to read buffer (-21700).
138c LTFS30294I Setting up timeout values from vendor and device.
138c LTFS17160I Maximum device block size is 1048576.
138c LTFS11330I Loading cartridge.
138c LTFS30252I Logical block protection is disabled.
138c LTFS11332I Load successful.
138c LTFS17157I Changing the drive setting to write-anywhere mode.
138c LTFS11005I Mounting the volume from device.
138c LTFS30252I Logical block protection is disabled.
138c LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
138c LTFS30263I READ returns ioctl error (-21700) /dev/sg1.
138c LTFS12049E Cannot read: backend call failed (-21700).
138c LTFS17039E XML parser: failed to read a block from the medium (-21700).
138c LTFS17037E XML parser: failed to read from XML stream.
138c LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21700).
138c LTFS17016E Cannot parse index direct from medium (-21700).
138c LTFS11194W Cannot read index: failed to read and parse XML data (-21700).
138c LTFS11024E Cannot mount volume: read index failed on the index partition.
138c LTFS14013E Cannot mount the volume from device.
138c LTFS30252I Logical block protection is disabled.
2e:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
Subsystem: Hewlett-Packard Company StorageWorks 81Q
Flags: bus master, fast devsel, latency 0, IRQ 17, IOMMU group 17
I/O ports at 6000 [disabled] [size=256]
Memory at 6a140000 (64-bit, non-prefetchable) [size=16K]
Memory at 6a000000 (64-bit, non-prefetchable) [size=1M]
Expansion ROM at 6a100000 [virtual] [disabled] [size=256K]
Capabilities: [44] Power Management version 3
Capabilities: [4c] Express Endpoint, IntMsgNum 0
Capabilities: [88] MSI: Enable- Count=1/32 Maskable- 64bit+
Capabilities: [98] Vital Product Data
Capabilities: [a0] MSI-X: Enable+ Count=32 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [138] Power Budgeting <?>
Kernel driver in use: qla2xxx
Kernel modules: qla2xxx
# sudo lsscsi
[1:0:0:0] disk ATA WDC WDS100T1R0A 10WR /dev/sda
[2:0:0:0] tape IBM ULTRIUM-TD7 Q386 /dev/st0
[N:0:2:1] disk SAMSUNG MZVLW512HMJP-000H1__1 /dev/nvme0n1
# sudo ltfsck /dev/sg1
LTFS16000I Starting ltfsck, LTFS version 2.5.0.0 (Prelim), log level 2.
LTFS16088I Launched by "ltfsck /dev/sg1".
LTFS16089I This binary is built for Linux (x86_64).
LTFS16090I GCC version is 14.2.0.
LTFS17087I Kernel version: Linux version 6.14.0-15-generic (buildd@lcy02-amd64-022) (x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0, GNU ld (GNU Binutils for Ubuntu) 2.44) #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 i386.
LTFS17089I Distribution: PRETTY_NAME="Ubuntu 25.04".
LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
LTFS17085I Plugin: Loading "sg" tape backend.
LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg1).
LTFS30250I Opened the SCSI tape device 2.0.0.0 (/dev/sg1).
LTFS30207I Vendor ID is IBM .
LTFS30208I Product ID is ULTRIUM-TD7 .
LTFS30214I Firmware revision is Q386.
LTFS30215I Drive serial is F002------.
LTFS30285I The reserved buffer size of /dev/sg1 is 262144.
LTFS30205I RSOC (0xa3) returns -20603.
LTFS30263I RSOC returns Power On, Reset, or Bus Device Reset Occurred (-20603) /dev/sg1.
LTFS30262I Forcing drive dump.
LTFS39802W Unknown SCSI OP code 0x1d, use default timeout.
LTFS30205I FORCE_DUMP (0x1d) returns -20601.
LTFS30263I FORCE_DUMP returns Not Ready to Ready Transition, Medium May Have Changed (-20601) /dev/sg1.
LTFS30262I Forcing drive dump.
LTFS39802W Unknown SCSI OP code 0x1d, use default timeout.
LTFS30253I Saving drive dump to /tmp/ltfs_F002------_2025_0608_074723_f.dmp.
LTFS39802W Unknown SCSI OP code 0x3c, use default timeout.
LTFS39802W Unknown SCSI OP code 0x3c, use default timeout.
LTFS30200I Failed to execute SG_IO ioctl, opcode = 3c (22).
LTFS30263I READ_BUFFER returns ioctl error (-21700) /dev/sg1.
LTFS30258W Cannot retrieve drive dump: failed to read buffer (-21700).
LTFS30253I Saving drive dump to /tmp/ltfs_F002------_2025_0608_074723_f.dmp.
LTFS39802W Unknown SCSI OP code 0x3c, use default timeout.
LTFS39802W Unknown SCSI OP code 0x3c, use default timeout.
LTFS30200I Failed to execute SG_IO ioctl, opcode = 3c (22).
LTFS30263I READ_BUFFER returns ioctl error (-21700) /dev/sg1.
LTFS30258W Cannot retrieve drive dump: failed to read buffer (-21700).
LTFS30294I Setting up timeout values from vendor and device.
LTFS17160I Maximum device block size is 1048576.
LTFS11330I Loading cartridge.
LTFS30252I Logical block protection is disabled.
LTFS11332I Load successful.
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS16014I Checking LTFS file system on '/dev/sg1'.
LTFS30252I Logical block protection is disabled.
LTFS16023I LTFS volume information:.
LTFS16024I Volser (bar code) : .
LTFS16025I Volume UUID : 6fa748aa-d50a-4573-a6e1-5064429446e0.
LTFS16026I Format time : 2025-04-16 21:47:54.794033140 CEST.
LTFS16027I Block size : 524288.
LTFS16028I Compression : Enabled.
LTFS16029I Index partition : ID = a, SCSI Partition = 0.
LTFS16030I Data partition : ID = b, SCSI Partition = 1.
LTFS11005I Mounting the volume from device.
LTFS30252I Logical block protection is disabled.
LTFS11026I Performing a full medium consistency check.
LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
LTFS30263I READ returns ioctl error (-21700) /dev/sg1.
LTFS12049E Cannot read: backend call failed (-21700).
LTFS17039E XML parser: failed to read a block from the medium (-21700).
LTFS17037E XML parser: failed to read from XML stream.
LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21700).
LTFS17016E Cannot parse index direct from medium (-21700).
LTFS11194W Cannot read index: failed to read and parse XML data (-21700).
LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
LTFS30263I READ returns ioctl error (-21700) /dev/sg1.
LTFS12049E Cannot read: backend call failed (-21700).
LTFS17039E XML parser: failed to read a block from the medium (-21700).
LTFS17037E XML parser: failed to read from XML stream.
LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21700).
LTFS17016E Cannot parse index direct from medium (-21700).
LTFS11194W Cannot read index: failed to read and parse XML data (-21700).
LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
LTFS30263I READ returns ioctl error (-21700) /dev/sg1.
LTFS12049E Cannot read: backend call failed (-21700).
LTFS17039E XML parser: failed to read a block from the medium (-21700).
LTFS17037E XML parser: failed to read from XML stream.
LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21700).
LTFS17016E Cannot parse index direct from medium (-21700).
LTFS11194W Cannot read index: failed to read and parse XML data (-21700).
LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
...
...
Expected behavior
Successful mounting with HBA in a Thunderbolt 3 Expansion enclosure
Additional context
I can almost rule out a problem with Thunderbolt itself, a Windows 11 system with IBM LTFS can at least mount the tape, but accessing it and copying is buggy
- 主要语言
- C
- 星标
- 358
- 派生
- 111
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LinearTapeFileSystem/ltfs 的其他 Issue
-
ltfs_ordered_copy: copying several files into a directory fails with 'Is a directory' since v2.4.9.0可能已有人在做 @MitchelTighe 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
LinearTapeFileSystem/ltfs#661 ·
维护者通常 6 天内回复
-
2.4.9.1 mkltfs failed可能已有人在做 @madjesc 于 4 天前认领。 未关闭Investigating
LinearTapeFileSystem/ltfs#656 · 3 条评论 · 已指派 1 人 ·
维护者通常 6 天内回复
-
ltfs/mkltfs segfault when the drive INQUIRY vendor id is not IBM/HP/HPE/QUANTUM (NULL deref in _raw_open)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 25/100
LinearTapeFileSystem/ltfs#650 ·
维护者通常 6 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
LinearTapeFileSystem/ltfs#647 · 1 条评论 ·
维护者通常 6 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
LinearTapeFileSystem/ltfs#643 ·
维护者通常 6 天内回复
查看 LinearTapeFileSystem/ltfs 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
OpenPrinting/cups#1772 ·
维护者通常 1 天内回复
-
tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 82/100
antoxa2584x/nfsu2-sw#44 · 1 个 reaction ·
维护者通常 1 天内回复