]>
Commit | Line | Data |
---|---|---|
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 | |
f67539c2 TL |
74 | # for each network portal, and may optionally specify a port. |
75 | # If the port is omitted, 3260 will be used. | |
11fdf7f2 | 76 | # Syntax: |
f67539c2 | 77 | # Portal <Name> <IP address>[:<port>] |
7c673cae FG |
78 | [PortalGroup1] |
79 | Portal DA1 192.168.2.21:3260 | |
f67539c2 | 80 | Portal DA2 192.168.2.22:3260 |
7c673cae FG |
81 | |
82 | # Users must change the InitiatorGroup section(s) to match the IP | |
83 | # addresses and initiator configuration in their environment. | |
84 | # Netmask can be used to specify a single IP address or a range of IP addresses | |
85 | # Netmask 192.168.1.20 <== single IP address | |
86 | # Netmask 192.168.1.0/24 <== IP range 192.168.1.* | |
87 | [InitiatorGroup1] | |
11fdf7f2 | 88 | InitiatorName ANY |
7c673cae FG |
89 | Netmask 192.168.2.0/24 |
90 | ||
91 | # NVMe configuration options | |
92 | [Nvme] | |
93 | # NVMe Device Whitelist | |
94 | # Users may specify which NVMe devices to claim by their transport id. | |
95 | # See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format. | |
96 | # The second argument is the assigned name, which can be referenced from | |
97 | # other sections in the configuration file. For NVMe devices, a namespace | |
98 | # is automatically appended to each name in the format <YourName>nY, where | |
99 | # Y is the NSID (starts at 1). | |
100 | TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0 | |
101 | TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1 | |
102 | ||
103 | # The number of attempts per I/O when an I/O fails. Do not include | |
104 | # this key to get the default behavior. | |
105 | RetryCount 4 | |
11fdf7f2 TL |
106 | # Timeout for each command, in microseconds. If 0, don't track timeouts. |
107 | TimeoutUsec 0 | |
7c673cae FG |
108 | # Action to take on command time out. Only valid when Timeout is greater |
109 | # than 0. This may be 'Reset' to reset the controller, 'Abort' to abort | |
110 | # the command, or 'None' to just print a message but do nothing. | |
111 | # Admin command timeouts will always result in a reset. | |
112 | ActionOnTimeout None | |
113 | # Set how often the admin queue is polled for asynchronous events. | |
114 | # Units in microseconds. | |
115 | AdminPollRate 100000 | |
9f95a23c TL |
116 | # Set how often I/O queues are polled from completions. |
117 | # Units in microseconds. | |
118 | IOPollRate 0 | |
7c673cae | 119 | |
11fdf7f2 TL |
120 | # Disable handling of hotplug (runtime insert and remove) events, |
121 | # users can set to Yes if want to enable it. | |
122 | # Default: No | |
123 | HotplugEnable No | |
124 | ||
125 | # Set how often the hotplug is processed for insert and remove events. | |
126 | # Units in microseconds. | |
127 | HotplugPollRate 0 | |
7c673cae FG |
128 | |
129 | # Users may change this section to create a different number or size of | |
130 | # malloc LUNs. | |
11fdf7f2 TL |
131 | # If the system has hardware DMA engine, it can use an IOAT |
132 | # (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy | |
133 | # by specifying "Enable Yes" in [Ioat] section. | |
134 | # Offload is disabled by default even it is available. | |
7c673cae FG |
135 | [Malloc] |
136 | # Number of Malloc targets | |
9f95a23c | 137 | NumberOfLuns 5 |
7c673cae FG |
138 | # Malloc targets are 128M |
139 | LunSizeInMB 128 | |
140 | # Block size. Default is 512 bytes. | |
141 | BlockSize 4096 | |
142 | ||
11fdf7f2 TL |
143 | # Users can use offload by specifying "Enable Yes" in this section |
144 | # if it is available. | |
7c673cae FG |
145 | # Users may use the whitelist to initialize specified devices, IDS |
146 | # uses BUS:DEVICE.FUNCTION to identify each Ioat channel. | |
147 | [Ioat] | |
11fdf7f2 | 148 | Enable No |
7c673cae FG |
149 | Whitelist 00:04.0 |
150 | Whitelist 00:04.1 | |
151 | ||
152 | # Users must change this section to match the /dev/sdX devices to be | |
153 | # exported as iSCSI LUNs. The devices are accessed using Linux AIO. | |
154 | # The format is: | |
11fdf7f2 | 155 | # AIO <file name> <bdev name> [<block size>] |
7c673cae FG |
156 | # The file name is the backing device |
157 | # The bdev name can be referenced from elsewhere in the configuration file. | |
11fdf7f2 | 158 | # Block size may be omitted to automatically detect the block size of a disk. |
7c673cae FG |
159 | [AIO] |
160 | AIO /dev/sdb AIO0 | |
161 | AIO /dev/sdc AIO1 | |
11fdf7f2 TL |
162 | AIO /tmp/myfile AIO2 4096 |
163 | ||
164 | # PMDK libpmemblk-based block device | |
165 | [Pmem] | |
166 | # Syntax: | |
167 | # Blk <pmemblk pool file name> <bdev name> | |
168 | Blk /path/to/pmem-pool Pmem0 | |
7c673cae FG |
169 | |
170 | # The Split virtual block device slices block devices into multiple smaller bdevs. | |
171 | [Split] | |
172 | # Syntax: | |
173 | # Split <bdev> <count> [<size_in_megabytes>] | |
174 | ||
175 | # Split Malloc1 into two equally-sized portions, Malloc1p0 and Malloc1p1 | |
176 | Split Malloc1 2 | |
177 | ||
178 | # Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7, | |
179 | # leaving the rest of the device inaccessible | |
180 | Split Malloc2 8 1 | |
181 | ||
9f95a23c TL |
182 | # The RAID virtual block device based on pre-configured block device. |
183 | [RAID1] | |
184 | # Unique name of this RAID device. | |
185 | Name Raid0 | |
186 | # RAID level, only raid level 0 is supported. | |
187 | RaidLevel 0 | |
188 | # Strip size in KB. | |
189 | StripSize 64 | |
190 | # Number of pre-configured bdevs. | |
191 | NumDevices 2 | |
192 | # Pre-configured bdevs name with Nvme. | |
193 | #Devices Nvme0n1 Nvme1n1 | |
194 | # Pre-configured bdevs name with Malloc. | |
195 | Devices Malloc3 Malloc4 | |
196 | # Pre-configured bdevs name with AIO. | |
197 | #Devices AIO0 AIO1 | |
198 | ||
7c673cae FG |
199 | # Users should change the TargetNode section(s) below to match the |
200 | # desired iSCSI target node configuration. | |
201 | # TargetName, Mapping, LUN0 are minimum required | |
202 | [TargetNode1] | |
203 | TargetName disk1 | |
204 | TargetAlias "Data Disk1" | |
205 | Mapping PortalGroup1 InitiatorGroup1 | |
206 | AuthMethod Auto | |
207 | AuthGroup AuthGroup1 | |
208 | # Enable header and data digest | |
209 | # UseDigest Header Data | |
210 | UseDigest Auto | |
211 | # Use the first malloc target | |
212 | LUN0 Malloc0 | |
213 | # Using the first AIO target | |
214 | LUN1 AIO0 | |
215 | # Using the second storage target | |
216 | LUN2 AIO1 | |
217 | # Using the third storage target | |
218 | LUN3 AIO2 | |
219 | QueueDepth 128 | |
220 | ||
221 | [TargetNode2] | |
222 | TargetName disk2 | |
223 | TargetAlias "Data Disk2" | |
224 | Mapping PortalGroup1 InitiatorGroup1 | |
225 | AuthMethod Auto | |
226 | AuthGroup AuthGroup1 | |
227 | UseDigest Auto | |
228 | LUN0 Nvme0n1 | |
9f95a23c | 229 | LUN1 Raid0 |
7c673cae | 230 | QueueDepth 32 |