192 |
- |
1 |
#
|
|
|
2 |
# Open-iSCSI default configuration.
|
|
|
3 |
# Could be located at /etc/iscsi/iscsid.conf or ~/.iscsid.conf
|
|
|
4 |
#
|
|
|
5 |
# Note: To set any of these values for a specific node/session run
|
|
|
6 |
# the iscsiadm --mode node --op command for the value. See the README
|
|
|
7 |
# and man page for iscsiadm for details on the --op command.
|
|
|
8 |
#
|
|
|
9 |
|
|
|
10 |
######################
|
|
|
11 |
# iscsid daemon config
|
|
|
12 |
######################
|
|
|
13 |
#
|
|
|
14 |
# If you want iscsid to start the first time an iscsi tool
|
|
|
15 |
# needs to access it, instead of starting it when the init
|
|
|
16 |
# scripts run, set the iscsid startup command here. This
|
|
|
17 |
# should normally only need to be done by distro package
|
|
|
18 |
# maintainers. If you leave the iscsid daemon running all
|
|
|
19 |
# the time then leave this attribute commented out.
|
|
|
20 |
#
|
|
|
21 |
# Default for Fedora and RHEL. (uncomment to activate).
|
|
|
22 |
iscsid.startup = /bin/systemctl start iscsid.socket iscsiuio.socket
|
|
|
23 |
#
|
|
|
24 |
# Default if you are not using systemd (uncomment to activate)
|
|
|
25 |
# iscsid.startup = /usr/bin/service start iscsid
|
|
|
26 |
|
|
|
27 |
# Check for active mounts on devices reachable through a session
|
|
|
28 |
# and refuse to logout if there are any. Defaults to "No".
|
|
|
29 |
# iscsid.safe_logout = Yes
|
|
|
30 |
|
|
|
31 |
#############################
|
|
|
32 |
# NIC/HBA and driver settings
|
|
|
33 |
#############################
|
|
|
34 |
# open-iscsi can create a session and bind it to a NIC/HBA.
|
|
|
35 |
# To set this up see the example iface config file.
|
|
|
36 |
|
|
|
37 |
#*****************
|
|
|
38 |
# Startup settings
|
|
|
39 |
#*****************
|
|
|
40 |
|
|
|
41 |
# To request that the iscsi initd scripts startup a session set to "automatic".
|
|
|
42 |
# node.startup = automatic
|
|
|
43 |
#
|
|
|
44 |
# To manually startup the session set to "manual". The default is automatic.
|
|
|
45 |
node.startup = automatic
|
|
|
46 |
|
|
|
47 |
# For "automatic" startup nodes, setting this to "Yes" will try logins on each
|
|
|
48 |
# available iface until one succeeds, and then stop. The default "No" will try
|
|
|
49 |
# logins on all available ifaces simultaneously.
|
|
|
50 |
node.leading_login = No
|
|
|
51 |
|
|
|
52 |
# *************
|
|
|
53 |
# CHAP Settings
|
|
|
54 |
# *************
|
|
|
55 |
|
|
|
56 |
# To enable CHAP authentication set node.session.auth.authmethod
|
|
|
57 |
# to CHAP. The default is None.
|
|
|
58 |
#node.session.auth.authmethod = CHAP
|
|
|
59 |
|
|
|
60 |
# To configure which CHAP algorithms to enable set
|
|
|
61 |
# node.session.auth.chap_algs to a comma seperated list.
|
|
|
62 |
# The algorithms should be listen with most prefered first.
|
|
|
63 |
# Valid values are MD5, SHA1, SHA256, and SHA3-256.
|
|
|
64 |
# The default is MD5.
|
|
|
65 |
#node.session.auth.chap_algs = SHA3-256,SHA256,SHA1,MD5
|
|
|
66 |
|
|
|
67 |
# To set a CHAP username and password for initiator
|
|
|
68 |
# authentication by the target(s), uncomment the following lines:
|
|
|
69 |
#node.session.auth.username = username
|
|
|
70 |
#node.session.auth.password = password
|
|
|
71 |
|
|
|
72 |
# To set a CHAP username and password for target(s)
|
|
|
73 |
# authentication by the initiator, uncomment the following lines:
|
|
|
74 |
#node.session.auth.username_in = username_in
|
|
|
75 |
#node.session.auth.password_in = password_in
|
|
|
76 |
|
|
|
77 |
# To enable CHAP authentication for a discovery session to the target
|
|
|
78 |
# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
|
|
|
79 |
#discovery.sendtargets.auth.authmethod = CHAP
|
|
|
80 |
|
|
|
81 |
# To set a discovery session CHAP username and password for the initiator
|
|
|
82 |
# authentication by the target(s), uncomment the following lines:
|
|
|
83 |
#discovery.sendtargets.auth.username = username
|
|
|
84 |
#discovery.sendtargets.auth.password = password
|
|
|
85 |
|
|
|
86 |
# To set a discovery session CHAP username and password for target(s)
|
|
|
87 |
# authentication by the initiator, uncomment the following lines:
|
|
|
88 |
#discovery.sendtargets.auth.username_in = username_in
|
|
|
89 |
#discovery.sendtargets.auth.password_in = password_in
|
|
|
90 |
|
|
|
91 |
# ********
|
|
|
92 |
# Timeouts
|
|
|
93 |
# ********
|
|
|
94 |
#
|
|
|
95 |
# See the iSCSI README's Advanced Configuration section for tips
|
|
|
96 |
# on setting timeouts when using multipath or doing root over iSCSI.
|
|
|
97 |
#
|
|
|
98 |
# To specify the length of time to wait for session re-establishment
|
|
|
99 |
# before failing SCSI commands back to the application when running
|
|
|
100 |
# the Linux SCSI Layer error handler, edit the line.
|
|
|
101 |
# The value is in seconds and the default is 120 seconds.
|
|
|
102 |
# Special values:
|
|
|
103 |
# - If the value is 0, IO will be failed immediately.
|
|
|
104 |
# - If the value is less than 0, IO will remain queued until the session
|
|
|
105 |
# is logged back in, or until the user runs the logout command.
|
|
|
106 |
node.session.timeo.replacement_timeout = 120
|
|
|
107 |
|
|
|
108 |
# To specify the time to wait for login to complete, edit the line.
|
|
|
109 |
# The value is in seconds and the default is 15 seconds.
|
|
|
110 |
node.conn[0].timeo.login_timeout = 15
|
|
|
111 |
|
|
|
112 |
# To specify the time to wait for logout to complete, edit the line.
|
|
|
113 |
# The value is in seconds and the default is 15 seconds.
|
|
|
114 |
node.conn[0].timeo.logout_timeout = 15
|
|
|
115 |
|
|
|
116 |
# Time interval to wait for on connection before sending a ping.
|
|
|
117 |
node.conn[0].timeo.noop_out_interval = 5
|
|
|
118 |
|
|
|
119 |
# To specify the time to wait for a Nop-out response before failing
|
|
|
120 |
# the connection, edit this line. Failing the connection will
|
|
|
121 |
# cause IO to be failed back to the SCSI layer. If using dm-multipath
|
|
|
122 |
# this will cause the IO to be failed to the multipath layer.
|
|
|
123 |
node.conn[0].timeo.noop_out_timeout = 5
|
|
|
124 |
|
|
|
125 |
# To specify the time to wait for abort response before
|
|
|
126 |
# failing the operation and trying a logical unit reset edit the line.
|
|
|
127 |
# The value is in seconds and the default is 15 seconds.
|
|
|
128 |
node.session.err_timeo.abort_timeout = 15
|
|
|
129 |
|
|
|
130 |
# To specify the time to wait for a logical unit response
|
|
|
131 |
# before failing the operation and trying session re-establishment
|
|
|
132 |
# edit the line.
|
|
|
133 |
# The value is in seconds and the default is 30 seconds.
|
|
|
134 |
node.session.err_timeo.lu_reset_timeout = 30
|
|
|
135 |
|
|
|
136 |
# To specify the time to wait for a target response
|
|
|
137 |
# before failing the operation and trying session re-establishment
|
|
|
138 |
# edit the line.
|
|
|
139 |
# The value is in seconds and the default is 30 seconds.
|
|
|
140 |
node.session.err_timeo.tgt_reset_timeout = 30
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
#******
|
|
|
144 |
# Retry
|
|
|
145 |
#******
|
|
|
146 |
|
|
|
147 |
# To specify the number of times iscsid should retry a login
|
|
|
148 |
# if the login attempt fails due to the node.conn[0].timeo.login_timeout
|
|
|
149 |
# expiring modify the following line. Note that if the login fails
|
|
|
150 |
# quickly (before node.conn[0].timeo.login_timeout fires) because the network
|
|
|
151 |
# layer or the target returns an error, iscsid may retry the login more than
|
|
|
152 |
# node.session.initial_login_retry_max times.
|
|
|
153 |
#
|
|
|
154 |
# This retry count along with node.conn[0].timeo.login_timeout
|
|
|
155 |
# determines the maximum amount of time iscsid will try to
|
|
|
156 |
# establish the initial login. node.session.initial_login_retry_max is
|
|
|
157 |
# multiplied by the node.conn[0].timeo.login_timeout to determine the
|
|
|
158 |
# maximum amount.
|
|
|
159 |
#
|
|
|
160 |
# The default node.session.initial_login_retry_max is 8 and
|
|
|
161 |
# node.conn[0].timeo.login_timeout is 15 so we have:
|
|
|
162 |
#
|
|
|
163 |
# node.conn[0].timeo.login_timeout * node.session.initial_login_retry_max =
|
|
|
164 |
# 120 seconds
|
|
|
165 |
#
|
|
|
166 |
# Valid values are any integer value. This only
|
|
|
167 |
# affects the initial login. Setting it to a high value can slow
|
|
|
168 |
# down the iscsi service startup. Setting it to a low value can
|
|
|
169 |
# cause a session to not get logged into, if there are distuptions
|
|
|
170 |
# during startup or if the network is not ready at that time.
|
|
|
171 |
node.session.initial_login_retry_max = 8
|
|
|
172 |
|
|
|
173 |
################################
|
|
|
174 |
# session and device queue depth
|
|
|
175 |
################################
|
|
|
176 |
|
|
|
177 |
# To control how many commands the session will queue set
|
|
|
178 |
# node.session.cmds_max to an integer between 2 and 2048 that is also
|
|
|
179 |
# a power of 2. The default is 128.
|
|
|
180 |
node.session.cmds_max = 128
|
|
|
181 |
|
|
|
182 |
# To control the device's queue depth set node.session.queue_depth
|
|
|
183 |
# to a value between 1 and 1024. The default is 32.
|
|
|
184 |
node.session.queue_depth = 32
|
|
|
185 |
|
|
|
186 |
##################################
|
|
|
187 |
# MISC SYSTEM PERFORMANCE SETTINGS
|
|
|
188 |
##################################
|
|
|
189 |
|
|
|
190 |
# For software iscsi (iscsi_tcp) and iser (ib_iser) each session
|
|
|
191 |
# has a thread used to transmit or queue data to the hardware. For
|
|
|
192 |
# cxgb3i you will get a thread per host.
|
|
|
193 |
#
|
|
|
194 |
# Setting the thread's priority to a lower value can lead to higher throughput
|
|
|
195 |
# and lower latencies. The lowest value is -20. Setting the priority to
|
|
|
196 |
# a higher value, can lead to reduced IO performance, but if you are seeing
|
|
|
197 |
# the iscsi or scsi threads dominate the use of the CPU then you may want
|
|
|
198 |
# to set this value higher.
|
|
|
199 |
#
|
|
|
200 |
# Note: For cxgb3i you must set all sessions to the same value, or the
|
|
|
201 |
# behavior is not defined.
|
|
|
202 |
#
|
|
|
203 |
# The default value is -20. The setting must be between -20 and 20.
|
|
|
204 |
node.session.xmit_thread_priority = -20
|
|
|
205 |
|
|
|
206 |
|
|
|
207 |
#***************
|
|
|
208 |
# iSCSI settings
|
|
|
209 |
#***************
|
|
|
210 |
|
|
|
211 |
# To enable R2T flow control (i.e., the initiator must wait for an R2T
|
|
|
212 |
# command before sending any data), uncomment the following line:
|
|
|
213 |
#
|
|
|
214 |
#node.session.iscsi.InitialR2T = Yes
|
|
|
215 |
#
|
|
|
216 |
# To disable R2T flow control (i.e., the initiator has an implied
|
|
|
217 |
# initial R2T of "FirstBurstLength" at offset 0), uncomment the following line:
|
|
|
218 |
#
|
|
|
219 |
# The defaults is No.
|
|
|
220 |
node.session.iscsi.InitialR2T = No
|
|
|
221 |
|
|
|
222 |
#
|
|
|
223 |
# To disable immediate data (i.e., the initiator does not send
|
|
|
224 |
# unsolicited data with the iSCSI command PDU), uncomment the following line:
|
|
|
225 |
#
|
|
|
226 |
#node.session.iscsi.ImmediateData = No
|
|
|
227 |
#
|
|
|
228 |
# To enable immediate data (i.e., the initiator sends unsolicited data
|
|
|
229 |
# with the iSCSI command packet), uncomment the following line:
|
|
|
230 |
#
|
|
|
231 |
# The default is Yes
|
|
|
232 |
node.session.iscsi.ImmediateData = Yes
|
|
|
233 |
|
|
|
234 |
# To specify the maximum number of unsolicited data bytes the initiator
|
|
|
235 |
# can send in an iSCSI PDU to a target, edit the following line.
|
|
|
236 |
#
|
|
|
237 |
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
|
|
238 |
# the default is 262144
|
|
|
239 |
node.session.iscsi.FirstBurstLength = 262144
|
|
|
240 |
|
|
|
241 |
# To specify the maximum SCSI payload that the initiator will negotiate
|
|
|
242 |
# with the target for, edit the following line.
|
|
|
243 |
#
|
|
|
244 |
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
|
|
245 |
# the defauls it 16776192
|
|
|
246 |
node.session.iscsi.MaxBurstLength = 16776192
|
|
|
247 |
|
|
|
248 |
# To specify the maximum number of data bytes the initiator can receive
|
|
|
249 |
# in an iSCSI PDU from a target, edit the following line.
|
|
|
250 |
#
|
|
|
251 |
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
|
|
252 |
# the default is 262144
|
|
|
253 |
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
|
|
|
254 |
|
|
|
255 |
# To specify the maximum number of data bytes the initiator will send
|
|
|
256 |
# in an iSCSI PDU to the target, edit the following line.
|
|
|
257 |
#
|
|
|
258 |
# The value is the number of bytes in the range of 512 to (2^24-1).
|
|
|
259 |
# Zero is a special case. If set to zero, the initiator will use
|
|
|
260 |
# the target's MaxRecvDataSegmentLength for the MaxXmitDataSegmentLength.
|
|
|
261 |
# The default is 0.
|
|
|
262 |
node.conn[0].iscsi.MaxXmitDataSegmentLength = 0
|
|
|
263 |
|
|
|
264 |
# To specify the maximum number of data bytes the initiator can receive
|
|
|
265 |
# in an iSCSI PDU from a target during a discovery session, edit the
|
|
|
266 |
# following line.
|
|
|
267 |
#
|
|
|
268 |
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
|
|
269 |
# the default is 32768
|
|
|
270 |
#
|
|
|
271 |
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
|
|
|
272 |
|
|
|
273 |
# To allow the targets to control the setting of the digest checking,
|
|
|
274 |
# with the initiator requesting a preference of enabling the checking, uncomment
|
|
|
275 |
# the following lines (Data digests are not supported.):
|
|
|
276 |
#node.conn[0].iscsi.HeaderDigest = CRC32C,None
|
|
|
277 |
|
|
|
278 |
#
|
|
|
279 |
# To allow the targets to control the setting of the digest checking,
|
|
|
280 |
# with the initiator requesting a preference of disabling the checking,
|
|
|
281 |
# uncomment the following line:
|
|
|
282 |
#node.conn[0].iscsi.HeaderDigest = None,CRC32C
|
|
|
283 |
#
|
|
|
284 |
# To enable CRC32C digest checking for the header and/or data part of
|
|
|
285 |
# iSCSI PDUs, uncomment the following line:
|
|
|
286 |
#node.conn[0].iscsi.HeaderDigest = CRC32C
|
|
|
287 |
#
|
|
|
288 |
# To disable digest checking for the header and/or data part of
|
|
|
289 |
# iSCSI PDUs, uncomment the following line:
|
|
|
290 |
#node.conn[0].iscsi.HeaderDigest = None
|
|
|
291 |
#
|
|
|
292 |
# The default is to never use DataDigests or HeaderDigests.
|
|
|
293 |
#
|
|
|
294 |
node.conn[0].iscsi.HeaderDigest = None
|
|
|
295 |
|
|
|
296 |
# For multipath configurations, you may want more than one session to be
|
|
|
297 |
# created on each iface record. If node.session.nr_sessions is greater
|
|
|
298 |
# than 1, performing a 'login' for that node will ensure that the
|
|
|
299 |
# appropriate number of sessions is created.
|
|
|
300 |
node.session.nr_sessions = 1
|
|
|
301 |
|
|
|
302 |
# When iscsid starts up it recovers existing sessions, if possible.
|
|
|
303 |
# If the target for a session has gone away when this occurs, the
|
|
|
304 |
# iscsid daemon normally tries to reestablish each session,
|
|
|
305 |
# in succession, in the background, by trying again every two
|
|
|
306 |
# seconds, until all sessions are restored. This configuration
|
|
|
307 |
# variable can limits the number of retries for each session.
|
|
|
308 |
# For example, setting reopen_max=150 would mean that each session
|
|
|
309 |
# recovery was limited to about five minutes.
|
|
|
310 |
#
|
|
|
311 |
node.session.reopen_max = 0
|
|
|
312 |
|
|
|
313 |
#************
|
|
|
314 |
# Workarounds
|
|
|
315 |
#************
|
|
|
316 |
|
|
|
317 |
# Some targets like IET prefer after an initiator has sent a task
|
|
|
318 |
# management function like an ABORT TASK or LOGICAL UNIT RESET, that
|
|
|
319 |
# it does not respond to PDUs like R2Ts. To enable this behavior uncomment
|
|
|
320 |
# the following line (The default behavior is Yes):
|
|
|
321 |
node.session.iscsi.FastAbort = Yes
|
|
|
322 |
|
|
|
323 |
# Some targets like Equalogic prefer that after an initiator has sent
|
|
|
324 |
# a task management function like an ABORT TASK or LOGICAL UNIT RESET, that
|
|
|
325 |
# it continue to respond to R2Ts. To enable this uncomment this line
|
|
|
326 |
# node.session.iscsi.FastAbort = No
|
|
|
327 |
|
|
|
328 |
# To prevent doing automatic scans that would add unwanted luns to the system
|
|
|
329 |
# we can disable them and have sessions only do manually requested scans.
|
|
|
330 |
# Automatic scans are performed on startup, on login, and on AEN/AER reception
|
|
|
331 |
# on devices supporting it. For HW drivers all sessions will use the value
|
|
|
332 |
# defined in the configuration file. This configuration option is independent
|
|
|
333 |
# of scsi_mod scan parameter. (The default behavior is auto):
|
|
|
334 |
node.session.scan = auto
|