LinearTapeFileSystem / ltfs

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

Error: Failed to load the cartridge (ltfs_load_tape) on v2.4-stable with HP HH Ultrium 6-SCSI + QLogic Corp. ISP2532 HBA #444

Closed rocksit closed 5 months ago

rocksit commented 6 months ago

Hello,

I recently compiled ltfs v2.4-stable an debian 11 (worked as described for debian 10) but could not use or format a tape drive with the ltfs tools. I always get the same error on debian (using it on debian 11 & 12).

When I put in a new cartridge in one of my HP drives

ltfs -o device_list 2aa29f LTFS14000I LTFS starting, LTFS version 2.4.5.1 (Prelim), log level 2. 2aa29f LTFS14058I LTFS Format Specification version 2.4.0. 2aa29f LTFS14104I Launched by "ltfs -o device_list". 2aa29f LTFS14105I This binary is built for Linux (x86_64). 2aa29f LTFS14106I GCC version is 12.2.0. 2aa29f LTFS17087I Kernel version: Linux version 6.1.0-18-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) i386. 2aa29f LTFS17089I Distribution: PRETTY_NAME="Debian GNU/Linux 12 (bookworm)". 2aa29f LTFS17085I Plugin: Loading "sg" tape backend. Tape Device list:. Device Name = /dev/sg4 (17.0.0.0), Vendor ID = HP , Product ID = Ultrium 6-SCSI , Serial Number = HUJ5143FA7, Product Name =[Ultrium 6-SCSI]. Device Name = /dev/sg2 (1.0.0.0), Vendor ID = HP , Product ID = Ultrium 6-SCSI , Serial Number = HUJ44221FW, Product Name =[Ultrium 6-SCSI].

I could not format or access it, probably due to the following errors:

LTFS12030E Cannot get capacity data: backend call failed (-21700). LTFS11999E Cannot load the medium: failed to get capacity data (-21700). LTFS11331E Failed to load the cartridge (ltfs_load_tape).

Here is the full output of my tape ltfs format run:

mkltfs -d /dev/sg2 -c --rules="size=1M" -b 262144 -x LTFS15000I Starting mkltfs, LTFS version 2.4.5.1 (Prelim), log level 7. LTFS15041I Launched by "mkltfs -d /dev/sg2 -c --rules=size=1M -b 262144 -x". LTFS15042I This binary is built for Linux (x86_64). LTFS15043I GCC version is 12.2.0. LTFS17087I Kernel version: Linux version 6.1.0-18-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) i386. LTFS17089I Distribution: PRETTY_NAME="Debian GNU/Linux 12 (bookworm)". LTFS15025D Validating command line options. LTFS15037D Command line options are valid. LTFS15003I Formatting device '/dev/sg2'. LTFS15004I LTFS volume blocksize: 262144. LTFS15005I Index partition placement policy: size=1M. LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x564bce374ff0). LTFS15006D Opening the device. LTFS17085I Plugin: Loading "sg" tape backend. LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg2). LTFS30250I Opened the SCSI tape device 1.0.0.0 (/dev/sg2). LTFS30207I Vendor ID is HP . LTFS30208I Product ID is Ultrium 6-SCSI . LTFS30214I Firmware revision is 25MW. LTFS30215I Drive serial is HUJ44221FW. LTFS30285I The reserved buffer size of /dev/sg2 is 1048576. LTFS30201D CDB check condition: sense = 062800, Not Ready to Ready Transition, Medium May Have Changed. LTFS30205I RSOC (0xa3) returns -20601. LTFS30263I RSOC returns Not Ready to Ready Transition, Medium May Have Changed (-20601) /dev/sg2. LTFS30294I Setting up timeout values from vendor and device. LTFS39801D SCSI timeout (op_code 0x5f, timeout = 60). LTFS12023D Reserving device. LTFS30392D Backend reserve (PRO) HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x5f, timeout = 60). LTFS12028D Unlocking medium. LTFS30392D Backend allow medium removal HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x1e, timeout = 60). LTFS30392D Backend read block limits HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x05, timeout = 60). LTFS17160I Maximum device block size is 1048576. LTFS11330I Loading cartridge. LTFS30392D Backend load HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x1b, timeout = 600). LTFS39801D SCSI timeout (op_code 0x34, timeout = 60). LTFS30398D Backend readpos: (0, 0) FM = 0 HUJ44221FW. LTFS30393D Backend modesense: 63 HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60). LTFS30392D Backend test unit ready HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x00, timeout = 60). LTFS12026D Locking medium in the drive. LTFS30392D Backend prevent medium removal HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x1e, timeout = 60). LTFS39801D SCSI timeout (op_code 0x34, timeout = 60). LTFS30398D Backend readpos: (0, 0) FM = 0 HUJ44221FW. LTFS30397D Backend logsense: (23, 0) HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60). LTFS30232I Cannot get remaining capacity: failed to parse the log page. LTFS12030E Cannot get capacity data: backend call failed (-21700). LTFS11999E Cannot load the medium: failed to get capacity data (-21700). LTFS11331E Failed to load the cartridge (ltfs_load_tape). LTFS30392D Backend test unit ready HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x00, timeout = 60). LTFS30392D Backend test unit ready HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x00, timeout = 60). LTFS30397D Backend logsense: (23, 0) HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60). LTFS30232I Cannot get remaining capacity: failed to parse the log page. LTFS12030E Cannot get capacity data: backend call failed (-21700). LTFS11999E Cannot load the medium: failed to get capacity data (-21700). LTFS15044E Cannot set up tape device. LTFS12028D Unlocking medium. LTFS30392D Backend allow medium removal HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x1e, timeout = 60). LTFS30392D Backend test unit ready HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x00, timeout = 60). LTFS30393D Backend modesense: 16 HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60). LTFS30392D Backend modeselect HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x55, timeout = 60). LTFS12025D Releasing device. LTFS30392D Backend release (PRO) HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x5f, timeout = 60). LTFS30393D Backend LBP Enable: 0 . LTFS30393D Backend LBP Method: 1 . LTFS30393D Backend modesense: 10 HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60). LTFS30392D Backend modeselect HUJ44221FW. LTFS39801D SCSI timeout (op_code 0x55, timeout = 60). LTFS30201D CDB check condition: sense = 052600, Invalid Field in Parameter List. LTFS30205I MODESELECT (0x55) returns -20500. LTFS30263I MODESELECT returns Invalid Field in Parameter List (-20500) /dev/sg2. LTFS39801D SCSI timeout (op_code 0x5f, timeout = 60). LTFS15023I Formatting failed.

Interestingly, all works well when I compile and use this hp build version here ... https://github.com/leavelet/ltfs-hp. Formating and mounting the cartridge works well in the hp version, but another driver seems to be used instead of "sg", it is a "ltotape" driver. I have tried lintape driver, I have changed dio to 1, I have compiled with "buggy ifs" but I cant get rid of this error.

My HBA is an Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) that should be well supported I think. The cartridge I'm using is an original HPE ultrium-6 one.

I'm not sure if my HP drive, or the tape are supported at this moment by this ltfs distro, but maybe someone can clearify ? Looking for any suggestion or advice :)

piste-jp commented 5 months ago

I think this is already reported in #241 and fixed on the master branch with #248.

The fix is only available on the master.

You can see also #418.

rocksit commented 5 months ago

Thank you piste-jp-ibm, for pointing this out. I did a search but did not know, what key to search the issues for, so I did not find the earlier issue.

As I prefer to stay on branch 2.4-stable due to the stability warnings for master, I solved the problem by cherry-picking your commit to the stable branch

git cherry-pick -n 3b5acac2736b4e6e1a2da30cfbdfa87de3884c70

So I could compile stable version 2.4 with support for HP HH LTO6 drives on my debian 11 / 12 and can confirm that ltfs and mkltfs work fine.

Maybe it could be helpful, to backport this feature to the stable 2.4 branch.

Xeroxxx commented 5 months ago

@piste-jp-ibm @rocksit

I had the same issue with 2.4 stable. I can confirm the master branch solved the issue for me.

LTFS30207I Vendor ID is HP . LTFS30208I Product ID is Ultrium 6-SCSI . LTFS30214I Firmware revision is 357B.

Additionally I can confirm it works flawless with Debain Bookworm 12.