You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to create pscsi backstore when tape drive is empty:
/backstores/pscsi> create dev=/dev/st1 name=pscsi_st1
Traceback (most recent call last):
File "/usr/bin/targetcli", line 330, in <module>
main()
File "/usr/bin/targetcli", line 317, in main
shell.run_interactive()
File "/usr/lib/python3.12/site-packages/configshell_fb/shell.py", line 900, in run_interactive
self._cli_loop()
File "/usr/lib/python3.12/site-packages/configshell_fb/shell.py", line 729, in _cli_loop
self.run_cmdline(cmdline)
File "/usr/lib/python3.12/site-packages/configshell_fb/shell.py", line 843, in run_cmdline
self._execute_command(path, command, pparams, kparams)
File "/usr/lib/python3.12/site-packages/configshell_fb/shell.py", line 818, in _execute_command
result = target.execute_command(command, pparams, kparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/configshell_fb/node.py", line 1406, in execute_command
return method(*pparams, **kparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/targetcli/ui_backstore.py", line 369, in ui_command_create
so = PSCSIStorageObject(name, dev)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/rtslib_fb/tcm.py", line 354, in __init__
self._configure(dev)
File "/usr/lib/python3.12/site-packages/rtslib_fb/tcm.py", line 391, in _configure
if is_dev_in_use(udev_path):
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/rtslib_fb/utils.py", line 125, in is_dev_in_use
os.close(file_fd)
OSError: [Errno 123] No medium found
This is because rtslib-fb attempts to open the device to check whether it is used. This will never work on an empty tape drive. Opening the tape device will always fail is the drive is empty (by design).
As a workaround, a tape can be inserted into the drive at the moment of creating the pscsi backend.
The text was updated successfully, but these errors were encountered:
rkujawa
changed the title
Trying to create SCSI passthrough backend using tape device fails when the tape drive is empty
Trying to create SCSI passthrough backstore using tape device fails when the tape drive is empty
Jan 30, 2024
It's not possible to create pscsi backstore when tape drive is empty:
This is because rtslib-fb attempts to open the device to check whether it is used. This will never work on an empty tape drive. Opening the tape device will always fail is the drive is empty (by design).
As a workaround, a tape can be inserted into the drive at the moment of creating the pscsi backend.
The text was updated successfully, but these errors were encountered: