LinearTapeFileSystem / LinearTapeFileSystem/ltfs

ltfs loops with 'LTFS30216W Length mismatch is detected.'

Open
#517 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Investigating
Dominant language
C
Stars
352
Forks
110
Avg merge
2h 50m
Merged PRs (30d)
2

Description

Describe the bug
OS: Ubuntu 24.04. latest master release

MOST volumes in a 2000 tape changer mount, read / write just fine.
Occasionally a volume will be loaded which exibits the following issue:

root@max-sfa-01:/usr/share/SFS/bin/NxCore# ltfs /ltfs/Tape4 -o devname=/dev/sg23
262dcf LTFS14000I LTFS starting, LTFS version 2.4.4.1 (Prelim), log level 2.
262dcf LTFS14058I LTFS Format Specification version 2.4.0.
262dcf LTFS14104I Launched by "ltfs /ltfs/Tape4 -o devname=/dev/sg23".
262dcf LTFS14105I This binary is built for Linux (x86_64).
262dcf LTFS14106I GCC version is 13.3.0.
262dcf LTFS17087I Kernel version: Linux version 6.8.0-58-generic (buildd@lcy02-amd64-040) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #60-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 14 18:29:48 UTC 2025 i386. 262dcf LTFS17089I Distribution: PRETTY_NAME="Ubuntu 24.04.1 LTS".
262dcf LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
262dcf LTFS14063I Sync type is "time", Sync time is 300 sec.
262dcf LTFS17085I Plugin: Loading "sg" tape backend.
262dcf LTFS17085I Plugin: Loading "unified" iosched backend.
262dcf LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
262dcf LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg23).
262dcf LTFS30250I Opened the SCSI tape device 10.0.12.0 (/dev/sg23).
262dcf LTFS30207I Vendor ID is IBM .
262dcf LTFS30208I Product ID is ULTRIUM-TD6 .
262dcf LTFS30214I Firmware revision is KAJ8.
262dcf LTFS30215I Drive serial is 1013005917.
262dcf LTFS30285I The reserved buffer size of /dev/sg23 is 1048576.
262dcf LTFS30294I Setting up timeout values from RSOC.
262dcf LTFS17160I Maximum device block size is 1048576.
262dcf LTFS11330I Loading cartridge.
262dcf LTFS30252I Logical block protection is disabled.
262dcf LTFS11332I Load successful.
262dcf LTFS17157I Changing the drive setting to write-anywhere mode.
262dcf LTFS11005I Mounting the volume.
262dcf LTFS30252I Logical block protection is disabled.
262dcf LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = -61440).
262dcf LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = -61440).
262dcf LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = -61440).
262dcf LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = -61440).

...... And this loops forever ( process was run for over 12 hours, so never exits ).

To Reproduce
Very difficult as this is a random volume within 2000+ volumes in a changer, I believe this only effects LTO6 media. The changer has mixed LTO media types ( LTO9, LTO7 and LTO6 ).

Expected behavior
The volume should mount as it is formatted etc.

Desktop (please complete the following information):

  • OS: Ubuntu 24.04
  • Version have tried 2.4.4, 2.4.7, 2.5.0 ( Prelim ) all exhibit the same issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ltfs mount command and the repeated LTFS30216W messages from /dev/sg23 on the affected LTO6 volume. Investigate why the mount loops after reporting Act=4096 and resid=0, using the listed Ubuntu, kernel, drive, and LTFS versions. Done means the affected volume mounts successfully or exits with a clear failure instead of looping indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, ubuntu
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.