Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugins] iSCSI GUI and ISCSI Target

Featured Replies

16 minutes ago, Gobblerpl said:

How does ISCSI perform in terms of data security? If one of the disks in Unraid fails, will I be able to rebuild and remount the ISCSI image?

Like a normal disk, iSCSI is only meant to share a block device or a image over the network, data integrity and maybe redundancy is up to you and how you set it up.

 

Are you using a FileIO image on the Array?

I wouldn't recommend that, instead I would put two disks in the server, share them over iSCSI and create a Storage Pool within Windows, that is way more efficient and would also heavily increase write speeds.

 

You could also use ZFS if you really want too but I would not recommend using a FileIO image on the Array.

  • 1 month later...
  • Replies 480
  • Views 119.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • @gingerdude & @dreadu & @isvein please update the plugin to version 2022.11.06 and the issue should be fixed.

  • I just wanted to say thank you for the plugin. For the first time yesterday I was able to boot from efi using ipxe and then network boot with iscsi as the disk. The plugin is going to make experimenti

  • 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  

Posted Images

Hi There,

 

My Setup:

MacStudio with 10G ETH in 10Gigs switchports

Running DaemonTools as initiator

 

I've configured a nvme drive as block device. Mapped into a LUN but unfortunately for some reason, I cannot go over 50MB/s. The same nvme, exposed as a smb share, reaches 600MB/s of write speed in the same network.

 

 

Anyone with a similar problem and/or advices to debug this? It seems very very strange using a nvme and getting such low performance.

 

Thanks!

Ben

tower-diagnostics-20240425-2322.zip

On 4/26/2024 at 12:27 AM, bjunior said:

Hi There,

Please see this post:

 

or:

 

or:

 

and many other posts on the last few pages.

 

Please also make sure that you enable write-back not write-through

  • 5 weeks later...

Hy All 

I Installed unraid on Dell R730xd.

Installed the iscsi target plugin and define IOFILE lun of 450GB.

How can enlarge the lun if I need more space on the lun?

(Didnt find where its been done)

 

Tnx

  • 1 month later...

Hy All

Urgent question (My Production is offline due to changes, and this is one of them):

I ran my Unraid NAS on Dell R730XD and changed to HW raid to use device block instead of FileIO.

My problem is I see the 3 volumes, but I'm unable to add them as storage lun.

image.thumb.png.17ec4c203537ce3979d8093e837efa05.png

Unraid doesn't let me tick just one of them, only the three together, and he gives a wait msg for 2-3 sec and doesn't add them.

image.thumb.png.19228faa70f2198d838f7006ba4340e2.png

I need the help urgently so I can start restore the lost data from my backups.

 

Tnx

Tal

Edited by Dolphinez

  • Author
2 hours ago, Dolphinez said:

Hy All

Urgent question (My Production is offline due to changes, and this is one of them):

I ran my Unraid NAS on Dell R730XD and changed to HW raid to use device block instead of FileIO.

My problem is I see the 3 volumes, but I'm unable to add them as storage lun.

image.thumb.png.17ec4c203537ce3979d8093e837efa05.png

Unraid doesn't let me tick just one of them, only the three together, and he gives a wait msg for 2-3 sec and doesn't add them.

image.thumb.png.19228faa70f2198d838f7006ba4340e2.png

I need the help urgently so I can start restore the lost data from my backups.

 

Tnx

Tal

Including @ich777 I am not an expert on the backends. but you can add them manually.

 

using targetcli example commands below. Do you get any error messages in the diags?

 

example to add a block devices is.

 

targetcli

/backstores/block/ create usb-SanDisk_Cruzer_Blade_00008219071821134638-0:0 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_00008219071821134638-0:0 readonly=false

/backstores/block/ create blade:vol1 /dev/zvol/blade/vol1 readonly=false

exit

3 hours ago, Dolphinez said:

I need the help urgently so I can start restore the lost data from my backups.

You have to assign them here:

grafik.png.09fcc945445aa88cd1bdfe6bbc8676dc.png

 

You should be always be able to add them as a storage pool here:
grafik.thumb.png.e2dc927d7e3d7ce299883f2d0f71a8c6.png

  • 2 weeks later...

afternoon,

 

This may be impossible but ive created a fileio img on my unraid cache ssd. I dont have a whole drive to use as a block device.

 

