ISCSI initiator tape problem

Bithost

New Member
Jun 2, 2024
11
0
1
Hello,
I use PVE for tape ISCSI target and PBS(VM) for tape ISCSI initiator, but I inventory add tape or format tape or Eject tape PBS display "rewind failed - Illegal Request, Additional sense: Invalid message error"
Code:
root@pbs:~# proxmox-tape drive list
┌───────┬────────────────────────────────────┬─────────┬────────┬────────────────┬────────────┐
│ name  │ path                               │ changer │ vendor │ model          │ serial     │
╞═══════╪════════════════════════════════════╪═════════╪════════╪════════════════╪════════════╡
│ tape1 │ /dev/tape/by-id/scsi-HUJ6306JHP-sg │         │ HP     │ Ultrium_5-SCSI │ HUJ6306*** │
└───────┴────────────────────────────────────┴─────────┴────────┴────────────────┴────────────┘

I try use window(VM) ISCSI initiator , it's worked, it's can format LTFS and read write data.
And i use pcie passthrough tape HBA to PBS, it's worked.
 
Last edited:
does it work on the pbs install when using the 'mt' tool ? (you may need to install it with 'apt install mt-st' )
 
does it work on the pbs install when using the 'mt' tool ? (you may need to install it with 'apt install mt-st' )

root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP-sg status
/dev/tape/by-id/scsi-HUJ6306JHP-sg: Operation not permitted
root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x58 (LTO-5).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN


But, path is "/dev/tape/by-id/scsi-HUJ6306JHP-sg" in "proxmox-tape drive list",
 
Last edited:
But, path is "/dev/tape/by-id/scsi-HUJ6306JHP-sg" in "proxmox-tape drive list",
that's fine, but i meant if the 'rewind' command works there (the one that failed in your original post)
 
that's fine, but i meant if the 'rewind' command works there (the one that failed in your original post)
root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP rewind
root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP eject
root@pbs:~#

It's worked.
 
great, can you now test with 'pmt' ? this is our utility and should use the same code as our api/gui/etc.
 
great, can you now test with 'pmt' ? this is our utility and should use the same code as our api/gui/etc.
root@pbs:~# pmt status
using device /dev/tape/by-id/scsi-HUJ6306JHP-sg
{
"vendor": "HP",
"product": "Ultrium 5-SCSI",
"revision": "Y6NW",
"blocksize": 0,
"compression": true,
"buffer-mode": 1,
"density": "LTO5",
"alert-flags": "(empty)"
}
root@pbs:~# pmt scan
/dev/tape/by-id/scsi-HUJ6306JHP-sg (HP/Ultrium_5-SCSI/HUJ6306JHP)
root@pbs:~# pmt rewind
using device /dev/tape/by-id/scsi-HUJ6306JHP-sg
Error: rewind failed - Illegal Request, Additional sense: Invalid message error
 
mhmm ok the same error, interesting

i'll check what can here be the error, but the command we send is rather simple it's just a scsi REWIND (01h) command

what you could also do would be to execute:

Code:
sg_raw -r 1k -vvv /dev/tape/by-id/scsi-HUJ6306JHP-sg 01 00 00 00 00 00

this is the same scsi command we use for rewind, so an error here could probably show more info

also do you see anything in the journal/syslog?

in parallel, could you check if there is maybe a firmware update for your drive? sometimes (especially for older ones) it fixes some issues
 
root@pbs:~# sg_raw -r 1k -vvv /dev/tape/by-id/scsi-HUJ6306JHP-sg 01 00 00 00 00 00
Attempt to decode cdb name: Rezero Unit
open /dev/tape/by-id/scsi-HUJ6306JHP-sg with flags=0x802
dxfer_buffer_in=0x61013da32000, length=1024
cdb to send: Rezero Unit [01 00 00 00 00 00]
sense_buffer=0x7ffedaa1d560, length=32
SCSI Status: Check Condition

Sense Information:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid message error
Raw sense data (in hex), sb_len=18, embedded_len=18
70 00 05 00 00 00 00 0a 00 00 00 00 49 00 00 00
00 00

Error 5 occurred, no data received
Illegal request, type: sense key, apart from Invalid opcode


Unable to upgrade firmware, no access to support center, but this firmware is not an old version.
And i use pcie passthrough tape HBA to PBS, it's worked, i guess it's not a firmware issue.
 
Last edited:
can you post the output of 'dmesg' after you ran the 'mt' and 'pmt' command once ?
 
mhmm ok nothing really relevant

would it be possible to attach the tape drive to the pbs directly instead of with iscsi?

the rewind command is one of the most basic iscsi tape commands, and since it does not work (even outside our code with sg_raw) there seems something wrong with either the communication to the drive, or the drive itself
 
mhmm ok nothing really relevant

would it be possible to attach the tape drive to the pbs directly instead of with iscsi?

the rewind command is one of the most basic iscsi tape commands, and since it does not work (even outside our code with sg_raw) there seems something wrong with either the communication to the drive, or the drive itself

The weird thing is that using the mt tool works fine.
 
The weird thing is that using the mt tool works fine.
does it also really rewind the tape? or does it just not return an error? the AFAICS the mt command uses the kernel driver to communicate which sends the same scsi command to the device...
 
does it also really rewind the tape? or does it just not return an error? the AFAICS the mt command uses the kernel driver to communicate which sends the same scsi command to the device...

I test is , it's can rewind and eject tape.

root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP rewind
root@pbs:~# tar rvf /dev/tape/by-id/scsi-HUJ6306JHP /root/proxmox-ve_8.2-1.iso
tar: Removing leading `/' from member names
/root/proxmox-ve_8.2-1.iso
tar: Removing leading `/' from hard link targets
root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP rewind
root@pbs:~# mt -f /dev/tape/by-id/scsi-HUJ6306JHP eject
root@pbs:~#

All successful
 
ok then im baffled, since the kernel shouldn't do anything differently than we, and even the raw scsi command does not work. so the only thing left to test would be either a different drive, or a different type of connection (e.g. directly instead of iscsi)
 
ok then im baffled, since the kernel shouldn't do anything differently than we, and even the raw scsi command does not work. so the only thing left to test would be either a different drive, or a different type of connection (e.g. directly instead of iscsi)
I use pcie passthrough tape HBA to PBS, everything is working fine.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!