LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
252 stars 76 forks source link

Unable to mount tape on a Quantum ULTRIUM-HH8 #383

Closed black-inc-service closed 1 year ago

black-inc-service commented 1 year ago

Describe the bug I have LTO-7 tape which has been formatted to type M to get 9TB of capacity using xTalk from quantum. mkltfs of a tape is successful (has a few errors in log?) but unable to mount.

To Reproduce Steps to reproduce the behaviour:

  1. mkltfs -d /dev/sg0 -f
  2. ltfs -o devname=/dev/sg0 /mnt/ltfs

Hardware:

mkltfs -d /dev/sg0 -f
LTFS15000I Starting mkltfs, LTFS version 2.5.0.0 (Prelim), log level 2.
LTFS15041I Launched by "mkltfs -d /dev/sg0 -f".
LTFS15042I This binary is built for Linux (x86_64).
LTFS15043I GCC version is 7.5.0.
LTFS17087I Kernel version: Linux version 5.4.0-135-generic (buildd@lcy02-amd64-053) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #152~18.04.2-Ubuntu SMP Tue Nov 29 08:23:49 UTC 2022 i386.
LTFS17089I Distribution: NAME="Ubuntu".
LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
LTFS15003I Formatting device '/dev/sg0'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.

LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x559b2432db40).
LTFS17085I Plugin: Loading "sg" tape backend.
LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0).
LTFS30250I Opened the SCSI tape device 1.0.0.0 (/dev/sg0).
LTFS30207I Vendor ID is QUANTUM .
LTFS30208I Product ID is ULTRIUM-HH8     .
LTFS30214I Firmware revision is KAH1.
LTFS30215I Drive serial is 10WT064930.
LTFS30285I The reserved buffer size of /dev/sg0 is 524288.
LTFS30294I Setting up timeout values from RSOC.
LTFS17160I Maximum device block size is 1048576.
LTFS11330I Loading cartridge.
LTFS11332I Load successful.
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS15049I Checking the medium (load).
LTFS15010I Creating data partition b on SCSI partition 1.
LTFS15011I Creating index partition a on SCSI partition 0.
LTFS17165I Resetting the medium's capacity proportion.
LTFS11097I Partitioning the medium.
LTFS30263I MODESELECT returns Mode Parameters Rounded (-20101) /dev/sg0.
LTFS11100I Writing label to partition b.
LTFS11278I Writing index to partition b.
LTFS30205I READ_ATTR (0x8c) returns -20501.
LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg0.
LTFS30233I Cannot read attribute (-20501).
LTFS11336I The attribute does not exist. Ignore the expected error.
LTFS17235I Writing index of NO_BARCODE to b (Reason: Format, 0 files) 10WT064930.
LTFS17236I Wrote index of NO_BARCODE (Gen = 1, Part = b, Pos = 5, 10WT064930).
LTFS11337I Update index-dirty flag (0) - NO_BARCODE (0x0x559b2432db40).
LTFS11100I Writing label to partition a.
LTFS11278I Writing index to partition a.
LTFS30205I READ_ATTR (0x8c) returns -20501.
LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg0.
LTFS30233I Cannot read attribute (-20501).
LTFS11336I The attribute does not exist. Ignore the expected error.
LTFS17235I Writing index of NO_BARCODE to a (Reason: Format, 0 files) 10WT064930.
LTFS17236I Wrote index of NO_BARCODE (Gen = 1, Part = a, Pos = 5, 10WT064930).
LTFS15013I Volume UUID is: 145b6509-0994-4728-b609-22d00d18c7b6.

LTFS15019I Volume capacity is 8732 GB.
LTFS30252I Logical block protection is disabled.
LTFS15024I Medium formatted successfully.
ltfs -o devname=/dev/sg0 /mnt/ltfs/
5394 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
5394 LTFS14058I LTFS Format Specification version 2.4.0.
5394 LTFS14104I Launched by "ltfs -o devname=/dev/sg0 /mnt/ltfs/".
5394 LTFS14105I This binary is built for Linux (x86_64).
5394 LTFS14106I GCC version is 7.5.0.
5394 LTFS17087I Kernel version: Linux version 5.4.0-135-generic (buildd@lcy02-amd64-053) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #152~18.04.2-Ubuntu SMP Tue Nov 29 08:23:49 UTC 2022 i386.
5394 LTFS17089I Distribution: NAME="Ubuntu".
5394 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
5394 LTFS14063I Sync type is "time", Sync time is 300 sec.
5394 LTFS17085I Plugin: Loading "sg" tape backend.
5394 LTFS17085I Plugin: Loading "unified" iosched backend.
5394 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
5394 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0).
5394 LTFS30250I Opened the SCSI tape device 1.0.0.0 (/dev/sg0).
5394 LTFS30207I Vendor ID is QUANTUM .
5394 LTFS30208I Product ID is ULTRIUM-HH8     .
5394 LTFS30214I Firmware revision is KAH1.
5394 LTFS30215I Drive serial is 10WT064930.
5394 LTFS30285I The reserved buffer size of /dev/sg0 is 524288.
5394 LTFS30294I Setting up timeout values from RSOC.
5394 LTFS17160I Maximum device block size is 1048576.
5394 LTFS11330I Loading cartridge.
5394 LTFS11332I Load successful.
5394 LTFS17157I Changing the drive setting to write-anywhere mode.
5394 LTFS11005I Mounting the volume from device.
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS12049E Cannot read: backend call failed (-21716).
5394 LTFS17039E XML parser: failed to read a block from the medium (-21716).
5394 LTFS17037E XML parser: failed to read from XML stream.
5394 LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21716).
5394 LTFS17016E Cannot parse index direct from medium (-21716).
5394 LTFS11194W Cannot read index: failed to read and parse XML data (-21716).
5394 LTFS11024E Cannot mount volume: read index failed on the index partition.
5394 LTFS14013E Cannot mount the volume from device.
5394 LTFS30252I Logical block protection is disabled
piste-jp commented 1 year ago

This is a FAQ. Try the --enable-buggy-ifs option in the configure script. -> https://github.com/LinearTapeFileSystem/ltfs/wiki/HBA-info#note-for-buggy-hbas

5394 LTFS11005I Mounting the volume from device.
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS12049E Cannot read: backend call failed (-21716).

Also you can find the issues below if you search the issues by LTFS30216W.

black-inc-service commented 1 year ago

Thanks for your help that got it working. It would be nice to have supported HBAs and/or a link to the FAQ in the main readme.