How do i manage TRIM in widows 11? At the moment the iscsi disk shows as a HDD in the optimise drives window. If i add then delete a large file the space is not reclaimed on unraid, even after running trim now from the scheduler tool in settings.

 

Am i missing something?

 

Cheers

  • Author
23 minutes ago, k1netic said:

afternoon,

 

This may be impossible but ive created a fileio img on my unraid cache ssd. I dont have a whole drive to use as a block device.

 

How do i manage TRIM in widows 11? At the moment the iscsi disk shows as a HDD in the optimise drives window. If i add then delete a large file the space is not reclaimed on unraid, even after running trim now from the scheduler tool in settings.

 

Am i missing something?

 

Cheers

Is the Windows 11 a vm?

  • Author
53 minutes ago, k1netic said:

afternoon,

 

This may be impossible but ive created a fileio img on my unraid cache ssd. I dont have a whole drive to use as a block device.

 

How do i manage TRIM in widows 11? At the moment the iscsi disk shows as a HDD in the optimise drives window. If i add then delete a large file the space is not reclaimed on unraid, even after running trim now from the scheduler tool in settings.

 

Am i missing something?

 

Cheers

Looks like it can be set in the config. But I dont think can be done by the gui. targetcli is the config tool. Not sure if they can be changed once created.

 

Backstore Tweaks

After creating your backstore, there are a couple settings to change, so run the following:
cd /backstores/block/iscsi-hafxb/ if you followed the zvol directions.
cd /backstores/fileio/disk1 if you followed the fileio directions.

set attribute block_size=4096
set attribute emulate_tpu=1
set attribute is_nonrot=1

The block size could arguably be higher for a Steam drive, but this backend doesn’t seem to support any more. This should match the volblocksize of your zvol, and is why I picked 4096 for the zvol.

emulate_tpu=1 enables the UNMAP command which is functionally similar to TRIM for SSDs. This is good to enable even for HDD zpools/filesystems because it also allows you to reclaim the space from deleted files in your iSCSI drive. This is especially important for zvols created with the -s flag (which is not recommended by Oracle, please see above).

is_nonrot specifies whether the pool is composed of HDDs or SSDs. Windows uses this to decide whether or not to make the iSCSI drive defragmentable. With ZFS, even if you are using HDDs, chances are you do NOT want this enabled.

41 minutes ago, SimonF said:

Is the Windows 11 a vm?

 

25 minutes ago, SimonF said:

Looks like it can be set in the config. But I dont think can be done by the gui. targetcli is the config tool.

 

Backstore Tweaks

After creating your backstore, there are a couple settings to change, so run the following:
cd /backstores/block/iscsi-hafxb/ if you followed the zvol directions.
cd /backstores/fileio/disk1 if you followed the fileio directions.

set attribute block_size=4096
set attribute emulate_tpu=1
set attribute is_nonrot=1

The block size could arguably be higher for a Steam drive, but this backend doesn’t seem to support any more. This should match the volblocksize of your zvol, and is why I picked 4096 for the zvol.

emulate_tpu=1 enables the UNMAP command which is functionally similar to TRIM for SSDs. This is good to enable even for HDD zpools/filesystems because it also allows you to reclaim the space from deleted files in your iSCSI drive. This is especially important for zvols created with the -s flag (which is not recommended by Oracle, please see above).

is_nonrot specifies whether the pool is composed of HDDs or SSDs. Windows uses this to decide whether or not to make the iSCSI drive defragmentable. With ZFS, even if you are using HDDs, chances are you do NOT want this enabled.

thanks for the reply, its not a VM , its a bare metal pc on the local network in need of a steam drive.

I created a fileio img so i assume thats why the block_size command fails?

 

Ill reboot the pc and see if windows see it as thin provisioned or as an ssd.

 

 

targetcli.jpg

Edited by k1netic

those commands were the answer, thank you very much. I am getting the full speed my network can provide so i wasnt looking forward to going back to smb shares again.

 

 

optimise drives.png

  • 1 month later...

Hi, I accidentally created an Iscsi fileio.img in the wrong storage location is it possible to simply copy it somewhere else?

How do I reference unraid to see it?

  • Author
44 minutes ago, bar1 said:

Hi, I accidentally created an Iscsi fileio.img in the wrong storage location is it possible to simply copy it somewhere else?

