Hi Andrew,
On 10/15/2014 03:51 PM, Andrew Watt wrote:
Thanks for getting back to me Jerome; very much appreciated.
You're welcome.
My major device number is as you expected:
brw-rw---- 1 root cdrom 11, 0 Oct 15 11:29 /dev/sr0
OK.
And I'd also spotted a discussion on device numbers under a ZFS thread (https://github.com/zfsonlinux/zfs/issues/515), but I didn't want to hack around without a bit more reassurance; so thanks again.
Yes, same idea.
I added ZFS zvols to the list back then.
I tried to add your suggestion to utils.py, but this this caused targetcli to error when I attempted to create the iblock backstore:
/backstores/iblock> create name=cdrom dev=/dev/sr0
Generating a wwn serial.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 983, in run_interactive
self._cli_loop()
File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 806, in _cli_loop
self.run_cmdline(cmdline)
File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 927, in run_cmdline
self._execute_command(path, command, pparams, kparams)
File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 902, in _execute_command
result = target.execute_command(command, pparams, kparams)
File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line 101, in execute_command
pparams, kparams)
File "/usr/lib/python2.7/dist-packages/configshell/node.py", line 1405, in execute_command
result = method(*pparams, **kparams)
File "/usr/lib/python2.7/dist-packages/targetcli/ui_backstore.py", line 381, in ui_command_create
raise exception
IOError: [Errno 30] Read-only file system
Out of the top of my head, I can't tell if this is the targetcli stack
trying to perform some IO there (I can't imagine why) or if this is the
reason why we did not include cdroms to allwoed TYPE_DISK devices for
iblock.
Could you please give me the rtslib and targetcli versions you are using
so I can take a look at the code?
So I clearly don't know what I'm doing here; do I need to recompile compile this file, or something similar?
No, what you did is fine.
You didn't know that you _did_ know what you did :-)
Removing this additional line resolves these errors, but takes me back to the original issue.
<nod>
WRT using the CDROM as a pscsi blockstore: everything that I've tried (music CDs, movie DVDs) is detected by the laptop, it plays the media correctly, and the CD try is ejected on command from the laptop.
Unfortunately, not all is well. It does get into a bit of a twist when the server has accessed the CDROM (a mount, ls, and then unmount). The laptop can no-longer eject the CD tray, and the eject button on the CDROM will not work. I can eject the CD tray from the server command line, but only a server reboot will resolve the problem for the laptop. Not great, but good enough for my limited use case.
Maybe Nic would have an idea of what this is.
As far as I know, the ALLOW_MEDIUM_REMOVAL opcode should be supported by
both fileio and iblock.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html