2016-08-03 21:37:16 +00:00
|
|
|
# iSCSI target configuration file
|
|
|
|
#
|
|
|
|
# Please write all parameters using ASCII.
|
|
|
|
# The parameter must be quoted if it includes whitespace.
|
|
|
|
#
|
|
|
|
# Configuration syntax:
|
|
|
|
# Leading whitespace is ignored.
|
|
|
|
# Lines starting with '#' are comments.
|
|
|
|
# Lines ending with '\' are concatenated with the next line.
|
|
|
|
# Bracketed ([]) names define sections
|
|
|
|
|
|
|
|
[Global]
|
2017-02-01 21:34:45 +00:00
|
|
|
# Shared Memory Group ID. SPDK applications with the same ID will share memory.
|
|
|
|
# Default: <the process PID>
|
|
|
|
#SharedMemoryID 0
|
2016-08-03 21:37:16 +00:00
|
|
|
|
2017-10-03 19:35:53 +00:00
|
|
|
# Disable PCI access. PCI is enabled by default. Setting this
|
|
|
|
# option will hide any PCI device from all SPDK modules, making
|
|
|
|
# SPDK act as if they don't exist.
|
|
|
|
#NoPci Yes
|
|
|
|
|
2016-08-03 21:37:16 +00:00
|
|
|
# Tracepoint group mask for spdk trace buffers
|
|
|
|
# Default: 0x0 (all tracepoint groups disabled)
|
2018-08-16 05:01:26 +00:00
|
|
|
# Set to 0xFFFF to enable all tracepoint groups.
|
2016-08-03 21:37:16 +00:00
|
|
|
#TpointGroupMask 0x0
|
|
|
|
|
2018-06-11 14:35:48 +00:00
|
|
|
# Users may activate entries in this section to override default values for
|
|
|
|
# global parameters in the block device (bdev) subsystem.
|
|
|
|
[Bdev]
|
|
|
|
# Number of spdk_bdev_io structures allocated in the global bdev subsystem pool.
|
|
|
|
#BdevIoPoolSize 65536
|
|
|
|
|
|
|
|
# Maximum number of spdk_bdev_io structures to cache per thread.
|
|
|
|
#BdevIoCacheSize 256
|
|
|
|
|
2016-08-03 21:37:16 +00:00
|
|
|
[iSCSI]
|
|
|
|
# node name (not include optional part)
|
|
|
|
# Users can optionally change this to fit their environment.
|
|
|
|
NodeBase "iqn.2016-06.io.spdk"
|
|
|
|
|
|
|
|
AuthFile /usr/local/etc/spdk/auth.conf
|
|
|
|
|
|
|
|
MinConnectionsPerCore 4
|
|
|
|
|
|
|
|
# Socket I/O timeout sec. (0 is infinite)
|
|
|
|
Timeout 30
|
|
|
|
|
|
|
|
# authentication information for discovery session
|
2017-10-26 04:14:36 +00:00
|
|
|
# Options:
|
|
|
|
# None, Auto, CHAP and Mutual. Note that Mutual infers CHAP.
|
2016-08-03 21:37:16 +00:00
|
|
|
DiscoveryAuthMethod Auto
|
|
|
|
|
|
|
|
#MaxSessions 128
|
|
|
|
#MaxConnectionsPerSession 2
|
|
|
|
|
|
|
|
# iSCSI initial parameters negotiate with initiators
|
|
|
|
# NOTE: incorrect values might crash
|
|
|
|
DefaultTime2Wait 2
|
|
|
|
DefaultTime2Retain 60
|
|
|
|
|
2018-08-10 18:27:02 +00:00
|
|
|
# Maximum amount in bytes of unsolicited data the iSCSI
|
|
|
|
# initiator may send to the target during the execution of
|
|
|
|
# a single SCSI command.
|
|
|
|
FirstBurstLength 8192
|
|
|
|
|
2016-08-03 21:37:16 +00:00
|
|
|
ImmediateData Yes
|
|
|
|
ErrorRecoveryLevel 0
|
|
|
|
|
|
|
|
# Users must change the PortalGroup section(s) to match the IP addresses
|
|
|
|
# for their environment.
|
2017-12-18 04:32:42 +00:00
|
|
|
# PortalGroup sections define which network portals the iSCSI target
|
|
|
|
# will use to listen for incoming connections. These are also used to
|
|
|
|
# determine which targets are accessible over each portal group.
|
2017-12-25 01:11:25 +00:00
|
|
|
# Up to 1024 portal directives are allowed. These define the network
|
2017-12-18 04:32:42 +00:00
|
|
|
# portals of the portal group. The user must specify a IP address
|
|
|
|
# for each network portal, and may optionally specify a port and
|
|
|
|
# a cpumask. If the port is omitted, 3260 will be used. Cpumask will
|
|
|
|
# be used to set the processor affinity of the iSCSI connection
|
|
|
|
# through the portal. If the cpumask is omitted, cpumask will be
|
|
|
|
# set to all available processors.
|
|
|
|
# Syntax:
|
|
|
|
# Portal <Name> <IP address>[:<port>[@<cpumask>]]
|
2016-08-03 21:37:16 +00:00
|
|
|
[PortalGroup1]
|
|
|
|
Portal DA1 192.168.2.21:3260
|
2017-12-18 04:32:42 +00:00
|
|
|
Portal DA2 192.168.2.22:3260@0xF
|
2016-08-03 21:37:16 +00:00
|
|
|
|
|
|
|
# Users must change the InitiatorGroup section(s) to match the IP
|
|
|
|
# addresses and initiator configuration in their environment.
|
|
|
|
# Netmask can be used to specify a single IP address or a range of IP addresses
|
|
|
|
# Netmask 192.168.1.20 <== single IP address
|
|
|
|
# Netmask 192.168.1.0/24 <== IP range 192.168.1.*
|
|
|
|
[InitiatorGroup1]
|
2017-11-29 05:51:23 +00:00
|
|
|
InitiatorName ANY
|
2016-08-03 21:37:16 +00:00
|
|
|
Netmask 192.168.2.0/24
|
|
|
|
|
|
|
|
# NVMe configuration options
|
|
|
|
[Nvme]
|
2017-01-25 23:36:40 +00:00
|
|
|
# NVMe Device Whitelist
|
|
|
|
# Users may specify which NVMe devices to claim by their transport id.
|
|
|
|
# See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
|
2017-03-01 20:35:59 +00:00
|
|
|
# The second argument is the assigned name, which can be referenced from
|
|
|
|
# other sections in the configuration file. For NVMe devices, a namespace
|
|
|
|
# is automatically appended to each name in the format <YourName>nY, where
|
|
|
|
# Y is the NSID (starts at 1).
|
|
|
|
TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
|
|
|
|
TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
|
2016-08-03 21:37:16 +00:00
|
|
|
|
|
|
|
# The number of attempts per I/O when an I/O fails. Do not include
|
|
|
|
# this key to get the default behavior.
|
2017-04-04 18:12:40 +00:00
|
|
|
RetryCount 4
|
2018-07-09 21:04:33 +00:00
|
|
|
# Timeout for each command, in microseconds. If 0, don't track timeouts.
|
|
|
|
TimeoutUsec 0
|
2017-03-30 19:49:52 +00:00
|
|
|
# Action to take on command time out. Only valid when Timeout is greater
|
|
|
|
# than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
|
|
|
|
# the command, or 'None' to just print a message but do nothing.
|
|
|
|
# Admin command timeouts will always result in a reset.
|
|
|
|
ActionOnTimeout None
|
2017-01-13 19:58:23 +00:00
|
|
|
# Set how often the admin queue is polled for asynchronous events.
|
|
|
|
# Units in microseconds.
|
|
|
|
AdminPollRate 100000
|
2016-08-03 21:37:16 +00:00
|
|
|
|
2017-08-17 14:18:52 +00:00
|
|
|
# Disable handling of hotplug (runtime insert and remove) events,
|
|
|
|
# users can set to Yes if want to enable it.
|
|
|
|
# Default: No
|
|
|
|
HotplugEnable No
|
2017-03-30 19:57:10 +00:00
|
|
|
|
2017-12-13 07:21:51 +00:00
|
|
|
# Set how often the hotplug is processed for insert and remove events.
|
|
|
|
# Units in microseconds.
|
|
|
|
HotplugPollRate 0
|
|
|
|
|
2016-08-03 21:37:16 +00:00
|
|
|
# Users may change this section to create a different number or size of
|
|
|
|
# malloc LUNs.
|
2018-06-05 23:33:20 +00:00
|
|
|
# If the system has hardware DMA engine, it can use an IOAT
|
|
|
|
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
|
|
|
|
# by specifying "Enable Yes" in [Ioat] section.
|
|
|
|
# Offload is disabled by default even it is available.
|
2016-08-03 21:37:16 +00:00
|
|
|
[Malloc]
|
|
|
|
# Number of Malloc targets
|
2016-08-29 17:15:47 +00:00
|
|
|
NumberOfLuns 3
|
2016-08-03 21:37:16 +00:00
|
|
|
# Malloc targets are 128M
|
|
|
|
LunSizeInMB 128
|
|
|
|
# Block size. Default is 512 bytes.
|
|
|
|
BlockSize 4096
|
|
|
|
|
2018-06-05 23:33:20 +00:00
|
|
|
# Users can use offload by specifying "Enable Yes" in this section
|
|
|
|
# if it is available.
|
2016-08-03 21:37:16 +00:00
|
|
|
# Users may use the whitelist to initialize specified devices, IDS
|
|
|
|
# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
|
|
|
|
[Ioat]
|
2018-06-05 23:33:20 +00:00
|
|
|
Enable No
|
2016-08-03 21:37:16 +00:00
|
|
|
Whitelist 00:04.0
|
|
|
|
Whitelist 00:04.1
|
|
|
|
|
|
|
|
# Users must change this section to match the /dev/sdX devices to be
|
2017-03-01 23:50:29 +00:00
|
|
|
# exported as iSCSI LUNs. The devices are accessed using Linux AIO.
|
|
|
|
# The format is:
|
2017-08-10 00:28:32 +00:00
|
|
|
# AIO <file name> <bdev name> [<block size>]
|
2017-03-01 23:50:29 +00:00
|
|
|
# The file name is the backing device
|
|
|
|
# The bdev name can be referenced from elsewhere in the configuration file.
|
2017-08-10 00:28:32 +00:00
|
|
|
# Block size may be omitted to automatically detect the block size of a disk.
|
2016-08-03 21:37:16 +00:00
|
|
|
[AIO]
|
2017-03-01 23:50:29 +00:00
|
|
|
AIO /dev/sdb AIO0
|
|
|
|
AIO /dev/sdc AIO1
|
2017-08-10 00:28:32 +00:00
|
|
|
AIO /tmp/myfile AIO2 4096
|
2016-08-03 21:37:16 +00:00
|
|
|
|
2018-03-30 17:08:58 +00:00
|
|
|
# PMDK libpmemblk-based block device
|
|
|
|
[Pmem]
|
|
|
|
# Syntax:
|
|
|
|
# Blk <pmemblk pool file name> <bdev name>
|
|
|
|
Blk /path/to/pmem-pool Pmem0
|
|
|
|
|
2016-08-29 17:15:47 +00:00
|
|
|
# The Split virtual block device slices block devices into multiple smaller bdevs.
|
|
|
|
[Split]
|
|
|
|
# Syntax:
|
|
|
|
# Split <bdev> <count> [<size_in_megabytes>]
|
|
|
|
|
|
|
|
# Split Malloc1 into two equally-sized portions, Malloc1p0 and Malloc1p1
|
|
|
|
Split Malloc1 2
|
|
|
|
|
|
|
|
# Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7,
|
|
|
|
# leaving the rest of the device inaccessible
|
|
|
|
Split Malloc2 8 1
|
|
|
|
|
2016-08-03 21:37:16 +00:00
|
|
|
# Users should change the TargetNode section(s) below to match the
|
|
|
|
# desired iSCSI target node configuration.
|
|
|
|
# TargetName, Mapping, LUN0 are minimum required
|
|
|
|
[TargetNode1]
|
|
|
|
TargetName disk1
|
|
|
|
TargetAlias "Data Disk1"
|
|
|
|
Mapping PortalGroup1 InitiatorGroup1
|
|
|
|
AuthMethod Auto
|
|
|
|
AuthGroup AuthGroup1
|
|
|
|
# Enable header and data digest
|
|
|
|
# UseDigest Header Data
|
|
|
|
UseDigest Auto
|
|
|
|
# Use the first malloc target
|
|
|
|
LUN0 Malloc0
|
|
|
|
# Using the first AIO target
|
|
|
|
LUN1 AIO0
|
|
|
|
# Using the second storage target
|
|
|
|
LUN2 AIO1
|
|
|
|
# Using the third storage target
|
|
|
|
LUN3 AIO2
|
|
|
|
QueueDepth 128
|
|
|
|
|
|
|
|
[TargetNode2]
|
|
|
|
TargetName disk2
|
|
|
|
TargetAlias "Data Disk2"
|
|
|
|
Mapping PortalGroup1 InitiatorGroup1
|
|
|
|
AuthMethod Auto
|
|
|
|
AuthGroup AuthGroup1
|
|
|
|
UseDigest Auto
|
2017-03-01 20:35:59 +00:00
|
|
|
LUN0 Nvme0n1
|
2016-08-03 21:37:16 +00:00
|
|
|
QueueDepth 32
|