[Plugins] iSCSI GUI and ISCSI Target


SimonF

Recommended Posts

On 3/24/2023 at 12:23 AM, antihero412 said:

Would it be possible to use a zvol now that unraid has ZFS i can create the zvol fine but cant seem to map to it under devices its only showing the /dev/sda and not /dev/zvol

I have added zfs support.

 

Example command if you want to create a block device to be used for iSCSI 

 

zfs create -V 1G zfs/vol1

 

image.thumb.png.3571396490671356c95773ae084ff6f3.png

Edited by SimonF
  • Like 3
Link to comment
  • 2 weeks later...

Good morning

Thank you for developing this plugin but I am desperately trying to mount an iscsi target on my windows server
I followed the tutorial but I'm stuck
So far here is what I have done:

I created a share named ISCSI , allocating two disks from my cluster just for this folder.

Then from the plugin I created a fileIO: ISCSI=>/mnt/user/ISCSI/ISCSI.img

In the initiator tab I created a target:
iqn.2003-01.org.linux-iscsi.xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Then I created a LUN:
Mon0->/backstores/fileio/ISCSI

But then I block 😕
When I go to my windows ISCSI initiator I don't know what to do, I can see a name in the configuration tab:
iqn.1991-05.com.microsoft:xxxxxxxxxxxxxxxxxxx

In the discovery tab I added the ip of my unraid server with port 3260
Then in the Target tab I have my target iqn.2003-01.org.linux-iscsi.xxxxxxxxxxxxxxxxxxxxxxxxxxxx which goes up in inactive status
when I click on connect it says: authorization failed

So I go back to my unraid plugin and I tried to do a mapping:

This may be where I'm not doing the chises correctly because I don't really understand:
Here is what I do:

Add Mapping IQN-----:
choose target: I choose my created target:
iqn.2003-01.org.linux-iscsi.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
initiator name: I'm really not sure but if I understood correctly I have to put the initiator name of windows? that's it ? SO :
iqn.1991-05.com.microsoft:xxxxxxxxxxxxxxxxxxx

Mon map number: I put 0
Mon or backstore: I put 0 too
Maybe that's what I'm not doing right

because when I do add map, I don't see anything new and in the logs I have this:
targetcli shell version 2.1.54
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> No such path /iscsi/iqn.2003-01.org.linux-iscsi.xxxxxxxxxxxxxxxxxx/tpg1/acls/iqn.1991-05.com.microsoft:xxxxxxxxxxxxxxxxx
/> Global pref auto_save_on_exit=true
Configuration saved to /etc/target/saveconfig.json

So, can you help me please?

Thank you so much

Link to comment
  • 3 weeks later...

Hi everyone,

 

I have a strange behavior and I wanna get some insight about it.

 

ISCSi target is connecting fine, I'm seeing my fileio on my esxi installation and I can write to it. Problem is when I am writing, the connection is loss and I am unable to connect it anymore.

 

In Unraid under the ISCSi tab in settings, when it happens, I'm unable to do something because I have a yellow box saying "Targetcli is in use and unable to...". I don't really know what to do at this point and I am unable to stop the array. I keep getting stuck at " *** ISCSi ".

 

(I am sorry if I don't have the exact wording, I've resetted everything and forgot to copy the text.)

Link to comment
44 minutes ago, ddube said:

In Unraid under the ISCSi tab in settings, when it happens, I'm unable to do something because I have a yellow box saying "Targetcli is in use and unable to...". I don't really know what to do at this point and I am unable to stop the array. I keep getting stuck at " *** ISCSi ".

Please create the Diagnostics if the error ocours and post them here.

Link to comment
2 hours ago, ddube said:

Hi everyone,

 

I have a strange behavior and I wanna get some insight about it.

 

ISCSi target is connecting fine, I'm seeing my fileio on my esxi installation and I can write to it. Problem is when I am writing, the connection is loss and I am unable to connect it anymore.

 

In Unraid under the ISCSi tab in settings, when it happens, I'm unable to do something because I have a yellow box saying "Targetcli is in use and unable to...". I don't really know what to do at this point and I am unable to stop the array. I keep getting stuck at " *** ISCSi ".

 

(I am sorry if I don't have the exact wording, I've resetted everything and forgot to copy the text.)

I have a yellow box saying "Targetcli is in use and unable to...

 

This error will show if something has a lock on the config file. i.e. if you run targetcli it will lock config.

