Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to mount tape on a ULTRIUM-HH9 #371

Open
pae23 opened this issue Dec 1, 2022 · 2 comments
Open

unable to mount tape on a ULTRIUM-HH9 #371

pae23 opened this issue Dec 1, 2022 · 2 comments

Comments

@pae23
Copy link

pae23 commented Dec 1, 2022

Describe the bug

Under Linux Ubuntu 22.04, LTO drive ( Overland-Tandberg LTO-9 HH - Lecteur de bandes magnétiques - LTO Ultrium (18 To / 45 To) - Ultrium 9 - SAS-3 ) , the mkltfs (mkltfs -d /dev/sg5 -f) worked fine but I can't mount the fs : 

ltfs -o devname=/dev/sg4 /mnt/ltfs/
356bb LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
356bb LTFS14058I LTFS Format Specification version 2.4.0.
356bb LTFS14104I Launched by "ltfs -o devname=/dev/sg4 /mnt/ltfs/".
356bb LTFS14105I This binary is built for Linux (x86_64).
356bb LTFS14106I GCC version is 11.3.0.
356bb LTFS17087I Kernel version: Linux version 5.15.0-56-generic (buildd@lcy02-amd64-004) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 i386.
356bb LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
356bb LTFS17089I Distribution: PRETTY_NAME="Ubuntu 22.04.1 LTS".
356bb LTFS14063I Sync type is "time", Sync time is 300 sec.
356bb LTFS17085I Plugin: Loading "sg" tape backend.
356bb LTFS17085I Plugin: Loading "unified" iosched backend.
356bb LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
356bb LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg4).
356bb LTFS30250I Opened the SCSI tape device 0.0.41.0 (/dev/sg4).
356bb LTFS30207I Vendor ID is IBM     .
356bb LTFS30208I Product ID is ULTRIUM-HH9     .
356bb LTFS30214I Firmware revision is NCA1.
356bb LTFS30215I Drive serial is 10WT000000.
356bb LTFS30285I The reserved buffer size of /dev/sg4 is 262144.
356bb LTFS30294I Setting up timeout values from RSOC.
356bb LTFS17160I Maximum device block size is 1048576.
356bb LTFS11330I Loading cartridge.
356bb LTFS30252I Logical block protection is disabled.
356bb LTFS11332I Load successful.
356bb LTFS17157I Changing the drive setting to write-anywhere mode.
356bb LTFS11005I Mounting the volume from device.
356bb LTFS30252I Logical block protection is disabled.
356bb LTFS30216W Length mismatch is detected. (Act = 4096, resid = 0, resid_sense = 4016).
356bb LTFS12049E Cannot read: backend call failed (-21716).
356bb LTFS11174E Cannot read ANSI label: read failed (-21716).
356bb LTFS11170E Failed to read label (-21716) from partition 0.
356bb LTFS11009E Cannot read volume: failed to read partition labels.
356bb LTFS14013E Cannot mount the volume from device.
356bb LTFS30252I Logical block protection is disabled.

I upgrade the firmware to PA61 and recompile ltfs with the --enable-buggy-ifs option but I didn't had more success:

ltfs -o devname=/dev/st5 /mnt/ltfs/
8189 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
8189 LTFS14058I LTFS Format Specification version 2.4.0.
8189 LTFS14104I Launched by "ltfs -o devname=/dev/st5 /mnt/ltfs/".
8189 LTFS14105I This binary is built for Linux (x86_64).
8189 LTFS14106I GCC version is 11.3.0.
8189 LTFS17087I Kernel version: Linux version 5.15.0-56-generic (buildd@lcy02-amd64-004) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 i386.
8189 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
8189 LTFS17089I Distribution: PRETTY_NAME="Ubuntu 22.04.1 LTS".
8189 LTFS14063I Sync type is "time", Sync time is 300 sec.
8189 LTFS17085I Plugin: Loading "sg" tape backend.
8189 LTFS17085I Plugin: Loading "unified" iosched backend.
8189 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
8189 LTFS30209I Opening a device through sg-ibmtape driver (/dev/st5).
8189 LTFS30288I Opening a tape device for drive serial /dev/st5.
8189 LTFS12012E Cannot open device: failed backend open call.
8189 LTFS10004E Cannot open device '/dev/st5'.
root@ftv-demo-001:/home/paentraygues/ITDT# ltfs -o devname=/dev/sg5 /mnt/ltfs/
81a7 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
81a7 LTFS14058I LTFS Format Specification version 2.4.0.
81a7 LTFS14104I Launched by "ltfs -o devname=/dev/sg5 /mnt/ltfs/".
81a7 LTFS14105I This binary is built for Linux (x86_64).
81a7 LTFS14106I GCC version is 11.3.0.
81a7 LTFS17087I Kernel version: Linux version 5.15.0-56-generic (buildd@lcy02-amd64-004) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 i386.
81a7 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
81a7 LTFS17089I Distribution: PRETTY_NAME="Ubuntu 22.04.1 LTS".
81a7 LTFS14063I Sync type is "time", Sync time is 300 sec.
81a7 LTFS17085I Plugin: Loading "sg" tape backend.
81a7 LTFS17085I Plugin: Loading "unified" iosched backend.
81a7 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
81a7 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg5).
81a7 LTFS30250I Opened the SCSI tape device 0.0.41.0 (/dev/sg5).
81a7 LTFS30207I Vendor ID is IBM     .
81a7 LTFS30208I Product ID is ULTRIUM-HH9     .
81a7 LTFS30214I Firmware revision is PA61.
81a7 LTFS30215I Drive serial is 10WT000000.
81a7 LTFS30285I The reserved buffer size of /dev/sg5 is 262144.
81a7 LTFS30294I Setting up timeout values from RSOC.
81a7 LTFS17160I Maximum device block size is 1048576.
81a7 LTFS11330I Loading cartridge.
81a7 LTFS30252I Logical block protection is disabled.
81a7 LTFS11332I Load successful.
81a7 LTFS17157I Changing the drive setting to write-anywhere mode.
81a7 LTFS11005I Mounting the volume from device.
81a7 LTFS30252I Logical block protection is disabled.
81a7 LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
81a7 LTFS30263I READ returns ioctl error (-21700) /dev/sg5.
81a7 LTFS12049E Cannot read: backend call failed (-21700).
81a7 LTFS17039E XML parser: failed to read a block from the medium (-21700).
81a7 LTFS17037E XML parser: failed to read from XML stream.
81a7 LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21700).
81a7 LTFS17016E Cannot parse index direct from medium (-21700).
81a7 LTFS11194W Cannot read index: failed to read and parse XML data (-21700).
81a7 LTFS11024E Cannot mount volume: read index failed on the index partition.
81a7 LTFS14013E Cannot mount the volume from device.
81a7 LTFS30252I Logical block protection is disabled.

To Reproduce
Steps to reproduce the behavior:

  1. Linux Ubuntu 22.04, LTO drive : Overland-Tandberg LTO-9 HH - Lecteur de bandes magnétiques - LTO Ultrium (18 To / 45 To) - Ultrium 9 - SAS-3, SAS card : Broadcom / LSI MegaRAID SAS-3 3108
  2. mkltfs -d /dev/sgX -f
  3. ltfs -o devname=/dev/stX /mnt/ltfs/
  4. See error

Expected behavior
a mounted volume

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux Ubuntu 22.04
  • LTO drive : Overland-Tandberg LTO-9 HH - Lecteur de bandes magnétiques - LTO Ultrium (18 To / 45 To) - Ultrium 9 - SAS-3
  • SAS card : Broadcom / LSI MegaRAID SAS-3 3108

Additional context
The drive is working as expected with the tapeinfo and mt command (status and rewind for example) and tar (tested in write (tar cvf /dev/st0 /etc) and read (tar xvf /dev/st0 -C /tmp/test/))

@piste-jp
Copy link
Member

piste-jp commented Dec 2, 2022

ioctl() returned EINVAL against a SCSI READ command for index reading (with 512KB length read).

Before this SCSI READ, LTFS did issue one or more SCSI READ command for reading ANSI labels and LTFS labels (with 4KB length read).

I guess 4KB READ is successfully handled in the lower drivers but 512KB READ cannot be handled correctly.

Sometimes MagaRAID HBA got this type of problems because basically it is designed only for HDD. In HDD commands, length of read is 4KB maximum.

The only thing I can comment is to confirm the setting of HBA firmware below.

  • Firmware version of HBA is the latest or not
  • Some HBAs have a switch to enable tape support (actually allowing long-length read)
81a7 LTFS11005I Mounting the volume from device.
81a7 LTFS30252I Logical block protection is disabled.
81a7 LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22).
81a7 LTFS30263I READ returns ioctl error (-21700) /dev/sg5.
81a7 LTFS12049E Cannot read: backend call failed (-21700).
81a7 LTFS17039E XML parser: failed to read a block from the medium (-21700).

@alatteri

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants