Closed francescoemiliani closed 11 months ago
I have shared a tape drive via pSCSI before, but it's been a few years.
The message you are asking about isn't from any tape-specific issue. This message is because rtslib-fb is trying to set your database root directory to /etc/target, but the directory does not exist. This is where your backups go for your targetcli configuration, and where saveconfig.json goes. Try "mkdir /etc/target". The rtslib-fb package should have created this directory when you installed it. (I actually wrote this code, so it's familiar.) How did you install the rtslib-fb package?
As far as your SCSI problems, I'm not sure what the issue is, but your kernel seems to dislike something you are doing with pSCSI. I would check with your distribution. Do you have the latest or a recent kernel? What command(s) are you using to talk to the tape drive once it shows up remotely? Does "mt status" work on it? As far as distributions, I used Tumbleweed when I did my proof of concept for a Linux Conference. But it sounds like you're setting it up correctly ...
Hello,
I currently don't have access to a tape drive for my test, so I have no idea if with a tape drive works good. As I said, I used target-cli for a BD drive (optical, BluRay), or in a vm with a sata virtual cd rom drive (this, only tor test purpose).
I recreated a clean install of Debian stable, updated, and system freeze totally, the same way as rockylinux and archlinux.
In Debian stable there are no "rtslib-fb" package, but there is a "python3-rtslib-fb" (that I installed obviously)
I will try to make /etc/target
Tried do make /etc/target, but nothing work. When I save config the output is:
Configuration saved to /etc/rtslib-fb-target/saveconfig.json
I think it used this path and not /etc/target, is good?
When the initiator try to mount the device the pSCSI: failed to append bio
persist, there are also other message:
BUG: kernel NULL pointer dereference, address: 0000000000000008
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
and also
note: iscsi_trx[816] exited with irqs disabled
Sometime system freeze completely and needs to hard reset (with archlinux and rockylinux system freeze all time)
EDIT:
small update, on a rockylinux clean install, targetcli save config correctly on "/etc/target". On rocky, when the initiator login, the target system freeze totally. Always on Rocky, when I hard reset the machine, targetcli is in a clean state (lost all config)
EDIT2:
on a Tumbleweed fresh install, same identical issue (except for error relative to /etc/target), system not freeze but all the other error are present
This is not a problem in rtslib/targetcli but at lower level (kernel), also you should consider the fact that pSCSI means passthrough (passthrough of commands without emulation) and this is known to not work well with some devices
many thanks for your reply! Yes I know that pscsi is a passthrought, several years ago I have this exactly box with the same identical hardware (except cpu and ram), and it worked fine! I was interested in ZFS then I moved all iSCSI and FC to Solaris. Now ZFS works very well on linux, and with the new oracle policies (CBE release instead of GA), I wanted to go back to Linux, but now there are trouble with SCSI, I'm lucky!! In these years evidently something has changed in the linux kernel, thanks again for your kindly replys!
Hi, I'm trying to share my BD and Tape drive (not tried yet) over iscsi (and FC, but currently all HBA are not available for my test). I try this barebone (a supermicro motherboard), and in a VM. The result are the same. I can't play too much with real hardware so, this is my test with VM.
I try to expose a disk with block backstore, no issue, all works good.
When I try to expose my BD drive (or, in this case, a virtual VM CDROM drive) with pSCSI backstore, something not works. I can login with initiator, lsscsi works, lsblk the same (also show correctly medium size), but i can't access the device. When I try to mount (or pv, dd), it hangs for a while, then "no medium found". The output of dmesg of the target machine is not happy, there are some errors:
This is a more complete output: https://pastebin.com/3Vjhkejw
I try this in Debian, archlinux (with the latest version of targetcli) and rockylinux (that freeze completely). Can be something about the kernel driver?
I wish you a pleasant day!
PS: sorry for my language... I'm a disaster