An iSCSI LUN is a logical unit number, the address of a SCSI logical unit within an iSCSI target. A SCSI LUN or storage LUN can also mean the block device presented to a host, backed by storage such as a NAS volume or a ZFS zvol. The target mapping controls which hosts can see it. Assign a LUN with a regular filesystem to one host at a time. An existing or cloned LUN can already contain partitions, a filesystem and data.
The address is scoped to the target, so two targets can both use LUN 0 for different disks. Match the target’s iSCSI Qualified Name (IQN) and the LUN number together. IETF RFC 7143
For discovery, CHAP and multipathing, see iSCSI fundamentals: targets, initiators and MPIO.
What does an iSCSI LUN look like on the client?
Linux sees the mapped LUN as a block disk. A newly attached disk could be an existing or cloned LUN that already holds data. Confirm which disk it is and whether the NAS administrator intended it for reuse before writing a partition table or creating a filesystem. TrueNAS 25.10 iSCSI client guide
To list iSCSI LUNs on Linux, match the NAS mapping to the active session, then match the Linux disk to the by-path link.
-
On the NAS, record the backing volume, the target IQN and portal, and the LUN number mapped to this initiator. TrueNAS target reference, RHEL 9 target guide
-
Run the session listing as root. Find the target IQN and portal you recorded, then note its active session ID (SID). Use the current ID each time because session IDs can change. Debian Bookworm iscsiadm manual
iscsiadm -m session -P 1 -
After a new mapping to that active session, run
iscsiadm -m session -r <sid> -Ras root, replacing<sid>with the current ID. If the listing shows SID12for the intended target, run the command below. Debian Bookworm iscsiadm manualiscsiadm -m session -r 12 -R -
List the disks and their path links.
lsscsi -sshows each disk’s device name and size. In the SCSI tuple[H:C:T:L], the last fieldLis the LUN number. Debian Bookworm lsscsi manual, Debian Bookworm ls manual, Oracle Linux 8 iSCSI guidelsscsi -s ls -l /dev/disk/by-path/
Here is an illustrative match for two targets on the same NAS portal:
| NAS backing volume | Target IQN and mapped LUN | Linux by-path link and destination | Matching lsscsi -s row excerpt |
|---|---|---|---|
tank/vm-store | iqn.2026-01.com.example:vm-store, LUN 0 | /dev/disk/by-path/ip-192.0.2.10:3260-iscsi-iqn.2026-01.com.example:vm-store-lun-0 → /dev/sdb | [6:0:0:0] … /dev/sdb |
tank/restore-copy | iqn.2026-01.com.example:restore-copy, LUN 0 | /dev/disk/by-path/ip-192.0.2.10:3260-iscsi-iqn.2026-01.com.example:restore-copy-lun-0 → /dev/sdc | [7:0:0:0] … /dev/sdc |
Both SCSI tuples end in :0] and both links end in -lun-0. For tank/restore-copy, match the full IQN between -iscsi- and -lun-0, then identify /dev/sdc as the link destination and find that disk in the lsscsi listing. Linux can assign a different /dev/sdX name after the storage is reconnected or the system reboots. Debian Bookworm lsscsi manual, Oracle Linux 8 iSCSI guide
Stop before initialization if the match is missing or ambiguous. Recheck the NAS mapping and initiator permissions. If the session or disk is still missing, see iSCSI troubleshooting for login, timeout and path errors.
Once you have a match, check the disk and its partitions for existing filesystems. For the restore copy in the example, the inspection command is below. Debian Bookworm lsblk manual
lsblk -f /dev/sdc
A filesystem or partition is a reason to stop and confirm the disk’s purpose. If this is an existing or cloned LUN, preserve its contents. Initialize only when the mapping is unambiguous, the backing volume is confirmed empty, and the disk is assigned to this host.
On Windows, a mapped LUN appears in Disk Management. Initialize only a new disk confirmed to have no data. For the target-side setup, see iSCSI target setup on Windows Server. TrueNAS 25.10 iSCSI client guide, Microsoft’s disk initialization guidance
What actually backs an iSCSI LUN?
A virtual LUN on a NAS can be backed by a zvol, a file or space on a storage volume. Other targets can export a virtual disk file or an existing block device. The host sees a disk, while the backing storage determines which snapshot, expansion and backup options are available.
| Target | What backs the LUN | Worth knowing |
|---|---|---|
| TrueNAS 25.10 | A ZFS volume (zvol) as a Device extent, or a file as a File extent | TrueNAS requires a LUN 0 and accepts LUN IDs from 0 to 1023. |
| Synology DSM 7.4 SAN Manager | Storage allocated to a thick- or thin-provisioned LUN | Instant snapshots require a thin-provisioned LUN on Btrfs. |
| Linux LIO with targetcli | A fileio, block, pscsi or ramdisk backstore | A new LUN can automatically map to existing initiator ACLs. |
| Windows Server iSCSI Target | A .vhdx or .vhd virtual disk | Microsoft lists a fixed .vhdx maximum size of 64 TB. |
A TrueNAS Device extent can present a zvol or zvol snapshot. To recover a file from a zvol snapshot, clone the snapshot, present the clone as a separate LUN and let a client that understands the filesystem read it. For routine file sharing and file-level access, see NFS vs iSCSI. TrueNAS zvol cloning guide, TrueNAS target reference
For a LUN backup, TrueNAS offers snapshot and replication tasks for zvols in its Data Protection tools. TrueNAS zvol reference
How does a host get to see a LUN?
The storage administrator associates the backing storage with a target. On Linux LIO, access control lists (ACLs) grant individual initiators access to mapped LUNs. An ACL can identify the initiator by its IQN. TrueNAS target reference, RHEL 9 target guide
On Linux LIO, adding a LUN can expose it to existing ACLs with read-write access by default. The RHEL 9 target guide documents how to disable automatic mappings and create read-only mappings. RHEL 9 target guide
TrueNAS can use initiator groups to restrict access by IQN. Its Read-only extent setting prevents the initiator from initializing the LUN. For setup, see setting up an iSCSI target on TrueNAS and Unraid iSCSI target setup. TrueNAS target reference
Use the IQN and LUN number to check a particular mapping. For a path-independent identifier of the underlying device, check its WWID where available. SUSE Linux Enterprise Server 15 SP7 storage guide
Thick or thin: how much space does a LUN really use?
A thick LUN reserves its full advertised capacity up front. A thin LUN allocates physical space as writes arrive. Thin provisioning lets you commit more capacity than is physically free, so writes can fail if the backing pool fills. OpenZFS volume creation reference, TrueNAS zvol reference
On TrueNAS, Sparse enables thin provisioning and is set at zvol creation. Choose a full reservation when the LUN needs guaranteed capacity in a pool shared with other workloads. With a sparse LUN, monitor free space on the NAS as well as free space inside the host filesystem. TrueNAS zvol reference
For instant snapshots on Synology, choose a thin-provisioned LUN on Btrfs. Windows Server iSCSI Target supports dynamic virtual disks. Microsoft lists thin provisioning as unsupported and says dynamic disks lack UNMAP support. Synology SAN Manager specifications, Microsoft’s iSCSI Target Server limits
TrueNAS can grow a file-backed or zvol-backed LUN. A zvol cannot be shrunk through this workflow. After expanding the backing storage, check that the client sees the new size before extending its partition or filesystem. TrueNAS LUN expansion guide
Can two machines share one iSCSI LUN?
For a normal local filesystem, assign the LUN to one host at a time. Concurrent read-write mounts on separate hosts can corrupt it. Simultaneous access requires a cluster filesystem or storage stack explicitly designed to coordinate access to the same blocks. GFS2, for example, uses a distributed lock manager to coordinate access across hosts. Linux kernel GFS2 documentation
VMFS coordinates access when several ESXi hosts use the same datastore. Proxmox VE documents a different arrangement, with shared LVM on an iSCSI LUN and cluster-wide locking when the LVM storage is marked shared. That lets the cluster allocate separate VM disks from the LUN. Broadcom’s VMFS locking guidance, Proxmox VE iSCSI backend, Proxmox VE LVM backend
The direct iSCSI backend has no snapshot support. Proxmox VE 9 added VM snapshots as volume chains on LVM. Proxmox VE iSCSI backend, Proxmox VE LVM backend, Proxmox VE 9.0 release announcement
When should a homelab use an iSCSI LUN at all?
Use an iSCSI LUN when a host needs a disk backed by NAS storage, such as a Proxmox VM disk. Use SMB or NFS for ordinary shared files such as media, ISO images and backup archives. iSCSI vs SMB for a homelab NAS
SQLite relies on filesystem locks to coordinate access. Its documentation warns about network filesystems with unreliable locking, including some NFS setups. A single host can put its database on a local filesystem backed by an iSCSI LUN and use that filesystem’s locking. SQLite’s corruption guide
An iSCSI disk depends on both the network path and the storage target being available. For a single host whose VM disks fit on local storage, keeping those disks local and sending backups to the NAS avoids that dependency during everyday writes.
FAQ
what does lun stand for in iscsi
LUN stands for logical unit number. SCSI uses it to address a logical unit within a target, and iSCSI carries that address in its protocol. That is the same meaning when a storage interface refers to a SCSI LUN or storage LUN. IETF RFC 7143
is an iscsi lun the same as a zvol
A zvol is a ZFS block device on the NAS. The LUN is the numbered address used to present it to a host. On TrueNAS, a Device extent backed by the zvol can be associated with a target and assigned a LUN ID. TrueNAS target reference
does an iscsi target need a lun 0
TrueNAS requires at least one LUN 0. Red Hat’s targetcli guide also starts the default LUN numbering at 0. Look for the number in the last field of lsscsi and the -lun- suffix of the Linux by-path link. TrueNAS target reference, RHEL 9 target guide
is iscsi lun traffic encrypted
By default, iSCSI block traffic can travel in cleartext. CHAP authenticates the login. RFC 7143 specifies IPsec for packet protection, including confidentiality. IETF RFC 7143
Evidence and limits. The Linux procedure was checked against RFC 7143, the Debian Bookworm man pages and the Oracle Linux 8 iSCSI guide. The NAS examples use TrueNAS 25.10 and Synology DSM 7.4 documentation. The example commands were not run against a storage target.