Whamcloud - gitweb
dca672dd3e40a87d81f3d2f43fbb72c83cb1a44a
[fs/lustre-release.git] / lustre / doc / lctl.8
1 .TH lctl 1 "2003 Oct 8" Lustre "configuration utilities"
2 .SH NAME
3 lctl \- Low level Lustre filesystem configuration utility
4 .SH SYNOPSIS
5 .br
6 .B lctl
7 .br
8 .B lctl --device <devno> <command [args]>
9 .br
10 .SH DESCRIPTION
11 .B lctl
12 is used to directly control Lustre via an ioctl interface, allowing
13 various configuration, maintenance, and debugging features to be accessed.
14  
15 .B lctl
16 can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are
17 .B dl
18 ,
19 .B dk
20 ,
21 .B device 
22 ,
23 .B network 
24 .I <up/down>
25 ,
26 .B list_nids
27 ,
28 .B ping
29 .I nid
30 ,
31 .B help
32 ,
33 .B quit.
34
35 To get a complete listing of available commands, type
36 .B help
37 at the lctl prompt.  To get basic help on the meaning and syntax of a
38 command, type 
39 .B help 
40 .I command
41 .  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
42
43 For non-interactive use, one uses the second invocation, which runs command after connecting to the device. 
44
45 .SS Network Configuration
46 .TP
47 .BI network " <up/down>|<tcp/elan/myrinet>"
48 Start or stop LNET, or select a network type for other
49 .I lctl
50 LNET commands
51 .TP
52 .BI list_nids
53 Print all Network Identifiers on the local node. LNET must be running.
54 .TP
55 .BI which_nid " <nidlist>"
56 From a list of nids for a remote node, show which interface communication
57 will take place on.
58 .TP
59 .BI ping " <nid> "
60 Check LNET connectivity via an LNET ping. This will use the fabric
61 appropriate to the specified NID.
62 .TP
63 .BI interface_list 
64 Print the network interface information for a given 
65 .B network
66 type.
67 .TP
68 .BI peer_list 
69 Print the known peers for a given 
70 .B network
71 type.
72 .TP
73 .BI conn_list 
74 Print all the connected remote NIDs for a given
75 .B network
76 type.
77 .TP
78 .BI active_tx 
79 This command should print active transmits, and it is only used for elan network type.
80 .TP 
81 .BI route_list 
82 Print the complete routing table.
83 .PP
84 .SS Device Selection
85 .TP 
86 .BI device " <devname> " 
87 This will select the specified OBD device.  All other commands depend on the device being set. 
88 .TP 
89 .BI device_list 
90 Show all the local Lustre OBDs. AKA 
91 .B dl
92 .PP
93 .SS Device Operations
94 .TP 
95 .BI list_param " [-F|-R] <param_search ...>"
96 List the Lustre or LNet parameter name
97 .B -F
98 Add '/', '@' or '=' for dirs, symlinks and writeable files, respectively.
99 .br
100 .B -R
101 Recursively list all parameters under the specified parameter search string. If
102 .I param_search
103 is unspecified, all the parameters will be shown.
104 .br
105 .B Examples:
106 .br
107 .B
108 # lctl list_param ost.*
109 .br
110   ost.OSS
111 .br
112   ost.num_refs
113 .br
114 .B
115 # lctl list_param -F ost.* debug
116 .br
117   ost.OSS/
118 .br
119   ost.num_refs
120 .br
121   debug=
122 .br
123 .B
124 # lctl list_param -R mdt
125 .br
126   mdt
127 .br
128   mdt.lustre-MDT0000
129 .br
130   mdt.lustre-MDT0000.capa
131 .br
132   mdt.lustre-MDT0000.capa_count
133 .br
134   mdt.lustre-MDT0000.capa_key_timeout
135 .br
136   mdt.lustre-MDT0000.capa_timeout
137 .br
138   mdt.lustre-MDT0000.commit_on_sharing
139 .br
140   mdt.lustre-MDT0000.evict_client
141 .br
142   ...
143 .TP
144 .BI get_param " [-n|-N|-F] <parameter ...>"
145 Get the value of Lustre or LNET parameter.
146 .br
147 .B -n
148 Print only the value and not parameter name.
149 .br
150 .B -N
151 Print only matched parameter names and not the values. (Especially useful when using patterns.)
152 .br
153 .B -F
154 When -N specified, add '/', '@' or '=' for directories, symlinks and writeable files, respectively.
155 .br
156 .B Examples:
157 .br
158 .B
159 # lctl get_param ost.*
160 .br
161   ost.OSS
162 .br
163   ost.num_refs
164 .br
165 .B
166 # lctl get_param -n debug timeout
167 .br
168   super warning dlmtrace error emerg ha rpctrace vfstrace config console
169 .br
170   20
171 .br
172 .B
173 # lctl get_param -N ost.* debug
174 .br
175   ost.OSS
176 .br
177   ost.num_refs
178 .br
179   debug
180 .br
181 lctl "get_param -NF" is equivalent to "list_param -F".
182 .TP
183 .BI set_param " [-n] <parameter=value ...>"
184 Set the value of Lustre or LNET parameter.
185 .br
186 .B -n
187 Disable printing of the key name when printing values.
188 .br
189 .B Examples:
190 .br
191 .B
192 # lctl set_param fail_loc=0 timeout=20
193 .br
194   fail_loc=0
195 .br
196   timeout=20
197 .br
198 .B
199 # lctl set_param -n fail_loc=0 timeout=20
200 .br
201   0
202 .br
203   20
204 .TP
205 .BI conf_param " [-d] <device|fsname>.<parameter>=<value>"
206 Set a permanent configuration parameter for any device via the MGS.  This
207 command must be run on the MGS node.
208 .br
209 .B -d <device|fsname>.<parameter>
210 Delete a parameter setting (use the default value at the next restart).  A null value for <value> also deletes the parameter setting.
211 .br
212 .B Parameters:
213 .br
214 All of the writable parameters under 
215 .B lctl list_param
216 (e.g. 
217 .I lctl list_param -F osc.*.* | grep =
218 ) can be permanently set using
219 .B lctl conf_param
220 , but the format is slightly different.  For conf_param, the device is specified first, then the obdtype. (See examples below.)  Wildcards are not supported.
221 .br
222 Additionally, failover nodes may be added (or removed), and some system-wide parameters may be set as well (sys.at_max, sys.at_min, sys.at_extra, sys.at_early_margin, sys.at_history, sys.timeout, sys.ldlm_timeout.)  <device> is ignored for system wide parameters.
223 .br
224 .B Examples:
225 .br 
226 # lctl conf_param testfs.sys.at_max=1200
227 .br
228 # lctl conf_param testfs.llite.max_read_ahead_mb=16 
229 .br
230 # lctl conf_param testfs-MDT0000.lov.stripesize=2M
231 .br
232 # lctl conf_param lustre-OST0001.osc.active=0 
233 .br
234 # lctl conf_param testfs-OST0000.osc.max_dirty_mb=29.15 
235 .br
236 # lctl conf_param testfs-OST0000.ost.client_cache_seconds=15 
237 .br
238 # lctl conf_param testfs-OST0000.failover.node=1.2.3.4@tcp1
239 .TP 
240 .BI activate 
241 Reactivate an import after deactivating, below.  This setting is only effective until the next restart (see 
242 .B conf_param
243 ).
244 .TP 
245 .BI deactivate 
246 Deactivate an import, in particular meaning do not assign new file stripes
247 to an OSC.  This command should be used on the OSC in the MDT LOV
248 corresponding to a failed OST device, to prevent further attempts at
249 communication with the failed OST.
250 .TP 
251 .BI abort_recovery 
252 Abort the recovery process on a restarting MDT or OST device
253 .PP
254 .SS Virtual Block Device Operation
255 Lustre is able to emulate a virtual block device upon regular file. It is necessary to be used when you are trying to setup a swap space via file.
256 .TP
257 .BI blockdev_attach " <file name> <device node>"
258 Attach the lustre regular file to a block device. If the device node is not existent, lctl will create it \- it is recommended to create it by lctl since the emulator uses a dynamical major number.
259 .TP
260 .BI blockdev_detach " <device node>"
261 Detach the virtual block device.
262 .TP
263 .BI blockdev_info " <device node>"
264 Acquire which lustre file was attached to the device node.
265 .PP
266 .SS Changelogs
267 .TP
268 .BI changelog_register
269 Register a new changelog user for a particular device.  Changelog entries
270 will not be purged beyond any registered users' set point. (See lfs changelog_clear.)
271 .TP
272 .BI changelog_deregister " <id>"
273 Unregister an existing changelog user.  If the user's "clear" record number
274 is the minimum for the device, changelog records will be purged until the
275 next minimum.  
276 .PP
277 .SS Debug
278 .TP 
279 .BI debug_daemon 
280 Start and stop the debug daemon, and control the output filename and size.
281 .TP 
282 .BI debug_kernel " [file] [raw]" 
283 Dump the kernel debug buffer to stdout or file.
284 .TP 
285 .BI debug_file " <input> [output]"
286 Convert kernel-dumped debug log from binary to plain text format.
287 .TP 
288 .BI clear 
289 Clear the kernel debug buffer.
290 .TP 
291 .BI mark " <text>" 
292 Insert marker text in the kernel debug buffer.
293 .TP 
294 .BI filter " <subsystem id/debug mask>" 
295 Filter kernel debug messages by subsystem or mask.
296 .TP 
297 .BI show " <subsystem id/debug mask>" 
298 Show specific type of messages.
299 .TP 
300 .BI debug_list " <subs/types>" 
301 List all the subsystem and debug types.
302 .TP
303 .BI modules " <path>" 
304 Provide gdb-friendly module information.
305
306 .SH OPTIONS
307 The following options can be used to invoke lctl. 
308 .TP
309 .B --device 
310 The device to be used for the operation. This can be specified by name or
311 number. See 
312 .B device_list
313 .TP
314 .B --ignore_errors | ignore_errors 
315 Ignore errors during script processing
316
317 .SH EXAMPLES
318 # lctl
319 .br
320 lctl > dl
321   0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
322   1 UP ost OSS OSS_uuid 3
323   2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
324 .br
325 lctl > dk /tmp/log
326 Debug log: 87 lines, 87 kept, 0 dropped.
327 .br
328 lctl > quit
329
330 .SH BUGS
331 Please report all bugs to Sun Microsystems, Inc. http://bugzilla.lustre.org/
332 .SH AVAILABILITY
333 .B lctl
334 is part of the 
335 .BR Lustre (7) 
336 filesystem package and is available from Sun Microsystems, Inc.
337 .br
338 http://www.sun.com/software/products/lustre/index.xml
339 .SH SEE ALSO
340 .BR Lustre (7),
341 .BR mkfs.lustre (8),
342 .BR mount.lustre (8),
343 .BR lctl (8),
344 .BR lfs (1)