How do I reference unraid to see it?

Yes you can copy as it is just a file. You can create a new fileio block device. What is the output of the config?

4 minutes ago, SimonF said:

Yes you can copy as it is just a file. You can create a new fileio block device. What is the output of the config?

But how to I reference it?

 

or I can copy it and create a new target?

  • Author
55 minutes ago, bar1 said:

But how to I reference it?

 

or I can copy it and create a new target?

What does your config look like?

image.thumb.png.61f097abf8d89417a0252d85bd362976.png

 

Is this enough?

I am just being super careful with sharing my ISCSI information online.

 

I just want to move those to a bigger drive ->done

But how can I reference them?

  • Author
21 hours ago, bar1 said:

image.thumb.png.61f097abf8d89417a0252d85bd362976.png

 

Is this enough?

I am just being super careful with sharing my ISCSI information online.

 

I just want to move those to a bigger drive ->done

But how can I reference them?

Its difficult to understand how you have them connected by you should be able to add new mappings to targets.

  • 1 month later...

Not working. I added a FileIO container (or whatever it's called) of 500GB. Done. Then I created a target using that file, created a LUN using that target, and used the iSCSI Initiator panel in Windows 10 to connect to it. Host is found, LUN is found, but when I connect to it, it just says `Unable to Login to the target.`

 

No further information appears to be available.

I don't know what to do next.

 

Also could you, author, please read your own tutorial? It's really difficult to follow, because it's written quite poorly. Not just typos and grammar errors (which to me stand out like a thorn), but also skipping over things as if to assume the user knows everything about it already. I guess it just needs some love, and love is not what it's gotten so far.

 

Another question: what can I do in terms of encryption? Since it's essentially a virtual disk, I thought it'd be meaningful to add encryption. Would be nice if it could layer in veracrypt or similar. Without encryption, it's just a container for a filesystem, making it only useful for... I dunno, getting clients to boot off of it maybe.

51 minutes ago, thany said:

Not working.

This is too less information to troubleshoot, please post the Configuration from the Status page.

 

52 minutes ago, thany said:

I added a FileIO container (or whatever it's called) of 500GB. Done.

Please note that FileIO has performance implications, if you want to get half-decent performance you have to enable write-back for the image.

 

54 minutes ago, thany said:

Another question: what can I do in terms of encryption? Since it's essentially a virtual disk, I thought it'd be meaningful to add encryption. Would be nice if it could layer in veracrypt or similar. Without encryption, it's just a container for a filesystem, making it only useful for... I dunno, getting clients to boot off of it maybe.

If you want to add encryption it would be best to do that on the foreign system Initiator not on the Server so to speak not the Target.

Is your Server in a insecure place or why do you want to encrypt the image or the data which is in the image?

If you are using Windows take Bitlocker into consideration.

21 hours ago, ich777 said:

This is too less information to troubleshoot, please post the Configuration from the Status page.

It should just work if I follow the utterly basic steps from the tutorial. Whatever the result of those steps is, that's what I've got. If you think it works differently on every machine, please consider fixing that.

21 hours ago, ich777 said:

Please note that FileIO has performance implications, if you want to get half-decent performance you have to enable write-back for the image.

 

If you want to add encryption it would be best to do that on the foreign system Initiator not on the Server so to speak not the Target.

Is your Server in a insecure place or why do you want to encrypt the image or the data which is in the image?

If you are using Windows take Bitlocker into consideration.

My reason for encryption is two-fold:

 

1. Don't bother the client with it. Just connect to the target, and done.

2. Offload for performance reasons.

 

And again, what's the point of having a container if it doesn't add any value by being a container? I mean, an unencrypted uncompressed regular plain "raw" container of files is no better than just a shared folder. UNLESS it's used to make clients boot from it. Or am I missing something?

38 minutes ago, thany said:

It should just work if I follow the utterly basic steps from the tutorial. Whatever the result of those steps is, that's what I've got. If you think it works differently on every machine, please consider fixing that.

Sorry but nobody will be able to help unless you post the Configuration from the Status page since there it is visible what is maybe wrong and why it is not working.

For example if you take a look at my configuration (I have nothing to hide) :

o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 7]
  | | o- media ............................................. [/mnt/disks/misc_cache/iSCSI/media.img (150.0GiB) write-back activated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- test1_array ................................... [/mnt/disks/misc_cache/iSCSI/test1_array.img (5.0GiB) write-back activated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- test1_cache .................................. [/mnt/disks/misc_cache/iSCSI/test1_cache.img (50.0GiB) write-back activated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- test1_zfs ....................................... [/mnt/disks/misc_cache/iSCSI/test1_zfs.img (5.0GiB) write-back activated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- test2_array ................................... [/mnt/disks/misc_cache/iSCSI/test2_array.img (5.0GiB) write-back activated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- test2_cache .................................. [/mnt/disks/misc_cache/iSCSI/test2_cache.img (50.0GiB) write-back activated]
  | | | o- alua ................................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | | o- test2_zfs ....................................... [/mnt/disks/misc_cache/iSCSI/test2_zfs.img (5.0GiB) 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: 2]
  | o- iqn.2003-01.org.linux-iscsi.chipsserver.x8664:test.1 .............................................................. [TPGs: 1]
  | | o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  | |   o- acls .......................................................................................................... [ACLs: 1]
  | |   | o- iqn.2005-08.net.unraid:test.1 ........................................................................ [Mapped LUNs: 4]
  | |   |   o- mapped_lun0 .......................................................................... [lun0 fileio/test1_array (rw)]
  | |   |   o- mapped_lun1 .......................................................................... [lun1 fileio/test1_cache (rw)]
  | |   |   o- mapped_lun2 ............................................................................ [lun2 fileio/test1_zfs (rw)]
  | |   |   o- mapped_lun3 ................................................................................ [lun3 fileio/media (ro)]
  | |   o- luns .......................................................................................................... [LUNs: 4]
  | |   | o- lun0 ............................ [fileio/test1_array (/mnt/disks/misc_cache/iSCSI/test1_array.img) (default_tg_pt_gp)]
  | |   | o- lun1 ............................ [fileio/test1_cache (/mnt/disks/misc_cache/iSCSI/test1_cache.img) (default_tg_pt_gp)]
  | |   | o- lun2 ................................ [fileio/test1_zfs (/mnt/disks/misc_cache/iSCSI/test1_zfs.img) (default_tg_pt_gp)]
  | |   | o- lun3 ........................................ [fileio/media (/mnt/disks/misc_cache/iSCSI/media.img) (default_tg_pt_gp)]
  | |   o- portals .................................................................................................... [Portals: 1]
  | |     o- 0.0.0.0:3260 ..................................................................................................... [OK]
  | o- iqn.2003-01.org.linux-iscsi.chipsserver.x8664:test.2 .............................................................. [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.2005-08.net.unraid:test.2 ........................................................................ [Mapped LUNs: 4]
  |     |   o- mapped_lun0 ............................................................................ [lun0 fileio/test2_zfs (rw)]
  |     |   o- mapped_lun1 .......................................................................... [lun1 fileio/test2_cache (rw)]
  |     |   o- mapped_lun2 .......................................................................... [lun2 fileio/test2_array (rw)]
  |     |   o- mapped_lun3 ................................................................................ [lun3 fileio/media (ro)]
  |     o- luns .......................................................................................................... [LUNs: 4]
  |     | o- lun0 ................................ [fileio/test2_zfs (/mnt/disks/misc_cache/iSCSI/test2_zfs.img) (default_tg_pt_gp)]
  |     | o- lun1 ............................ [fileio/test2_cache (/mnt/disks/misc_cache/iSCSI/test2_cache.img) (default_tg_pt_gp)]
  |     | o- lun2 ............................ [fileio/test2_array (/mnt/disks/misc_cache/iSCSI/test2_array.img) (default_tg_pt_gp)]
  |     | o- lun3 ........................................ [fileio/media (/mnt/disks/misc_cache/iSCSI/media.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]

 

38 minutes ago, thany said:

1. Don't bother the client with it. Just connect to the target, and done.

I think you are missing the point of iSCSI, iSCSI is just a way of transferring SCSI packages over the IP protocol, why should iSCSI bother with that?

So to speak it transmits just data from the Initiator to the Target nothing more.

 

You could encrypt the underlying filesystem where the image is located on (you could encrypt the disk where the image file is on on Unraid with LUKS), or as mentioned above you could use Bitlocker from Windows or if you are using Linux use LVM.

 

You could of course also use a ZVOL, use encryption (and maybe compression) there for your iSCSI images.

 

Another way of doing is that you use both a combination of encryption on the Initiator (Client) so that you have to send less data over the network and at the same time the data in the container is encrypted.

 

38 minutes ago, thany said:

2. Offload for performance reasons.

Most modern CPUs are supporting encryption and you won't even notice any performance hit.

 

38 minutes ago, thany said:

Or am I missing something?

As said above iSCSI is just a way of transferring SCSI packets over the IP protocol, so to speak over the network, nothing more.

 

 

May I generally ask what you want to achieve with iSCSI or what you want to do exactly with it?

 

Please also note that FileIO images have a pretty big performance hit depending on the underlying filesystem as I pointed out above, however as long as you have plenty of RAM that shouldn't matter much as long as write back is activated but that has other implications since you are basically caching the data to the Servers RAM and then write it to the physical image -> a UPS is basically a must to avoid data loss.

Without write back enabled performance losses will be usually really high.

  • Author
1 hour ago, thany said:

please consider fixing that

Can you advise what needs to be fixed, With out the config we cannot see what may have gone wrong.

  • 2 weeks later...

Just in case anybody wants to know, yes it's possible to pass an optical drive to a remote machine using iSCSI... I was even successfully able to flash firmware to mine.

 

Edit: I do not recommend using "/dev/sr#" in the event it changes if you add additional disc drives, instead use the "/dev/disk/by-id/ata-HL-DT-ST_BD-RE_BU40N...." whatever your disc drive is so it always stays the same.

 

 

Why would I want to do this you ask? Due to the lack of proper IOMMU support on my motherboard, and the flashing tool being windows only, how else would I flash the firmware without tearing my NAS apart and flashing it on another host? I made it into an iSCSI target. Initiated it on a windows VM and flashed it.

 

I had to use targetcli in order to set up the target but it was relatively simple.

 

I used this as a guide

 

Config:

o- / .........................................................................................[...]
  o- backstores ..............................................................................[...]
  | o- block ..................................................................[Storage Objects: 0]
  | o- fileio ................................................................ [Storage Objects: 0]
  | o- pscsi ..................................................................[Storage Objects: 1]
  | | o- dvd_backend ..........................................................[/dev/sr0 activated]
  | |   o- alua ...................................................................[ALUA Groups: 0]
  | o- ramdisk ................................................................[Storage Objects: 0]
  o- iscsi ............................................................................[Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.tower.x8664:sn.xxxxxxxxxxxx ...........................[TPGs: 1]
  |   o- tpg1 ..................................................................[gen-acls, no-auth]
  |     o- acls ..........................................................................[ACLs: 0]
  |     o- luns ..........................................................................[LUNs: 1]
  |     | o- lun0 ............[pscsi/dvd_backend (/dev/disk/by-id/ata-HL-DT-ST_BD-RE_BU40N) (None)]
  |     o- portals ................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 .................................................................... [OK]
  o- loopback ........................................................................ [Targets: 0]
  o- vhost ........................................................................... [Targets: 0]
  o- xen-pvscsi ...................................................................... [Targets: 0]

 

Windows Device Manager:

image.png.c2fe2d6d0a4bce6c00a66e46a018abdf.png

Edited by MowMdown
Added Screenshots

  • 3 weeks later...

Hello!

 

I'm super new to Unraid, iSCSI and to be fair a lot of networking things. I apologize beforehand for probably asking stupid questions, and I do try to figure stuff out before asking but my Google-Fu has failed me.

 

I'd like to basically ask for help with two, maybe three things, to not clutter it up quite yet I'll start with just this:

 

-What is the "correct" procedure to removing a mounted iSCSI "drive" from both my Windows device and from Unraid?

 

I managed to create a working iSCSI drive on Unraid using the tutorial included with the plugin, and it's mounted in Windows. Unfortunately at the time I didn't know that using write-back is basically a necessity to get any kind of performance out of it (transfer speeds are like 10 megabit/s range on a gigabit network, normal Shares work much faster), so I'm going to have to redo it.

 

So to avoid being destructive, I'd like to know the best way to remove it from Windows, and then from Unraid. For now there's no data on it that I need to keep, so throwing that away is fine (but knowing how to do it without losing data would also be great).

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.