Skip to content

LTFS tapes won't mount again #527

@smartinventure

Description

@smartinventure

Describe the bug
We have BDT tape library with an IBM LTO-9 drive and LTO-9 tapes.
I had formatted tapes 1, 2, and 3 with LTFS.
I have written so many files to tapes 1 + 2 that they were full. I dismounted tape 1 correctly and moved the media into another slot.
In tape 2, I admittedly made the error that I shutdown the server while the tape was idle, but LTFS not unmounted.
Both cannot be mounted again.
I then formatted a new tape (3) with LTFS, wrote 2 files onto it, unmounted, unloaded, loaded again and successfully mounted.
Below I added the result of the mount command (same for tapes 1 + 2, whereas 3 is successful) and some log.

At least, with basic commands like:
sudo mt -f /dev/st0 fsf 1
sudo dd if=/dev/st0 of=/mnt/synology/DigitalSlides001/recovery/recovered.tar bs=1M

I can recover data from tapes 1+2.

The tapes are super new, the drive is super new, almost unused.

To Reproduce
Only in our setting

Expected behavior
Tapes 1+2 should mount as LTFS

Additional context
Here I run the mount command unsuccessfully and some more info:

root@tapeserver:/mnt/tape# ltfs -o recoverindex -o devname=/dev/sg0 /mnt/tape
1450 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
1450 LTFS14058I LTFS Format Specification version 2.4.0.
1450 LTFS14104I Launched by "ltfs -o recoverindex -o devname=/dev/sg0 /mnt/tape".
1450 LTFS14105I This binary is built for Linux (x86_64).
1450 LTFS14106I GCC version is 13.2.0.
1450 LTFS17087I Kernel version: Linux version 6.8.0-60-generic (buildd@lcy02-amd64-054) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #63-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 19:04:15 UTC 2025 i386.
1450 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
1450 LTFS17089I Distribution: PRETTY_NAME="Ubuntu 24.04 LTS".
1450 LTFS14063I Sync type is "time", Sync time is 300 sec.
1450 LTFS17085I Plugin: Loading "sg" tape backend.
1450 LTFS17085I Plugin: Loading "unified" iosched backend.
1450 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
1450 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0).
1450 LTFS30250I Opened the SCSI tape device 0.0.0.0 (/dev/sg0).
1450 LTFS30207I Vendor ID is IBM     .
1450 LTFS30208I Product ID is ULTRIUM-HH9     .
1450 LTFS30214I Firmware revision is Q9E1.
1450 LTFS30215I Drive serial is 10WT027598.
1450 LTFS30285I The reserved buffer size of /dev/sg0 is 1048576.
1450 LTFS30294I Setting up timeout values from RSOC.
1450 LTFS17160I Maximum device block size is 1048576.
1450 LTFS11330I Loading cartridge.
1450 LTFS30252I Logical block protection is disabled.
1450 LTFS11332I Load successful.
1450 LTFS17157I Changing the drive setting to write-anywhere mode.
1450 LTFS11005I Mounting the volume from device.
1450 LTFS30252I Logical block protection is disabled.
1450 LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = -520192).
1450 LTFS12049E Cannot read: backend call failed (-21716).
1450 LTFS11174E Cannot read ANSI label: read failed (-21716).
1450 LTFS11171E Failed to read label (-21716) from partition 1.
1450 LTFS11009E Cannot read volume: failed to read partition labels.
1450 LTFS14013E Cannot mount the volume from device.
1450 LTFS30252I Logical block protection is disabled.
root@tapeserver:/mnt/tape# ltfsck -z /dev/sg0
LTFS16000I Starting ltfsck, LTFS version 2.5.0.0 (Prelim), log level 2.
LTFS16088I Launched by "ltfsck -z /dev/sg0".
LTFS16089I This binary is built for Linux (x86_64).
LTFS16090I GCC version is 13.2.0.
LTFS17087I Kernel version: Linux version 6.8.0-60-generic (buildd@lcy02-amd64-054) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #63-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 19:04:15 UTC 2025 i386.
LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
LTFS17089I Distribution: PRETTY_NAME="Ubuntu 24.04 LTS".
LTFS17085I Plugin: Loading "sg" tape backend.
LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0).
LTFS30250I Opened the SCSI tape device 0.0.0.0 (/dev/sg0).
LTFS30207I Vendor ID is IBM     .
LTFS30208I Product ID is ULTRIUM-HH9     .
LTFS30214I Firmware revision is Q9E1.
LTFS30215I Drive serial is 10WT027598.
LTFS30285I The reserved buffer size of /dev/sg0 is 1048576.
LTFS30294I Setting up timeout values from RSOC.
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/sg0'.
LTFS30252I Logical block protection is disabled.
LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = -520192).
LTFS12049E Cannot read: backend call failed (-21716).
LTFS11174E Cannot read ANSI label: read failed (-21716).
LTFS11171E Failed to read label (-21716) from partition 1.
LTFS11009E Cannot read volume: failed to read partition labels.
LTFS16080E Cannot check volume (8).
LTFS30252I Logical block protection is disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions