[Plugins] iSCSI GUI and ISCSI Target


SimonF

Recommended Posts

35 minutes ago, ich777 said:

Looking good to me, here is a screenshot from my system:

grafik.thumb.png.630810494be5e888a7c91a71a9082cfd.png

 

I don't think that's necessary, I see you are trying to connect from a Linux initiator, maybe you have to turn off Authentication on that system or turn it on in iSCSI (but you have to do that through the command line if you really want to), for home use I would recommend to turn off Authentication.

It stopped working over night, not sure if there was an unraid update or an windows update before it happened.

Still, no matter what I try, Windows10 says "Authorization Failure"

Link to comment
6 minutes ago, isvein said:

Still, no matter what I try, Windows10 says "Authorization Failure"

Look at your acls there is a IQN in there with "linux" and you say that you want to connect from Windows, there is something wrong with your config.

 

Windows usually has "microsoft" in there not "linux".

Link to comment
35 minutes ago, ich777 said:

Look at your acls there is a IQN in there with "linux" and you say that you want to connect from Windows, there is something wrong with your config.

 

Windows usually has "microsoft" in there not "linux".

There we go :D
I had to map the LUN to the remote IGN (windows pc) (Under Settings-->Iscsi-->initiators-->Create IQN)
I cant remember I had to do that before tho, has there lately been an iscsi update that require you to do this manually? Or maybe the config for it dropped during one of the rc updates.

iscsi3.PNG

Edited by isvein
Link to comment
3 minutes ago, isvein said:

I cant remember I had to do that before tho, has there lately been an iscsi update that require you to do this manually? Or maybe the config for it dropped during one of the rc updates.

To both things no...

 

Seems like something messed up your config, but I don't think this was caused by an RC update or something like that.

  • Like 1
Link to comment
4 minutes ago, ich777 said:

To both things no...

 

Seems like something messed up your config, but I don't think this was caused by an RC update or something like that.

Who knows, I guess we never find out, but Im glad its working now and if the same happens again I know where to start :)
Thanks for the help.

  • Like 1
Link to comment
  • 1 month later...

在unraid系统6.10.3下更新iscsi插件到2022.04.22版本,pc上没有iscsi链接。查看插件状态栏什么都不显示,安装栏内已有信息无法删除,移除iscsi插件并删除U盘插件内容后,重新安装,硬盘无法选择,安装栏没有信息。

 

Link to comment

Hey ! 

 

Firstly, sorry for my bad english.

 

Today, I want use iSCSI on unraid for my steam and origin library. 

With SMB sharing, no problem, I've continues between 110 - 113mo/s transfer rate.

 

With iSCSI, it's very strange. My transfer rate fall to 0mo/s during 3-4 sec, and go to 110mo/s during 3-4 sec... My disk in use 100%...

 

My problem it's for write data, when I read data the transfer rate is good.

 

I haven't see a similar problem on this topic. Have you an idea ?

2022-07-02 (2).png

Edited by nolhan6417
forgot important information of my problem
Link to comment
4 hours ago, laidou said:

升级到最新版后,状态栏空白,安装栏里内容无法删除。PC上无iscsi链接,无法连到磁盘

 

Can you provide the output for:, It works for me on 6.10.3 and current version. Also does targetcli work for you?

 

[email protected]:~# ls -l /root/.targetcli/prefs.bin
lrwxrwxrwx 1 root root 39 Jul  3 07:35 /root/.targetcli/prefs.bin -> /boot/config/iscsi/.targetcli/prefs.bin
[email protected]:~# ls -l /etc/target/saveconfig.json
lrwxrwxrwx 1 root root 34 Jul  3 07:35 /etc/target/saveconfig.json -> /boot/config/iscsi/saveconfig.json
[email protected]:~# targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 2]
  | | o- UNRAID .................................................... [/mnt/user/pxeboot/UNRAID.img (20.0GiB) write-back deactivated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- unraidboot ................................................................ [unraidboot.img (20.0MiB) write-back activated]
  | |   o- alua ................................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.tower.x8664:sn............. ........................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.1991-05.com.microsoft:desktop-xxxxxxxx............................................................ [Mapped LUNs: 1]
  |     |   o- mapped_lun0 ........................................................................... [lun0 fileio/unraidboot (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun0 .......................................................... [fileio/unraidboot (unraidboot.img) (default_tg_pt_gp)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]
  o- xen-pvscsi ....................................................................................................... [Targets: 0]
[email protected]:~# targetcli -v
/usr/bin/targetcli version 2.1.54
[email protected]:~# 

 

Link to comment
6 hours ago, SimonF said:
7 hours ago, SimonF said:

 

Can you provide the output for:, It works for me on 6.10.3 and current version. Also does targetcli work for you?

 

[email protected]:~# ls -l /root/.targetcli/prefs.bin
lrwxrwxrwx 1 root root 39 Jul  3 07:35 /root/.targetcli/prefs.bin -> /boot/config/iscsi/.targetcli/prefs.bin
[email protected]:~# ls -l /etc/target/saveconfig.json
lrwxrwxrwx 1 root root 34 Jul  3 07:35 /etc/target/saveconfig.json -> /boot/config/iscsi/saveconfig.json
[email protected]:~# targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 2]
  | | o- UNRAID .................................................... [/mnt/user/pxeboot/UNRAID.img (20.0GiB) write-back deactivated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- unraidboot ................................................................ [unraidboot.img (20.0MiB) write-back activated]
  | |   o- alua ................................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.tower.x8664:sn............. ........................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.1991-05.com.microsoft:desktop-xxxxxxxx............................................................ [Mapped LUNs: 1]
  |     |   o- mapped_lun0 ........................................................................... [lun0 fileio/unraidboot (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun0 .......................................................... [fileio/unraidboot (unraidboot.img) (default_tg_pt_gp)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]
  o- xen-pvscsi ....................................................................................................... [Targets: 0]
[email protected]:~# targetcli -v
/usr/bin/targetcli version 2.1.54
[email protected]:~# 

 

 

2.1.54版本可以正常在unraid6.10.3上运行,升级至2022.04.22后出现问题。

Link to comment
  • 3 weeks later...
9 minutes ago, zxhaxdr said:

Hi,

 

It seems that I cannot remove the fileio because the button is greyed out. Everything else can be removed though.

I'm using unraid 6.10.3. Thanks

 

2022-07-23.png

Working ok on my machine, but I will continue to see if I can recreated.

 

image.thumb.png.1bd81fdaafabb33ffdbd491b1a4e4c49.png

Link to comment
11 minutes ago, SimonF said:

Working ok on my machine, but I will continue to see if I can recreated.

 

image.thumb.png.1bd81fdaafabb33ffdbd491b1a4e4c49.png

What I remember I did is. If I remember, at first, it does work, however it doesn't really delete the img under the /mnt. So I manually removed the .img and created another fileio. Since then, the button is forever greyed out.

 

BTW, I didn't create the fileio under /mnt/user but under ZFS /mnt/**pool like that.

Link to comment
35 minutes ago, zxhaxdr said:

What I remember I did is. If I remember, at first, it does work, however it doesn't really delete the img under the /mnt. So I manually removed the .img and created another fileio. Since then, the button is forever greyed out.

 

BTW, I didn't create the fileio under /mnt/user but under ZFS /mnt/**pool like that.

The button enables as soon as you click on a check box, doesn't check any physical files/locations. This will just be processed by the local browser, maybe close your browser and try again?

Link to comment
On 7/23/2022 at 12:53 PM, SimonF said:

The button enables as soon as you click on a check box, doesn't check any physical files/locations. This will just be processed by the local browser, maybe close your browser and try again?

Thank you for the reply. Still doesn't work. Even in the incognito mode. Maybe the frontend isn't rendered properly. I removed the plugin and reinstalled but that doesn't help. At some point it's broken, and it's broken forever. I will look into in to get more info sometime.

Edited by zxhaxdr
Link to comment

@zxhaxdr It is working fine on all of my machines.

 

you can edit this line echo '<input id="removeFileIO" disabled type="submit"  value="'._('Remove Fileio').'" onclick="removeFIO();" '.'>';

 

in (around line 170) 

 

/usr/local/emhttp/plugins/unraid.iSCSI/include/ISCSI.php

 

and remove the disabled word to get it to work. If you run your browser in debug(F12) do you see any errors on the console.

Edited by SimonF
Link to comment
14 minutes ago, SimonF said:

@zxhaxdr It is working fine on all of my machines.

 

you can edit this line echo '<input id="removeFileIO" disabled type="submit"  value="'._('Remove Fileio').'" onclick="removeFIO();" '.'>';

 

in (around line 170) 

 

/usr/local/emhttp/plugins/unraid.iSCSI/include/ISCSI.php

 

and remove the disabled word to get it to work. If you run your browser in debug(F12) do you see any errors on the console.

I have found the problem.

 

In,


$("#ft1 input[type='checkbox']").change(function() {
  var matches = document.querySelectorAll("." + this.className);
  for (var i=0, len=matches.length|0; i<len; i=i+1|0) {
    matches[i].checked = this.checked ? true : false;
  }
  $("#removeFileIO").attr("disabled", false);
 });
 

method querySelectorAll() throws exception

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': '.000test' is not a valid selector.
    at HTMLInputElement.<anonymous> (<anonymous>:3:26)

 

See the fileIO name is 000test and it seems it desen't like digits in the front. Other name formats are fine, e.g., test or test_test.

 

So I think we need to regulate the class name by adding a prefix or something.

Cheers

Edited by zxhaxdr
Link to comment
3 minutes ago, zxhaxdr said:

I have found the problem.

 

In,


$("#ft1 input[type='checkbox']").change(function() {
  var matches = document.querySelectorAll("." + this.className);
  for (var i=0, len=matches.length|0; i<len; i=i+1|0) {
    matches[i].checked = this.checked ? true : false;
  }
  $("#removeFileIO").attr("disabled", false);
 });
 

method querySelectorAll() throws exception

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': '.000test' is not a valid selector.
    at HTMLInputElement.<anonymous> (<anonymous>:3:26)

 

See the fileIO name is 000test and it seems it desen't like digits in the front. Other name formats are fine, e.g., test or test_test.

 

So I think we need to regulate the class name by adding a prefix or something.

Cheers

Thanks for letting me know, will look to see if I can fix that in a future release.

 

 

  • Like 1
Link to comment
44 minutes ago, zxhaxdr said:

I have found the problem.

 

In,


$("#ft1 input[type='checkbox']").change(function() {
  var matches = document.querySelectorAll("." + this.className);
  for (var i=0, len=matches.length|0; i<len; i=i+1|0) {
    matches[i].checked = this.checked ? true : false;
  }
  $("#removeFileIO").attr("disabled", false);
 });
 

method querySelectorAll() throws exception

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': '.000test' is not a valid selector.
    at HTMLInputElement.<anonymous> (<anonymous>:3:26)

 

See the fileIO name is 000test and it seems it desen't like digits in the front. Other name formats are fine, e.g., test or test_test.

 

So I think we need to regulate the class name by adding a prefix or something.

Cheers

targetcli crashes also so need to make sure name starts with an alpha.

 

/backstores/fileio> ls
o- fileio ..................................................................................................... [Storage Objects: 6]
  o- 000test ..................................................... [/mnt/user/VM2s/VM2s/000test.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test ....................................................... [/mnt/user/VM2s/VM2s/testtest.img (5.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test2 ......................................................... [/mnt/user/VM2s/VM2s/test2.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test3 ......................................................... [/mnt/user/VM2s/VM2s/test3.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test4 ......................................................... [/mnt/user/VM2s/VM2s/test4.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test5 ......................................................... [/mnt/user/VM2s/VM2s/test5.img (1.0MiB) write-thru deactivated]
    o- alua ....................................................................................................... [ALUA Groups: 1]
      o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
/backstores/fileio> delete 000test
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 4, in <module>
    __import__('pkg_resources').run_script('targetcli-fb==2.1.54', 'targetcli')
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 665, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1470, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/lib/python3.9/site-packages/targetcli_fb-2.1.54-py3.9.egg/EGG-INFO/scripts/targetcli", line 329, in <module>
  File "/usr/lib/python3.9/site-packages/targetcli_fb-2.1.54-py3.9.egg/EGG-INFO/scripts/targetcli", line 317, in main
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 900, in run_interactive
    self._cli_loop()
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 729, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 843, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 818, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/node.py", line 1406, in execute_command
    return method(*pparams, **kparams)
  File "/usr/lib/python3.9/site-packages/targetcli_fb-2.1.54-py3.9.egg/targetcli/ui_backstore.py", line 309, in ui_command_delete
  File "/usr/lib/python3.9/site-packages/rtslib_fb-2.1.74-py3.9.egg/rtslib_fb/tcm.py", line 269, in delete
  File "/usr/lib/python3.9/site-packages/rtslib_fb-2.1.74-py3.9.egg/rtslib_fb/tcm.py", line 215, in _gen_attached_luns
NotADirectoryError: [Errno 20] Not a directory: '/sys/kernel/config/target/iscsi/cpus_allowed_list'
[email protected]:/usr/local/emhttp/plugins/usb_manager# 

 

Link to comment
33 minutes ago, SimonF said:

targetcli crashes also so need to make sure name starts with an alpha.

 

/backstores/fileio> ls
o- fileio ..................................................................................................... [Storage Objects: 6]
  o- 000test ..................................................... [/mnt/user/VM2s/VM2s/000test.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test ....................................................... [/mnt/user/VM2s/VM2s/testtest.img (5.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test2 ......................................................... [/mnt/user/VM2s/VM2s/test2.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test3 ......................................................... [/mnt/user/VM2s/VM2s/test3.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test4 ......................................................... [/mnt/user/VM2s/VM2s/test4.img (1.0MiB) write-thru deactivated]
  | o- alua ....................................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
  o- test5 ......................................................... [/mnt/user/VM2s/VM2s/test5.img (1.0MiB) write-thru deactivated]
    o- alua ....................................................................................................... [ALUA Groups: 1]
      o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
/backstores/fileio> delete 000test
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 4, in <module>
    __import__('pkg_resources').run_script('targetcli-fb==2.1.54', 'targetcli')
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 665, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1470, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/lib/python3.9/site-packages/targetcli_fb-2.1.54-py3.9.egg/EGG-INFO/scripts/targetcli", line 329, in <module>
  File "/usr/lib/python3.9/site-packages/targetcli_fb-2.1.54-py3.9.egg/EGG-INFO/scripts/targetcli", line 317, in main
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 900, in run_interactive
    self._cli_loop()
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 729, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 843, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/shell.py", line 818, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python3.9/site-packages/configshell_fb-1.1.29-py3.9.egg/configshell_fb/node.py", line 1406, in execute_command
    return method(*pparams, **kparams)
  File "/usr/lib/python3.9/site-packages/targetcli_fb-2.1.54-py3.9.egg/targetcli/ui_backstore.py", line 309, in ui_command_delete
  File "/usr/lib/python3.9/site-packages/rtslib_fb-2.1.74-py3.9.egg/rtslib_fb/tcm.py", line 269, in delete
  File "/usr/lib/python3.9/site-packages/rtslib_fb-2.1.74-py3.9.egg/rtslib_fb/tcm.py", line 215, in _gen_attached_luns
NotADirectoryError: [Errno 20] Not a directory: '/sys/kernel/config/target/iscsi/cpus_allowed_list'
[email protected]:/usr/local/emhttp/plugins/usb_manager# 

 

Mine works OK. It says cpu_allowed_list is not a directory in your case. Obviously, that is a file not a directory, and I don't have this file under that dir.

 

That should be something else because I don't think this cpu_allowed_list file is relevant to the name of any fileIO. Why does it try to access that file? Hopefully, it's causing issues to the frontend only. 

 

2022-07-24.png

Edited by zxhaxdr
Link to comment
3 minutes ago, zxhaxdr said:

Mine works OK. It says cpu_allowed_list is not a directory in your case. Obviously that is a file not a directory and I don't have this file under that dir. That should be something else because I don't think this cpu_allowed_list file is relevant to the name of any fileIO. Why does it try to access that file?

2022-07-24.png

Did a test on may 6.9.2 machine worked ok, must be an issue with support for my alderlake CPU or something else as cannot delete any, Will have to look into that.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.