Skip to content

iSCSI & NVMe-oF Volumes

Export ZFS volumes (ZVOLs) as block storage to application servers via iSCSI or NVMe over Fabrics (NVMe-oF/TCP). Used for databases, virtualization, and any workload requiring raw block devices.

  • Volumes & Pools — Create ZVOLs (Zpools tab > New ZVOL)
  • Mappings — Map volumes to controllers and hosts
  • Hosts — Define application servers
  • iSCSI — Monitor iSCSI targets, sessions, and connections
  • Configure Server > iSCSI — Configure portal groups and targets
  • Configure Server > NVMET — Configure NVMe-oF portal groups and subsystems
  1. Create a ZVOL (see ZFS Pools & Datasets)
  2. Define the application server (host)
  3. Create a volume mapping to a controller (iSCSI or NVMe-oF)
  4. Bind (activate) the mapping
  5. Connect from the client

Navigate to Hosts and click New:

FieldDescription
Host NameLabel for the application server
TypeiSCSI, NVMeF (NVMe over Fabrics), or FC (Fibre Channel)
IP AddressClient IP address
iSCSI NameIQN (for iSCSI hosts)
Host NQNNQN (for NVMe-oF hosts)

Navigate to Configure Server > iSCSI:

  1. Create a portal group with the server IP and port:

    • Portal group tag (integer)
    • Portal IP addresses
  2. Create an iSCSI target:

    • Target node name (IQN format: iqn.2017-08.com.zettalane:storage.node1)
    • Portal group assignment
    • Optional CHAP authentication (user/password)

Navigate to Mappings and click New:

FieldDescription
VolumeZVOL to export
Controlleriscsi
Target IDTarget identifier
LUNLogical Unit Number (or auto)
Node NameiSCSI IQN
AccessRestrict to specific host (optional)
Cluster IDFor HA configurations

Click Bind to activate.

Terminal window
# Install initiator
sudo yum install iscsi-initiator-utils # RHEL/Rocky
sudo apt install open-iscsi # Ubuntu
# Discover targets
iscsiadm -m discovery -t sendtargets -p <VIP>:3260
# Login to target
iscsiadm -m node -T iqn.2017-08.com.zettalane:storage.node1 \
-p <VIP>:3260 --login
# Verify
lsblk
  1. Open iSCSI Initiator (Control Panel > Administrative Tools)
  2. Enter the target IP (VIP address)
  3. Click Quick Connect
  4. Select the target and click Connect

Navigate to Configure Server > NVMET:

  1. Create a portal group with VIP and port:

    • Portal group tag
    • Portal addresses (e.g., 10.1.1.91:4420)
  2. Create an NVMe subsystem:

    • Subsystem NQN (e.g., nqn.2019-05.com.zettalane:mayascale-data-node-1)
    • Portal group assignment
    • Optional authentication (user/password)

Navigate to Mappings and click New:

FieldDescription
VolumeZVOL to export
Controllernvmet
Target ID / PortPortal group identifier
LUNNamespace number (or auto)
Node NameNVMe subsystem NQN
AccessRestrict to specific host (optional)
Cluster IDFor HA configurations

Click Bind to activate.

Terminal window
# Load the NVMe-TCP kernel module
sudo modprobe nvme-tcp
# Discover available targets
nvme discover -t tcp -a <VIP> -s 4420
# Connect to a target
nvme connect -t tcp \
-n nqn.2019-05.com.zettalane:mayascale-data-node-1 \
-a <VIP> -s 4420
# Verify
nvme list
# Disconnect
nvme disconnect -n nqn.2019-05.com.zettalane:mayascale-data-node-1

Windows requires the StarWind NVMeoF Initiator (free):

# Discover targets
StarNVMeoF_Ctrl.exe discovery_tcp <TARGET_IP> <CLIENT_IP>
# Connect to target
StarNVMeoF_Ctrl.exe insert_tcp <TARGET_IP> <CLIENT_IP> <NQN> <HOST_NQN>
# Disconnect
StarNVMeoF_ctrl remove <CONTROLLER_ID>

The iSCSI panel in the sidebar provides read-only monitoring:

  • Targets — Active iSCSI targets with IQN, target ID, LUN count
  • Initiators — Known iSCSI initiators
  • Sessions — Active sessions with initiator name, IP, connection parameters
  • Connections — Active connections with header/data digest, segment sizes
Terminal window
# --- Hosts ---
# Create an iSCSI host
mayacli create host dbserver iscsiname=iqn.2024-01.com.example:dbserver \
ipaddress=10.0.1.50
# Create an NVMe-oF host
mayacli create host appserver nqn=nqn.2024-01.com.example:appserver \
ipaddress=10.0.1.51
# Show hosts
mayacli show host
# --- iSCSI ---
# Create iSCSI portal group
mayacli create iscsi portalgroup=1 portal="10.1.1.91 10.1.1.95"
# Create iSCSI target
mayacli create iscsi \
nodename=iqn.2017-08.com.zettalane:storage.node1 \
portalgroup=1,2
# Create iSCSI target with CHAP authentication
mayacli create iscsi \
nodename=iqn.2017-08.com.zettalane:storage.node1 \
user=testuser password=testpass portalgroup=1
# Show iSCSI targets and sessions
mayacli show iscsi
mayacli show iscsi targets
mayacli show iscsi sessions
mayacli show iscsi connections
# Delete iSCSI target
mayacli delete iscsi nodename=iqn.2017-08.com.zettalane:storage.node1
# --- NVMe-oF ---
# Create NVMe-oF portal group
mayacli create nvmet portalgroup=1 portal="10.1.1.91:4420"
# Create NVMe subsystem
mayacli create nvmet \
nodename=nqn.2019-05.com.zettalane:mayascale-data-node-1 \
portalgroup=1,2
# Show NVMe-oF targets and sessions
mayacli show nvmet
mayacli show nvmet targets
mayacli show nvmet sessions
# Delete NVMe subsystem
mayacli delete nvmet nodename=nqn.2019-05.com.zettalane:mayascale-data-node-1
# --- Volume Mappings ---
# Map a ZVOL to iSCSI
mayacli create mapping volume=tank/vol1 controller=iscsi lun=0 \
targetid=1 nodename=iqn.2017-08.com.zettalane:storage.node1 \
access=dbserver
# Map a ZVOL to NVMe-oF
mayacli create mapping volume=tank/vol1 controller=nvmet lun=1 \
targetid=1 nodename=nqn.2019-05.com.zettalane:mayascale-data-node-1 \
access=appserver
# Bind (activate) a mapping
mayacli bind mapping volume=tank/vol1
# Unbind (deactivate) a mapping
mayacli unbind mapping volume=tank/vol1
# Show all mappings
mayacli show mapping
# Delete a mapping
mayacli delete mapping volume=tank/vol1 controller=iscsi

See CLI Guide for the full command reference.