iSCSI Hub
Flat isometric illustration of a stacked pair of silver drive units topped by a large pink concentric disc, on a bright magenta rounded platform.
setup-guides

Unraid iSCSI Target Setup: Plugins, LUNs and CHAP

Set up an Unraid iSCSI target with a pool-backed LUN, an initiator ACL and CHAP. See how TrueNAS and Synology serve LUNs and how Proxmox connects.

By iSCSI Hub Editorial · ·Updated · 6 min read

To present storage from an Unraid pool as a block disk to another machine, install the community iSCSI Target plugin, create a pool-backed storage object and map it as a logical unit (LUN). Add an access control list (ACL) entry for the client’s initiator name, configure CHAP and verify the LUN from the client. Unraid plugin installer · targetcli manual

Choose the Unraid iSCSI Target plugin

In the Unraid web interface, open Plugins → Install Plugin, paste the installer URL below into the URL field and click Install. Unraid Install Plugin screen · Unraid plugin installer

https://raw.githubusercontent.com/SimonFair/unraid.iSCSI/main/iSCSIgui.plg

The plugin provides the target software, the targetcli interface and a configuration utility under Settings. The target exports storage from Unraid, and the initiator is the host that connects to it. Unraid plugin installer

Keep the LUN backing file on a pool

On Unraid 6.12 or later, use Shares → Add Share to create a dedicated share such as iscsi. Set Primary Storage to your chosen pool and Secondary Storage to None. This gives Mover no secondary destination for the share. Monitor free space on that pool. Unraid share settings and pool paths

In Unraid’s terminal, confirm your pool is mounted at /mnt/POOL, where POOL is your pool name. If the share directory is missing there, create it with mkdir /mnt/POOL/iscsi. Unraid command line guide

BackstoreWhat to provide
fileioA file on the pool. The example below sets write_back=false to disable write-back caching.
blockA dedicated block device, such as an unused disk or logical volume. Never export a device that Unraid or another service is using.

targetcli backstore commands

Find the client initiator name

Use the client’s name in the ACL and keep the target’s name for discovery and login. An iSCSI Qualified Name (IQN) is one of the naming formats defined for iSCSI. RFC 7143

Create the backstore, target, LUN and ACL in targetcli

Restrict access to the storage network before configuring the target. Start with a disposable backing file. In Unraid’s terminal, start targetcli as root. Run the following inside its shell. Replace POOL with your pool name. Use the IQN printed by create for TARGET_IQN and the client name for INITIATOR_IQN. Use a new backing filename in an existing directory. Unraid pool paths · targetcli manual · targetcli backstore commands

cd /backstores/fileio
create file1 /mnt/POOL/iscsi/test-lun.img 200M write_back=false
cd /iscsi
create
cd /iscsi/TARGET_IQN/tpg1
set attribute generate_node_acls=0
luns/ create /backstores/fileio/file1
cd /iscsi/TARGET_IQN/tpg1
acls/ create INITIATOR_IQN
cd /iscsi/TARGET_IQN/tpg1
ls

Check ls for the intended portal, lun0 and the client’s mapped LUN. If the portal list is empty, run portals/ create STORAGE_IP inside tpg1, substituting the Unraid storage IP. If an all-addresses portal exists, confirm network access is limited to the intended clients before continuing. targetcli portal and LUN commands · targetcli portal creation source

The ACL controls which LUNs the initiator can access. With auto_add_mapped_luns enabled, creating an ACL maps existing LUNs and adding a LUN maps it to existing ACLs. When automatic mapping is off and lun0 is unmapped, go to /iscsi/TARGET_IQN/tpg1/acls/INITIATOR_IQN and run create 0 0. This maps target LUN 0 as client LUN 0. Verify the mappings again before login. targetcli manual

Set CHAP before the client logs in

One-way CHAP authenticates the initiator to the target. Mutual CHAP adds target authentication in the other direction and uses a separate secret. For data in transit, use a trusted storage network or IPsec with encryption. CHAP’s role is login authentication. RFC 7143

With generate_node_acls=0, normal-session credentials come from the client’s ACL. In targetcli, enable authentication in the portal group and set the username and secret on the ACL. Substitute your own values and use the same credentials on the client. targetcli authentication manual · ClusterLabs targetcli CHAP implementation

cd /iscsi/TARGET_IQN/tpg1
set attribute authentication=1
cd /iscsi/TARGET_IQN/tpg1/acls/INITIATOR_IQN
set auth userid=CHAP_USER
set auth password=CHAP_SECRET
cd /
saveconfig

When targetcli is absent, the installer installs it and links /etc/target/saveconfig.json to /boot/config/iscsi/saveconfig.json. It calls targetcli restoreconfig during that installation if emhttpd is already running. Verify the mapping and client login again after a planned reboot with the disposable LUN. Plugin installer source · targetcli save command

