Unraid - NVMe over TCP

Proxmox 9.3 added NVMe over Fabrics to the GUI. (Datacenter → SAN → Add Shared LVM → NVMe over Fabrics)

The problem- my storage is on Unraid, and Unraid does not support NVMe over TCP.

My solution- a plugin which adds it. I also benchmarked it against iSCSI, using the same zvol.

Why doesn't Unraid support it?

Unraid 7.3.1 has the NVMe target built into the kernel. The TCP transport is just not enabled.

From /usr/src/linux-6.18.33-Unraid/config

CONFIG_NVME_TARGET=y
# CONFIG_NVME_TARGET_TCP is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODVERSIONS is not set

Since module signing and symbol versioning are both disabled, a nvmet-tcp.ko built from the same kernel source and config will load. It only needs a matching vermagic.

So, the only thing missing is a single kernel module.

Options

  1. SPDK in a docker container. Fast, but it burns CPU cores polling, needs hugepages, and wants to own entire drives. I want to use my existing zvols.
  2. A VM with a stock kernel. Easy, but everything goes through virtio networking.
  3. Build the missing module, and package it as a plugin. The catch- it has to be rebuilt for every Unraid kernel.

I went with option 3, and used GitHub Actions to handle the rebuilds.

The plugin

GitHub: XtremeOwnageDotCom/unraid-nvmeof

  • Builds nvmet-tcp.ko from the kernel.org source, using Unraid's config and patches, and the same gcc version.
  • Fails the build if the config differs from Unraid's, or if the vermagic doesn't match.
  • Includes nvmetcli, with its own python libraries, so it does not conflict with targetcli from the iSCSI plugin.
  • Saves the config to flash. Restores it when the array starts, and clears it before the array stops.

Unraid's kernel config and patches are included in the release zip, so the module can be built for a new release before you update.

flowchart TD
    A[Boot / plugin install] --> B[Download userland + nvmet-tcp for uname -r<br/>verify sha256]
    B --> C[modprobe nvmet-tcp]
    C --> D{Array started?}
    D -- disks_mounted --> E[Wait for zvols]
    E --> F[nvmetcli restore<br/>from flash]
    F --> G[Serving]
    G -- saveconfig --> H[Config copied to flash]
    H --> G
    G -- unmounting_disks --> I[nvmetcli clear]
    I --> J[Pools export]

Installing

Plugins → Install Plugin

https://raw.githubusercontent.com/XtremeOwnageDotCom/unraid-nvmeof/main/nvmeof.plg

There is a status page under Settings → Network Services → NVMe over Fabrics.

Setting up an export

For testing, I created a 50G sparse zvol on my NVMe cache pool.

zfs create -s -V 50G -o volblocksize=16k -o compression=lz4 cache/nvmeof-poc

Then, a TCP port, and a subsystem which only my three Proxmox hosts can connect to.

Host NQNs can be found in /etc/nvme/hostnqn on each node, or using the “Copy Host NQNs” button in the Proxmox wizard.

nvmetcli
/> cd /ports
/ports> create 1
/ports> cd 1
/ports/1> set addr trtype=tcp adrfam=ipv4 traddr=<unraid-ip> trsvcid=4420
/> cd /hosts
/hosts> create <host-nqn-1>
/hosts> create <host-nqn-2>
/hosts> create <host-nqn-3>
/> cd /subsystems
/subsystems> create nqn.2026-11.lan.tower:pve-poc
/subsystems> cd nqn.2026-11.lan.tower:pve-poc
/subsystems/nqn.2026-11.lan.tower:pve-poc> set attr allow_any_host=0
/subsystems/nqn.2026-11.lan.tower:pve-poc> cd allowed_hosts
.../allowed_hosts> create <host-nqn-1>
.../allowed_hosts> create <host-nqn-2>
.../allowed_hosts> create <host-nqn-3>
.../allowed_hosts> cd ../namespaces
.../namespaces> create 1
.../namespaces> cd 1
.../namespaces/1> set device path=/dev/zvol/cache/nvmeof-poc
.../namespaces/1> enable
/> cd /ports/1/subsystems
/ports/1/subsystems> create nqn.2026-11.lan.tower:pve-poc
/> saveconfig

After saveconfig, the plugin copies the config to flash.

From a Proxmox node:

root@kube01:~# nvme discover -t tcp -a <unraid-ip> -s 4420
=====Discovery Log Entry 1======
trtype:  tcp
subtype: nvme subsystem
portid:  1
trsvcid: 4420
subnqn:  nqn.2026-11.lan.tower:pve-poc

root@kube01:~# nvme connect -t tcp -a <unraid-ip> -s 4420 -n nqn.2026-11.lan.tower:pve-poc
connecting to device: nvme1

root@kube01:~# nvme list
Node          SN                    Model   Namespace  Usage
/dev/nvme1n1  19416fda0578c07c5087  Linux   0x1        53.69 GB / 53.69 GB

NVMe/TCP vs iSCSI

Setup

  • Unraid 7.3.1. ZFS pool with 4x mirrored Samsung PM961. ConnectX-4 Lx, 25GbE.
  • Proxmox 9.3.1 node, 25GbE.
  • Both tests used the same zvol, host, and network. For the iSCSI test, I disabled the NVMe namespace, and exported the zvol with LIO. (Same target used by Unraid's iSCSI plugin.)
  • Default settings for both.
  • fio, direct=1, libaio, against the first 10G of the device. 20 second runs.

Results

Test NVMe/TCP iSCSI Difference
4k random read, QD1 4,161 IOPS, 212 µs avg 4,271 IOPS, 226 µs avg About the same
4k random write, QD1 3,779 IOPS, 234 µs avg 3,570 IOPS, 271 µs avg +6%
4k write + fsync, QD1 1,045 IOPS 851 IOPS +23%
4k random read, QD32 x 4 jobs 95,904 IOPS, p99 3.5 ms 31,703 IOPS, p99 11.1 ms 3.0x
4k random write, QD32 x 4 jobs 80,089 IOPS, p99 6.7 ms 24,820 IOPS, p99 14.6 ms 3.2x
1M sequential read, QD16 1,685 MiB/s 1,431 MiB/s +18%
1M sequential write, QD16 1,249 MiB/s 882 MiB/s +42%
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#ff9800"}}}}%%
xychart-beta
    title "4k IOPS, QD32 x4 (higher is better)"
    x-axis ["Read NVMe", "Read iSCSI", "Write NVMe", "Write iSCSI"]
    y-axis "IOPS" 0 --> 100000
    bar [95904, 31703, 80089, 24820]
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#ff9800"}}}}%%
xychart-beta
    title "4k p99 latency, QD32 x4 (lower is better)"
    x-axis ["Read NVMe", "Read iSCSI", "Write NVMe", "Write iSCSI"]
    y-axis "ms" 0 --> 16
    bar [3.5, 11.1, 6.7, 14.6]
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#ff9800"}}}}%%
xychart-beta
    title "4k avg latency, QD1 (lower is better)"
    x-axis ["Read NVMe", "Read iSCSI", "Write NVMe", "Write iSCSI"]
    y-axis "Average µs" 0 --> 300
    bar [212, 226, 234, 271]
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#ff9800"}}}}%%
xychart-beta
    title "1M sequential, QD16 (higher is better)"
    x-axis ["Read NVMe", "Read iSCSI", "Write NVMe", "Write iSCSI"]
    y-axis "MiB/s" 0 --> 1800
    bar [1685, 1431, 1249, 882]

At queue depth 1, there is not much difference.

With parallel IO, NVMe/TCP is around 3x faster. NVMe/TCP uses a queue and TCP connection per CPU core, while iSCSI is using a single session.

flowchart LR
    subgraph nvme["NVMe/TCP"]
        direction LR
        N0[CPU 0] --> NQ0[Queue 0<br/>TCP conn 0]
        N1[CPU 1] --> NQ1[Queue 1<br/>TCP conn 1]
        N2[CPU 2] --> NQ2[Queue 2<br/>TCP conn 2]
        N3[CPU 3] --> NQ3[Queue 3<br/>TCP conn 3]
        NQ0 & NQ1 & NQ2 & NQ3 --> NT[nvmet]
    end
    subgraph iscsi["iSCSI"]
        direction LR
        I0[CPU 0] & I1[CPU 1] & I2[CPU 2] & I3[CPU 3] --> IS[1 session<br/>1 TCP conn]
        IS --> IT[LIO]
    end

The IO path is also shorter. iSCSI has a SCSI layer on both ends.

flowchart TB
    subgraph iscsi["iSCSI"]
        direction TB
        a1[VM / App] --> a2[Block layer] --> a3[SCSI layer] --> a4[iscsi_tcp] --> a5((Network)) --> a6[LIO iSCSI target] --> a7[LIO SCSI core] --> a8[iblock] --> a9[(zvol)]
    end
    subgraph nvme["NVMe/TCP"]
        direction TB
        b1[VM / App] --> b2[Block layer] --> b3[nvme core] --> b4[nvme-tcp] --> b5((Network)) --> b6[nvmet-tcp] --> b7[nvmet] --> b9[(zvol)]
    end

The fsync test is limited by my PM961s, which do not have power loss protection.

Notes:

  • I only ran each test once, on a cluster which was in use.
  • iSCSI was not tuned. Multipath, multiple sessions, or switching from mq-deadline to none would likely help.

Gotchas

  • No encryption. Keep it on a storage network / vlan.
  • No RDMA. Unraid does not include the InfiniBand stack.
  • Before updating Unraid, make sure there is a module built for the new kernel. Otherwise, the target will not start after the reboot.

What's next

  • Using the Proxmox wizard to put shared LVM on top of it.
  • Moving my Kubernetes PVCs from iSCSI to democratic-csi's zfs-generic-nvmeof driver. Docs are in the repo.

Summary

Unraid only needed one kernel module to support NVMe over TCP. With the same zvol, latency is about the same as iSCSI, and parallel IO is around 3x faster.

Issues and PRs are welcome on GitHub.

Disclaimers

This is a new plugin, which loads a kernel module onto your storage server. I tested it on my server. I cannot guarantee it will work on yours.

Make sure you have backups.