Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError in get_blockdev_type creating block backstore of SD card #119

Open
tjnycum opened this issue Jun 12, 2018 · 0 comments
Open

ValueError in get_blockdev_type creating block backstore of SD card #119

tjnycum opened this issue Jun 12, 2018 · 0 comments

Comments

@tjnycum
Copy link

tjnycum commented Jun 12, 2018

$ sudo targetcli
targetcli shell version 2.1.fb43
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/backstores/block> ls
o- block ...................................................................................................... [Storage Objects: 0]
/backstores/block> create sdcard /dev/mmcblk0
Traceback (most recent call last):
File "/usr/bin/targetcli", line 121, in
main()
File "/usr/bin/targetcli", line 111, in main
shell.run_interactive()
File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 894, in run_interactive
self._cli_loop()
File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 723, in _cli_loop
self.run_cmdline(cmdline)
File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 837, in run_cmdline
self._execute_command(path, command, pparams, kparams)
File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 812, in _execute_command
result = target.execute_command(command, pparams, kparams)
File "/usr/lib/python3/dist-packages/configshell_fb/node.py", line 1406, in execute_command
return method(*pparams, **kparams)
File "/usr/lib/python3/dist-packages/targetcli/ui_backstore.py", line 409, in ui_command_create
so = BlockStorageObject(name, dev, readonly=readonly, wwn=wwn)
File "/usr/lib/python3/dist-packages/rtslib_fb/tcm.py", line 672, in init
self._configure(dev, wwn, readonly)
File "/usr/lib/python3/dist-packages/rtslib_fb/tcm.py", line 681, in _configure
if get_blockdev_type(dev) != 0:
File "/usr/lib/python3/dist-packages/rtslib_fb/utils.py", line 200, in get_blockdev_type
disk_type = int(fread("/sys/block/%s/device/type" % os.path.basename(dev)))
ValueError: invalid literal for int() with base 10: 'SD'

I don't know which of the three repos this issue would best be attached to (this one, configshell-fb, or rtslib-fb), so apologies if this is the wrong one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant