ltfs
ltfs copied to clipboard
mkltfs -d for LTO-8 HH results in unknown sense code 054a00 leading to unknown error code -29998
Describe the bug
When calling mkltfs -d /dev/sg1
for an IBM LTO-8 HH, mkltfs states unknown sense code 054a00
multiple times in very short time which results in unknown error code -29998
and leads to failing the formatting.
To Reproduce On my Ubuntu 12.04 system with a LSI SAS 9201-16i and an IBM LTO-8 HH it can be reproduced by the following steps:
- open terminal
-
sudo su
- power up the LTO-8 tape drive
- insert a LTO-8 tape
-
ltfs -o device_list
to get the device name (error occurs also without this command) -
mkltfs -d /dev/sg1
Expected behavior mkltfs should beginn to format the LTO-8 tape with LTFS and finish gracefully.
System
- OS: Ubuntu 12.04
- LTFS: LTFS version 2.4.4.0 (10470)
- Tape Drive: IBM LTO-8 HH
Additional information Here is the exact outout from my terminal:
# ltfs -o device_list
a62 LTFS14000I LTFS starting, LTFS version 2.4.4.0 (10470), log level 2.
a62 LTFS14058I LTFS Format Specification version 2.4.0.
a62 LTFS14104I Launched by "ltfs -o device_list".
a62 LTFS14105I This binary is built for Linux (x86_64).
a62 LTFS14106I GCC version is 4.6.3.
a62 LTFS17087I Kernel version: Linux version 3.11.0-15-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 i386.
a62 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
a62 LTFS17089I Distribution: NAME="Ubuntu".
a62 LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
Device Name = /dev/sg1 (32.0.1.0), Vendor ID = IBM , Product ID = ULTRIUM-HH8 , Serial Number = [REMOVED], Product Name =[ULTRIUM-HH8].
# mkltfs -d /dev/sg1
LTFS15000I Starting mkltfs, LTFS version 2.4.4.0 (10470), log level 2.
LTFS15041I Launched by "mkltfs -d /dev/sg1".
LTFS15042I This binary is built for Linux (x86_64).
LTFS15043I GCC version is 4.6.3.
LTFS17087I Kernel version: Linux version 3.11.0-15-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 i386.
LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
LTFS17089I Distribution: NAME="Ubuntu".
LTFS15003I Formatting device '/dev/sg1'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.
LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x2192f20).
LTFS17085I Plugin: Loading "sg" tape backend.
LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg1).
LTFS30250I Opened the SCSI tape device 32.0.1.0 (/dev/sg1).
LTFS30207I Vendor ID is IBM .
LTFS30208I Product ID is ULTRIUM-HH8 .
LTFS30214I Firmware revision is M571.
LTFS30215I Drive serial is [REMOVED].
LTFS30285I The reserved buffer size of /dev/sg1 is 524288.
LTFS30294I Setting up timeout values from RSOC.
LTFS17160I Maximum device block size is 1048576.
LTFS11330I Loading cartridge.
LTFS30287I Received an unknown sense code 054a00.
LTFS30205I READPOS (0x34) returns -29998.
LTFS30263I READPOS returns Unknown Error code (-29998) /dev/sg1.
LTFS30287I Received an unknown sense code 054a00.
LTFS30205I READPOS (0x34) returns -29998.
LTFS30263I READPOS returns Unknown Error code (-29998) /dev/sg1.
LTFS12019E Cannot load the medium: failed to determine medium position (-29998).
LTFS11331E Failed to load the cartridge (ltfs_load_tape).
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS15049I Checking the medium (mount).
LTFS30287I Received an unknown sense code 054a00.
LTFS30205I READPOS (0x34) returns -29998.
LTFS30263I READPOS returns Unknown Error code (-29998) /dev/sg1.
LTFS30287I Received an unknown sense code 054a00.
LTFS30205I READPOS (0x34) returns -29998.
LTFS30263I READPOS returns Unknown Error code (-29998) /dev/sg1.
LTFS12019E Cannot load the medium: failed to determine medium position (-29998).
LTFS11006E Cannot read volume: failed to load the tape.
LTFS30252I Logical block protection is disabled.
LTFS15023I Formatting failed.
It can be heard from the reaction of the tape drive that it receives and reacts to the commands of mkltfs.
If I would guess, it seems to me that mkltfs does not wait for the drive to fully load the cadrige and as the unknown sense code 054a00
occurs multiple times in a row like each 200ms or so, I would guess that mkltfs just retries something and gives up because the tape is not yet fully loaded and in position for formatting resulting in failure of the whole process.
I really don't know but could it be the case that LTFS has just to handle the sense code 054a00
and by waiting for the drive to fully load the cadrige?
I truly hope so because I really need to get this LTO drive working with LTFS for an urgent backup of mission critical data.
In the SCSI spec of IBM LTO drives, sense 5 4a00 is not defined. So I don't know why the drive complains against READPOS command.
https://www.ibm.com/support/pages/system/files/inline-files/LTO%20SCSI%20Reference%20(EXTERNAL-18Aug2021)_1.pdf#page505
And the log below implies this drive has invalid vital product data because drive serial is [REMOVED]
. Please contact to IBM support as a hardware issue.
LTFS30215I Drive serial is [REMOVED].
First of all: Thanks for having a look into this issue.
I removed the drive serial from the log und replaced it with [REMOVED]
because I considered it sensitive information and unneccessary for this technical issue. Perhaps I should have mentioned this in the first place. The drive serial is printed normally by mkltfs and if you need the serial for investigating this issue, I can re-add it.
I have actually an Overland Tandberg LTO-8 HH tape drive. I assumed this tape drive would be internally identical to an IBM LTO-8 HH because in the mkltfs output, it printed LTFS30207I Vendor ID is IBM .
So I thought 'IBM LTO-8 HH tape drive' would be technically the correct term. Guess I was wrong.
I had a look into the document you linked and I can't find sense 5 4a00 anywhere, too. I also tried to find a SCSI reference for LTO on the Overland Tandberg site, but the only thing I managed to get a hold of was this document:
https://ftp1.overlandtandberg.com/public/techsupportdocs/external/10400934-001.pdf
There I found at least this information:
They support all the SCSI commands described in the Ultrium SCSI command specification: IBM® TotalStorage® LTO Ultrium Tape Drive SCSI Reference.
It seems they suppord additional sense codes, too. Should I contact the Overland Tandberg technical support and ask for the meaning of that sense code or if they have a reference document for the additional Overland Tandberg sense codes? It would be fantastic if LTFS could (even experimentally) support Overland Tandberg LTO-8 drives.
I removed the drive serial from the log und replaced it with [REMOVED] because I considered it sensitive information and unneccessary for this technical issue.
OK. I got.
First READPOS error was logged by calling the readpos()
function in https://github.com/LinearTapeFileSystem/ltfs/blob/f9fd417e00642275b4cf64494ddde23f47b924f0/src/tape_drivers/linux/sg/sg_tape.c#L2661, just after LOAD
command was successfully finished in sg_load()
. And this was ignored because LOAD
command returned GOOD status.
LTFS11330I Loading cartridge.
LTFS30287I Received an unknown sense code 054a00.
LTFS30205I READPOS (0x34) returns -29998.
LTFS30263I READPOS returns Unknown Error code (-29998) /dev/sg1.
LTFS30287I Received an unknown sense code 054a00.
Second one is logged by calling the readpos()
function in https://github.com/LinearTapeFileSystem/ltfs/blob/f9fd417e00642275b4cf64494ddde23f47b924f0/src/libltfs/tape.c#L418, just after backend's load()
call in tape_load_tape()
. And this was not ignored because it is purely command error.
LTFS30287I Received an unknown sense code 054a00.
LTFS30205I READPOS (0x34) returns -29998.
LTFS30263I READPOS returns Unknown Error code (-29998) /dev/sg1.
LTFS12019E Cannot load the medium: failed to determine medium position (-29998).
LTFS11331E Failed to load the cartridge (ltfs_load_tape).
From the tape drive perspective, it doesn't make sense the drive returns an Illegal Request
error (Sense_key 5) against READPOS
at all because previous LOAD
command was successfully done. The drive shall return partiton=0, position=0 against READPOS
command in this situation.
We must not ignore the 5/4a00
error and I think we can't define any recover action action against this error.
I recommend to contact the Overland Tandberg technical support and ask what is sense 5/4a00 and what it was reported in READPOS
even if previous LOAD
command had GOOD
response.
Tandberg LTO-8 drives are OEM IBM drives. It's really odd to see this ASC/ASCQ combination. It shows up with Sense Key 0BH (Aborted command), and then means Command Phase Error. This is a remnant of parallel SCSI busses, I'd not expect that to show up these days. A wild guess might be a mis-behaving SAS adapter or cable, try some swapping and see if this behaviour can be eliminated? Are there any SATA devices on the same adapter that may cause issues?
A wild guess might be a mis-behaving SAS adapter or cable, try some swapping and see if this behaviour can be eliminated?
I guess it too. I think it is worth to try this.
Are there any SATA devices on the same adapter that may cause issues?
I don't know at this time at all.
Close this because there is no response for a long time.