iSCSI and NVMe-oF are the two primary block-level network storage protocols on Linux. iSCSI encapsulates SCSI commands over TCP/IP and is universally supported. NVMe-oF extends the NVMe protocol over network fabrics (TCP, RDMA, Fibre Channel) for lower latency and higher performance with flash storage.
iSCSI architecture
Term
Definition
Initiator
Client that sends SCSI commands to access storage (open-iscsi on Linux)
Target
Server that exports storage resources (LIO target framework in kernel)
LUN
Logical Unit Number: individual logical device on a target
# Discover targets
iscsiadm -m discovery -t st -p 192.168.1.100:3260
# Login to specific target
iscsiadm -m node -T iqn.2006-04.com.example:storage.target \
-p 192.168.1.100 -l
# Login to all discovered targets
iscsiadm -m node -L all
# Set automatic login at boot
iscsiadm -m node -T iqn.2006-04.com.example:storage.target \
-p 192.168.1.100 --op=update -n node.startup -v automatic
Sessions and logout
# List active sessions
iscsiadm -m session
# Detailed session info
iscsiadm -m session -P 3
# Logout
iscsiadm -m node -T iqn.2006-04.com.example:storage.target \
-p 192.168.1.100 -u
# Rescan for new LUNs
iscsiadm -m node -T iqn.2006-04.com.example:storage.target \
-p 192.168.1.100 --rescan
CHAP authentication
Target configuration (targetcli)
/iscsi/.../acls/iqn.2005-03.org.open-iscsi:initiator1> set auth userid=initiator_user
/iscsi/.../acls/iqn.2005-03.org.open-iscsi:initiator1> set auth password=initiator_password
# Mutual CHAP (bidirectional)
/iscsi/.../acls/...> set auth mutual_userid=target_user
/iscsi/.../acls/...> set auth mutual_password=target_password
# Enable authentication on TPG
/iscsi/.../tpg1> set attribute authentication=1
Initiator configuration (/etc/iscsi/iscsid.conf)
node.session.auth.authmethod = CHAP
node.session.auth.username = initiator_user
node.session.auth.password = initiator_password
# Mutual CHAP
node.session.auth.username_in = target_user
node.session.auth.password_in = target_password
# Discover subsystems
nvme discover -t tcp -a 192.168.1.100 -s 4420
# Connect to specific subsystem
nvme connect -t tcp -a 192.168.1.100 -s 4420 \
-n nqn.2016-06.com.example:storage
# Connect with queue depth
nvme connect -t tcp -a 192.168.1.100 -s 4420 \
-n nqn.2016-06.com.example:storage --queue-size 1024
# Connect with controller loss timeout (seconds)
nvme connect -t tcp -a 192.168.1.100 -s 4420 \
-n nqn.2016-06.com.example:storage -l 3600
# Discover and connect to all available subsystems
nvme connect-all
Listing and disconnect
# List NVMe devices
nvme list
# List subsystems and paths
nvme list-subsys
# Disconnect by device
nvme disconnect -d /dev/nvme0n1
# Disconnect by NQN
nvme disconnect -n nqn.2016-06.com.example:storage
# Disconnect all
nvme disconnect-all
ANA (Asymmetric Namespace Access)
ANA is the NVMe-oF equivalent of SCSI ALUA, providing multipathing and path optimization. NVMe multipath is built into the kernel (not DM-Multipath).
ANA State
Meaning
Optimized
Path is optimal for I/O
Non-Optimized
Path is accessible but not optimal
Inaccessible
Path is not accessible
Persistent Loss
Path is in persistent loss state
Transitioning
Path is transitioning between states
# Enable NVMe multipath
modprobe nvme-multipath
# View multipath status
nvme list-subsys
# View ANA log
nvme ana-log /dev/nvme0
iSCSI vs NVMe-oF comparison
Feature
iSCSI
NVMe-oF
Latency
50-100μs typical
5-15μs (RDMA), ~200-400μs (TCP)
IOPS
100K-500K typical
500K-1M+ typical
CPU utilization
Higher (TCP stack)
Lower (especially RDMA)
Authentication
CHAP / mutual CHAP
DH-HMAC-CHAP, TLS
Multipathing
DM-Multipath (ALUA)
Native kernel (ANA)
Queue depth
Up to 2048
64K+ queues
Network requirements
Any Ethernet
TCP: any; RDMA: lossless/IB
Maturity
Very mature (early 2000s)
Newer, evolving ecosystem
Best for
General-purpose, cost-sensitive, cloud
High-performance, low-latency, flash
Best practices
Network isolation: use dedicated storage networks or VLANs.
Always use authentication: CHAP for iSCSI, DH-HMAC-CHAP for NVMe-oF.
Use mutual CHAP for bidirectional authentication.
Configure multipathing. DM-Multipath for iSCSI, native nvme-multipath for NVMe-oF.
Tune queue depth based on workload and storage capabilities.