Verify the login from Linux

For a new connection from a Linux client with Open-iSCSI, set these session defaults in /etc/iscsi/iscsid.conf before discovery. Use the username and secret from the target ACL. Open-iSCSI configuration example · iscsiadm manual

node.session.auth.authmethod = CHAP
node.session.auth.username = CHAP_USER
node.session.auth.password = CHAP_SECRET

Discover targets at the storage IP. For login, copy the discovered portal as IP:port, dropping the comma and portal group tag. Use the target IQN from the same line. In the final command’s output, find the target IQN and check that the expected LUN and its disk appear under Attached SCSI devices before writing to the disk. Open-iSCSI discovery, login and session commands · Oracle Linux session output example

iscsiadm -m discoverydb -t st -p STORAGE_IP --discover
iscsiadm -m node -T TARGET_IQN -p DISCOVERED_PORTAL -l
iscsiadm -m session -P 3

Networking and multipath

A server with one physical network link has no redundant link. With independent paths, the client’s multipath software can combine connections to the same LUN into one block device and keep I/O going if a path fails. Proxmox multipath documentation

See iSCSI fundamentals: targets, LUNs and multipathing for the distinction between sessions and paths. Use the iSCSI Throughput and MPIO Calculator to compare path and storage limits. For login or path failures, see iSCSI troubleshooting: login, timeout and path errors.

TrueNAS iSCSI target: zvol, extent and target association

In TrueNAS 25.10, create a Device extent that selects your zvol. Under Shares, open Block (iSCSI) Share Targets. In Targets, select your target and click Associate in its Extents panel. Select the extent and assign LUN ID 0 for the first LUN. TrueNAS block share tutorial · TrueNAS target and association screens

For portal, CHAP and client setup, see how to set up an iSCSI target on TrueNAS.

Synology iSCSI target in SAN Manager

On DSM 7.4, provision the LUN in SAN Manager and choose thin or thick allocation. Use IQN-based access control for the intended initiators and configure CHAP or mutual CHAP. Check the LUN limits for your NAS model and monitor available capacity if you choose thin allocation. Synology DSM 7.4 SAN Manager specifications

Proxmox VE as an iSCSI initiator

Create and map the LUN on the NAS first, then authorize each participating Proxmox node’s initiator. With Open-iSCSI installed, run pvesm scan iscsi HOST, substituting the storage IP or DNS name. Configure the iSCSI storage with the portal and discovered target. Proxmox Open-iSCSI documentation · Proxmox multipath prerequisites

To put LVM on the LUN, set the iSCSI entry to content none. Then configure the LVM entry with the existing volume group as vgname and the iSCSI base volume as base. Mark LVM storage as shared only if the nodes access the same storage. Proxmox uses cluster-wide locking for shared LVM and documents LVM-thin for non-shared local storage. Proxmox Open-iSCSI settings · Proxmox LVM settings

Keep ordinary filesystems single-host

Give a writable LUN to one host unless the hosts coordinate writes through a supported cluster configuration. For example, Windows Server Failover Clustering supports concurrent access to NTFS or ReFS through Cluster Shared Volumes. Microsoft Cluster Shared Volumes documentation

If several machines need to edit files on the same storage, see iSCSI vs NFS vs SMB.

Evidence and limits. The procedure is based on the Unraid plugin source and share docs, upstream targetcli and Open-iSCSI references, and the cited platform documentation. The steps were not run on a live setup.

Sources

  1. Unraid WebGUI: Install Plugin screen
  2. Unraid iSCSI Target plugin installer source
  3. Unraid documentation: shares, primary storage and mover
  4. Unraid documentation: command line interface
  5. targetcli-fb: file and block backstore commands
  6. Open-iSCSI: targetcli(8) manual
  7. targetcli-fb: network portal creation
  8. ClusterLabs iSCSI Target agent: targetcli CHAP configuration
  9. Microsoft Learn: iSCSI Initiator Name in Windows
  10. Open-iSCSI: iscsid.conf reference configuration
  11. Open-iSCSI: discovery, login and session commands
  12. Oracle Linux 7: Working With iSCSI Devices
  13. Debian bookworm: Open-iSCSI iscsiadm(8) manual
  14. RFC 7143: Internet Small Computer System Interface (iSCSI) Protocol (Consolidated)
  15. TrueNAS 25.10: Adding iSCSI Block Shares
  16. TrueNAS 25.10: Block (iSCSI) Share Target Screens
  17. Synology DSM 7.4: SAN Manager Technical Specifications
  18. Proxmox VE documentation: Open-iSCSI initiator
  19. Proxmox VE documentation: shared LVM storage
  20. Proxmox VE documentation: multipath
  21. Microsoft Learn: Manage Cluster Shared Volumes

Related