LinearTapeFileSystem / ltfs

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

Formatting fails on HP LTO6 drive v2.4.5 #418

Closed vguilleaume closed 1 year ago

vguilleaume commented 1 year ago

Describe the bug I try to format a LTO6 media and i have a failed error in return.

The context is : HP ULTRIUM 6 drive, and openltfs v2.4.4.1 and openltfs v2.4.5.0.

This is something not usual for me except when with some HP drives. I do believe that the tape library manufacturer upload there own firmware in the tape drive even if it is a HP.

In have seen that a bug was opened in 2021 about a similar issue with HP ULTRIUM 6 tape drive, it is why i decided to upgrade from 2.4.4.1 to 2.4.5 version. Even after the migration, i have the same error message even i understand that the fixed provided should be in 2.4.5 version.

Could you help me to confirm this ?

Here are the links: Issue: #241 MR: #248

[root@ltfs-2.4.5.0-10502]# mkltfs -V
mkltfs version 2.4.5.0 (10502).
LTFS Format Specification version 2.4.0.

[root@ltfs-2.4.5.0-10502]# mkltfs -d /dev/sg4 -t
LTFS15000I Starting mkltfs, LTFS version 2.4.5.0 (10502), log level 3.
LTFS15041I Launched by "mkltfs -d /dev/sg4 -t".
LTFS15042I This binary is built for Linux (x86_64).
LTFS15043I GCC version is 8.5.0 20210514 (Red Hat 8.5.0-18).
LTFS17087I Kernel version: Linux version 4.18.0-477.15.1.el8_8.x86_64 ([mockbuild@iad1-prod-build001.bld.equ.rockylinux.org](mailto:mockbuild@iad1-prod-build001.bld.equ.rockylinux.org)) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC)) #1 SMP Wed Jun 28 15:04:18 UTC 2023 i386.
LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
LTFS17089I Distribution: NAME="Rocky Linux".
LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
LTFS15025D Validating command line options.
LTFS15037D Command line options are valid.
LTFS15003I Formatting device '/dev/sg4'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.
LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x560deff3da20).
LTFS15006D Opening the device.
LTFS17085I Plugin: Loading "sg" tape backend.
LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg4).
LTFS30250I Opened the SCSI tape device 16.0.0.0 (/dev/sg4).
LTFS30207I Vendor ID is HP      .
LTFS30208I Product ID is Ultrium 6-SCSI  .
LTFS30214I Firmware revision is 25CB.
LTFS30215I Drive serial is HU14121D39.
LTFS30285I The reserved buffer size of /dev/sg4 is 1048576.
LTFS30294I Setting up timeout values from RSOC.
LTFS12023D Reserving device.
LTFS30392D Backend reserve (PRO) HU14121D39.
LTFS12028D Unlocking medium.
LTFS30392D Backend allow medium removal HU14121D39.
LTFS30392D Backend read block limits HU14121D39.
LTFS17160I Maximum device block size is 1048576.
LTFS11330I Loading cartridge.
LTFS30392D Backend load HU14121D39.
LTFS30398D Backend readpos: (0, 0) FM = 0 HU14121D39.
LTFS12026D Locking medium in the drive.
LTFS30392D Backend prevent medium removal HU14121D39.
LTFS30398D Backend readpos: (0, 0) FM = 0 HU14121D39.
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).
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 HU14121D39.
LTFS12025D Releasing device.
LTFS30392D Backend release (PRO) HU14121D39.
LTFS30393D Backend LBP Enable: 0 .
LTFS30393D Backend LBP Method: 1 .
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/sg4.
LTFS15023I Formatting failed.
jgreen24 commented 1 year ago

v2.4.5.0-10502 doesn't have this fix included:

https://github.com/LinearTapeFileSystem/ltfs/blob/v2.4.5.0-10502/src/tape_drivers/linux/sg/sg_tape.c#L2965 https://github.com/LinearTapeFileSystem/ltfs/blob/15aea0c98d41c0e86dbcf1d3366024b494e77625/src/tape_drivers/linux/sg/sg_tape.c#L2965

vguilleaume commented 1 year ago

Thanks @jgreen24 for your update,

Sorry for the confusion, i had in mind that the version https://github.com/LinearTapeFileSystem/ltfs/tree/v2.4.5.0-10502 included this fix.

Then i believe, only master has this fix ?

jgreen24 commented 1 year ago

That's right @vguilleaume, at the moment only master has this fix included.

jgreen24 commented 1 year ago

Going to close this, please use master for this fix. Feel free to reopen the issue if you have any other questions!