]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/etc/spdk/iscsi.conf.in
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / etc / spdk / iscsi.conf.in
CommitLineData
7c673cae
FG
1# iSCSI target configuration file
2#
3# Please write all parameters using ASCII.
4# The parameter must be quoted if it includes whitespace.
5#
6# Configuration syntax:
7# Leading whitespace is ignored.
8# Lines starting with '#' are comments.
9# Lines ending with '\' are concatenated with the next line.
10# Bracketed ([]) names define sections
11
12[Global]
13 # Shared Memory Group ID. SPDK applications with the same ID will share memory.
14 # Default: <the process PID>
15 #SharedMemoryID 0
16
11fdf7f2
TL
17 # Disable PCI access. PCI is enabled by default. Setting this
18 # option will hide any PCI device from all SPDK modules, making
19 # SPDK act as if they don't exist.
20 #NoPci Yes
7c673cae
FG
21
22 # Tracepoint group mask for spdk trace buffers
23 # Default: 0x0 (all tracepoint groups disabled)
11fdf7f2 24 # Set to 0xFFFF to enable all tracepoint groups.
7c673cae
FG
25 #TpointGroupMask 0x0
26
11fdf7f2
TL
27# Users may activate entries in this section to override default values for
28# global parameters in the block device (bdev) subsystem.
29[Bdev]
30 # Number of spdk_bdev_io structures allocated in the global bdev subsystem pool.
31 #BdevIoPoolSize 65536
32
33 # Maximum number of spdk_bdev_io structures to cache per thread.
34 #BdevIoCacheSize 256
7c673cae
FG
35
36[iSCSI]
37 # node name (not include optional part)
38 # Users can optionally change this to fit their environment.
39 NodeBase "iqn.2016-06.io.spdk"
40
41 AuthFile /usr/local/etc/spdk/auth.conf
42
7c673cae
FG
43 # Socket I/O timeout sec. (0 is infinite)
44 Timeout 30
45
46 # authentication information for discovery session
11fdf7f2
TL
47 # Options:
48 # None, Auto, CHAP and Mutual. Note that Mutual infers CHAP.
7c673cae
FG
49 DiscoveryAuthMethod Auto
50
51 #MaxSessions 128
52 #MaxConnectionsPerSession 2
53
54 # iSCSI initial parameters negotiate with initiators
55 # NOTE: incorrect values might crash
56 DefaultTime2Wait 2
57 DefaultTime2Retain 60
58
11fdf7f2
TL
59 # Maximum amount in bytes of unsolicited data the iSCSI
60 # initiator may send to the target during the execution of
61 # a single SCSI command.
62 FirstBurstLength 8192
63
7c673cae
FG
64 ImmediateData Yes
65 ErrorRecoveryLevel 0
66
7c673cae
FG
67# Users must change the PortalGroup section(s) to match the IP addresses
68# for their environment.
11fdf7f2
TL
69# PortalGroup sections define which network portals the iSCSI target
70# will use to listen for incoming connections. These are also used to
71# determine which targets are accessible over each portal group.
72# Up to 1024 portal directives are allowed. These define the network
73# portals of the portal group. The user must specify a IP address
74# for each network portal, and may optionally specify a port and
75# a cpumask. If the port is omitted, 3260 will be used. Cpumask will
76# be used to set the processor affinity of the iSCSI connection
77# through the portal. If the cpumask is omitted, cpumask will be
78# set to all available processors.
79# Syntax:
80# Portal <Name> <IP address>[:<port>[@<cpumask>]]
7c673cae
FG
81[PortalGroup1]
82 Portal DA1 192.168.2.21:3260
11fdf7f2 83 Portal DA2 192.168.2.22:3260@0xF
7c673cae
FG
84
85# Users must change the InitiatorGroup section(s) to match the IP
86# addresses and initiator configuration in their environment.
87# Netmask can be used to specify a single IP address or a range of IP addresses
88# Netmask 192.168.1.20 <== single IP address
89# Netmask 192.168.1.0/24 <== IP range 192.168.1.*
90[InitiatorGroup1]
11fdf7f2 91 InitiatorName ANY
7c673cae
FG
92 Netmask 192.168.2.0/24
93
94# NVMe configuration options
95[Nvme]
96 # NVMe Device Whitelist
97 # Users may specify which NVMe devices to claim by their transport id.
98 # See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
99 # The second argument is the assigned name, which can be referenced from
100 # other sections in the configuration file. For NVMe devices, a namespace
101 # is automatically appended to each name in the format <YourName>nY, where
102 # Y is the NSID (starts at 1).
103 TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
104 TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
105
106 # The number of attempts per I/O when an I/O fails. Do not include
107 # this key to get the default behavior.
108 RetryCount 4
11fdf7f2
TL
109 # Timeout for each command, in microseconds. If 0, don't track timeouts.
110 TimeoutUsec 0
7c673cae
FG
111 # Action to take on command time out. Only valid when Timeout is greater
112 # than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
113 # the command, or 'None' to just print a message but do nothing.
114 # Admin command timeouts will always result in a reset.
115 ActionOnTimeout None
116 # Set how often the admin queue is polled for asynchronous events.
117 # Units in microseconds.
118 AdminPollRate 100000
9f95a23c
TL
119 # Set how often I/O queues are polled from completions.
120 # Units in microseconds.
121 IOPollRate 0
7c673cae 122
11fdf7f2
TL
123 # Disable handling of hotplug (runtime insert and remove) events,
124 # users can set to Yes if want to enable it.
125 # Default: No
126 HotplugEnable No
127
128 # Set how often the hotplug is processed for insert and remove events.
129 # Units in microseconds.
130 HotplugPollRate 0
7c673cae
FG
131
132# Users may change this section to create a different number or size of
133# malloc LUNs.
11fdf7f2
TL
134# If the system has hardware DMA engine, it can use an IOAT
135# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
136# by specifying "Enable Yes" in [Ioat] section.
137# Offload is disabled by default even it is available.
7c673cae
FG
138[Malloc]
139 # Number of Malloc targets
9f95a23c 140 NumberOfLuns 5
7c673cae
FG
141 # Malloc targets are 128M
142 LunSizeInMB 128
143 # Block size. Default is 512 bytes.
144 BlockSize 4096
145
11fdf7f2
TL
146# Users can use offload by specifying "Enable Yes" in this section
147# if it is available.
7c673cae
FG
148# Users may use the whitelist to initialize specified devices, IDS
149# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
150[Ioat]
11fdf7f2 151 Enable No
7c673cae
FG
152 Whitelist 00:04.0
153 Whitelist 00:04.1
154
155# Users must change this section to match the /dev/sdX devices to be
156# exported as iSCSI LUNs. The devices are accessed using Linux AIO.
157# The format is:
11fdf7f2 158# AIO <file name> <bdev name> [<block size>]
7c673cae
FG
159# The file name is the backing device
160# The bdev name can be referenced from elsewhere in the configuration file.
11fdf7f2 161# Block size may be omitted to automatically detect the block size of a disk.
7c673cae
FG
162[AIO]
163 AIO /dev/sdb AIO0
164 AIO /dev/sdc AIO1
11fdf7f2
TL
165 AIO /tmp/myfile AIO2 4096
166
167# PMDK libpmemblk-based block device
168[Pmem]
169 # Syntax:
170 # Blk <pmemblk pool file name> <bdev name>
171 Blk /path/to/pmem-pool Pmem0
7c673cae
FG
172
173# The Split virtual block device slices block devices into multiple smaller bdevs.
174[Split]
175 # Syntax:
176 # Split <bdev> <count> [<size_in_megabytes>]
177
178 # Split Malloc1 into two equally-sized portions, Malloc1p0 and Malloc1p1
179 Split Malloc1 2
180
181 # Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7,
182 # leaving the rest of the device inaccessible
183 Split Malloc2 8 1
184
9f95a23c
TL
185# The RAID virtual block device based on pre-configured block device.
186[RAID1]
187 # Unique name of this RAID device.
188 Name Raid0
189 # RAID level, only raid level 0 is supported.
190 RaidLevel 0
191 # Strip size in KB.
192 StripSize 64
193 # Number of pre-configured bdevs.
194 NumDevices 2
195 # Pre-configured bdevs name with Nvme.
196 #Devices Nvme0n1 Nvme1n1
197 # Pre-configured bdevs name with Malloc.
198 Devices Malloc3 Malloc4
199 # Pre-configured bdevs name with AIO.
200 #Devices AIO0 AIO1
201
7c673cae
FG
202# Users should change the TargetNode section(s) below to match the
203# desired iSCSI target node configuration.
204# TargetName, Mapping, LUN0 are minimum required
205[TargetNode1]
206 TargetName disk1
207 TargetAlias "Data Disk1"
208 Mapping PortalGroup1 InitiatorGroup1
209 AuthMethod Auto
210 AuthGroup AuthGroup1
211 # Enable header and data digest
212 # UseDigest Header Data
213 UseDigest Auto
214 # Use the first malloc target
215 LUN0 Malloc0
216 # Using the first AIO target
217 LUN1 AIO0
218 # Using the second storage target
219 LUN2 AIO1
220 # Using the third storage target
221 LUN3 AIO2
222 QueueDepth 128
223
224[TargetNode2]
225 TargetName disk2
226 TargetAlias "Data Disk2"
227 Mapping PortalGroup1 InitiatorGroup1
228 AuthMethod Auto
229 AuthGroup AuthGroup1
230 UseDigest Auto
231 LUN0 Nvme0n1
9f95a23c 232 LUN1 Raid0
7c673cae 233 QueueDepth 32