targetcli trouble on new proxmox install

geronimobb

Well-Known Member
Apr 22, 2017
33
1
48
50
On a new proxmox install targetcli seems not to work anymore as it should. When making blocks in blockstore, i receive 'Could not create _Backstore in configFS'. On certain commands it even crashes:

Traceback (most recent call last):
File "/usr/bin/targetcli", line 121, in <module>
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 169, in ui_command_delete
child.rtsnode.delete()
File "/usr/lib/python3/dist-packages/rtslib_fb/tcm.py", line 237, in delete
super(StorageObject, self).delete()
File "/usr/lib/python3/dist-packages/rtslib_fb/node.py", line 202, in delete
os.rmdir(self.path)
OSError: [Errno 30] Read-only file system: '/sys/kernel/config/target/core/iblock_0/...'

Strange thing is, on another proxmox server, with the same version of the package targetcli-fb, everything works fine.
This 2nd proxmox server however runs on a single ssd, and the iscsi targets are made on an external zfs raid5. The first proxmox server run on a zfs raid1 (2xssd), but the problems occur there always, on the rpool zfs raid1 and other zfs systems.
Anyone any idea?
Thanks in advance!

* update: it is possible to do whatever i need with targetcli direct after booting proxmox, before all the containers and vm's have booted. Once booted completely, mentioned problems are there.
 
Last edited:
On a new proxmox install targetcli seems not to work anymore as it should. When making blocks in blockstore, i receive 'Could not create _Backstore in configFS'. On certain commands it even crashes:

Traceback (most recent call last):
File "/usr/bin/targetcli", line 121, in <module>
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 169, in ui_command_delete
child.rtsnode.delete()
File "/usr/lib/python3/dist-packages/rtslib_fb/tcm.py", line 237, in delete
super(StorageObject, self).delete()
File "/usr/lib/python3/dist-packages/rtslib_fb/node.py", line 202, in delete
os.rmdir(self.path)
OSError: [Errno 30] Read-only file system: '/sys/kernel/config/target/core/iblock_0/...'

Strange thing is, on another proxmox server, with the same version of the package targetcli-fb, everything works fine.
This 2nd proxmox server however runs on a single ssd, and the iscsi targets are made on an external zfs raid5. The first proxmox server run on a zfs raid1 (2xssd), but the problems occur there always, on the rpool zfs raid1 and other zfs systems.
Anyone any idea?
Thanks in advance!

* update: it is possible to do whatever i need with targetcli direct after booting proxmox, before all the containers and vm's have booted. Once booted completely, mentioned problems are there.


Testing several configuration variants I did not encounter any problems at all. Seems that something in your configuration is wrong resp. destroyed.
 
Thanks for the follow up!

I installed and configured the iscsi targets following the steps from:
https://deepdoc.at/dokuwiki/doku.ph...lxc:proxmox_debian_als_iscsi_server_verwenden

Following my earlier remark, as long as i don't start any container, after rebooting the proxmox server, i can do everything i want with targetcli. VM's can be started. From the moment i start one container, the problems start.

I reinstalled proxmox from scratch, because of this problem. But the problem stayed. On my second proxmox server these problems do not exist.
The difference between the two is that the one who has problems with targetcli, boots from a zfs RAIDZ1, and i installed the iscsi target on the same zfs system, next to zvol's of proxmox. The second proxmox who has no problems with targetcli boots from a single ssd, and the iscsi targets are installed on another zfs system (not boot).

Any idea where to look specific in the configuration? Can you describe shortly your testing environment (fe iscsi targets on a zfs raid boot? If they are similar, it has sense enough to reinstall (again). Thanks in advance!
 
Any idea where to look specific in the configuration?

Try to use a different (i.e. not a zvol) as backstore. Alter also some other configuration (e.g. file i/o instead) in order to figure out what the neuralgic point may be.


Can you describe shortly your testing environment (fe iscsi targets on a zfs raid boot? If they are similar, it has sense enough to reinstall (again).

OS at zfs, lvm etc., iSCSI targetat physical device, partition or file i/o.
 

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!