Link to comment
1 hour ago, ich777 said:

A few more information eould be also nice. What kind of devices are you using? Real block devices, images,…


Maybe a screenshot from the plugin itself from the configuration would be nice.

 

I am beginning in this space currently so I'm sorry if I didn't give a lot of information beforehand. I am using image and they are in the main array. I am using 2 currently for testing purpose and they have 240gb each. I have connected them to 2 esxi installation. The first time I tried to transfer VM from one esxi to the iscsi drive, it was working great. The second time I tried to it failed and the image was locked down. That's when "targetcli is unable.." appeared.

 

Configuration screenshot :

image.thumb.png.54dd91399de171abf88e2767d9f97cb6.png

  • Like 1
Link to comment
1 hour ago, SimonF said:

I have a yellow box saying "Targetcli is in use and unable to...

 

This error will show if something has a lock on the config file. i.e. if you run targetcli it will lock config.

Is there a way to unlock it if it happens ?

Link to comment
  • 1 month later...

97509604_CleanShot2023-06-02at13_05.26@2x.thumb.png.7210de87f0723216785605fc6f100c33.png

 

I'm connecting to ISCSI on Unraid through my mac mini, my internal network is 10Gb, I also set write back in iscsi to true, but my hard drive speed is only 60MB/s.

 

2119503605_CleanShot2023-06-02at13_10.42@2x.thumb.png.06c8b22024e9dc4e436718c05e531733.png

 

 

I can reach 940MB/s with SMB connection in the same network and hard drive environment, I've been troubleshooting all morning but I can't find out what the problem is, please! Please help me.

Link to comment
1 hour ago, BeliefanX said:

I'm connecting to ISCSI on Unraid through my mac mini, my internal network is 10Gb, I also set write back in iscsi to true, but my hard drive speed is only 60MB/s.

I would never recommend to use a image file for iSCSI.

Is it not possible in your case to use a whole block device (SSD) <- have you already tried that?

On what Unraid version are you, please post your Diagnostics.

Link to comment
17 minutes ago, BeliefanX said:

You mean instead of using FileIO, you want to use the Devices page to design the storage source?

I don't fully understand but I would always recommend to use a whole disk (block device) for iSCSI because it's simply faster than a image (fileio).

 

18 minutes ago, BeliefanX said:

Here is my Diagnostics.

Please click on the link Diagnostics, these are not your Diagnostics.

Link to comment

I am trying to use this on a Windows Hyper-V Cluster but I cannot get the Disk to come Online in Failover Cluster Manager on the Windows Server. It was suggested that the iSCSI needs to have scsi-3 persistent reservations enabled but I don't know how or even if this can be done with this. Don't make me have to standup a TrueNas server. LOL. Anyone have any input?

Link to comment
8 minutes ago, MrOz said:

I am trying to use this on a Windows Hyper-V Cluster but I cannot get the Disk to come Online in Failover Cluster Manager on the Windows Server. It was suggested that the iSCSI needs to have scsi-3 persistent reservations enabled but I don't know how or even if this can be done with this. Don't make me have to standup a TrueNas server. LOL. Anyone have any input?

 

ou can attempt to read the persistent-reservations capabilities of a disk/LUN with the "sg_persist -d /dev/ -c" command.

If the disk/LUN won't support SCSI-3 persistent reservations, the commands will respond with a "command not supported" error message:


sg_persist -d /dev/sda -c

  ATA       VBOX HARDDISK     1.0 
  Peripheral device type: disk
PR in (Report capabilities): command not supported
If the disk/LUN claims to support SCSI-3 persistent reservations, you'll get a longer response:


sg_persist -d /dev/sde -c
  
  IBM       2145              0000
  Peripheral device type: disk
Report capabilities response:
  Compatible Reservation Handling(CRH): 1
  Specify Initiator Ports Capable(SIP_C): 0
  All Target Ports Capable(ATP_C): 0
  Persist Through Power Loss Capable(PTPL_C): 1
  Type Mask Valid(TMV): 1
  Allow Commands: 0
  Persist Through Power Loss Active(PTPL_A): 0
    Support indicated in Type mask:
      Write Exclusive, all registrants: 1
      Exclusive Access, registrants only: 1
      Write Exclusive, registrants only: 1
      Exclusive Access: 1
      Write Exclusive: 1
      Exclusive Access, all registrants: 1
      
The above commands are sufficient to verify if the disk/LUN claims to support SCSI-3 persistent reservations or not.

  • Like 1
Link to comment
10 hours ago, Joedy said:

MrOz we use it ina hyperv failover cluster without any issues, have you enabled the disk on both physical boxes and then did the cluister volume?

I added the drive using iSCSI on both servers. The drive is visible in Disk Management on both servers as well. It will still not Add properly. 

 

As for the command you suggested.... where am I running that from?

Link to comment
21 hours ago, Joedy said:

 

ou can attempt to read the persistent-reservations capabilities of a disk/LUN with the "sg_persist -d /dev/ -c" command.

If the disk/LUN won't support SCSI-3 persistent reservations, the commands will respond with a "command not supported" error message:


sg_persist -d /dev/sda -c

  ATA       VBOX HARDDISK     1.0 
  Peripheral device type: disk
PR in (Report capabilities): command not supported
If the disk/LUN claims to support SCSI-3 persistent reservations, you'll get a longer response:


sg_persist -d /dev/sde -c
  
  IBM       2145              0000
  Peripheral device type: disk
Report capabilities response:
  Compatible Reservation Handling(CRH): 1
  Specify Initiator Ports Capable(SIP_C): 0
  All Target Ports Capable(ATP_C): 0
  Persist Through Power Loss Capable(PTPL_C): 1
  Type Mask Valid(TMV): 1
  Allow Commands: 0
  Persist Through Power Loss Active(PTPL_A): 0
    Support indicated in Type mask:
      Write Exclusive, all registrants: 1
      Exclusive Access, registrants only: 1
      Write Exclusive, registrants only: 1
      Exclusive Access: 1
      Write Exclusive: 1
      Exclusive Access, all registrants: 1
      
The above commands are sufficient to verify if the disk/LUN claims to support SCSI-3 persistent reservations or not.

Ok, I figured out what I needed to do to get that command to run. I was too tired to see it correctly. It does show "not supported"

 

What settings can I change to fix this?

Link to comment
On 6/2/2023 at 3:02 AM, ich777 said:

I don't fully understand but I would always recommend to use a whole disk (block device) for iSCSI because it's simply faster than a image (fileio).

The difference here should be minimal/as-good-as-zero.

Using an image for iSCSI storage is a very common way for iSCSI to be deployed across a variety of different platforms, be them Linux based, BSD or Windows.

 

The question I would be curious to know, is 'what' is expected to cause the large overhead @BeliefanX is seeing - something Unraid specific, something to do with his general config, etc. - as that would be a great indicator of both resolution and possible workaround.

 

Without some context from diag's, etc. - my first thought would be to check the common iSCSI perf issues causes - Block size on the disk, jumbo frames implementation, RSS queuing, pathing, etc.

If all of those are taken out of the equation, then the target medium (in this case, Unraid/this plugin) becomes a consideration. 

Most of the time, its not the target at fault though. iSCSI is hard to mess up at that level. 😛

Link to comment
16 hours ago, boomam said:

The difference here should be minimal/as-good-as-zero.

I wonder where you have that information from, even if you search for FileIO latency and/or FileIO speeds (on your favorite search engine) you'll find multiple reports that it of course introduces some additional latency and in some cases really bad write/read performance.

 

16 hours ago, boomam said:

Using an image for iSCSI storage is a very common way for iSCSI to be deployed across a variety of different platforms, be them Linux based, BSD or Windows.

Sure, but that depends always on how it's set up.

In case for Unraid it is maybe the case that this was a BTRFS RAID1 which adds a additional layer of complexity, Unraid is also using a FUSE file system, which BTW wasn't used as how the user was setting it up.

 

16 hours ago, boomam said:

jumbo frames implementation

Jumbo Frames shouldn't matter much when the right adapter is used, even on my Mellanox/Nvidia ConnectX3 card I can saturate the full 10Gbit/s with the default MTU from 1500.

 

16 hours ago, boomam said:

RSS queuing, pathing, etc.

16 hours ago, boomam said:

Block size on the disk

Exactly, but it is always my recommendation to use a single Block Device for the usage with iSCSI since I've seen users with really bad performance (<10MB/s) on FileIO and troubleshooting them in every single case can be very tedious since there are so many variables, even with Write-Back enabled.

I haven't had any issues with FileIO back then but my use case shifted also to use only a single Block Device with Write Through.

 

16 hours ago, boomam said:

Most of the time, its not the target at fault though. iSCSI is hard to mess up at that level. 😛

Agreed.

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.