Whamcloud - gitweb
Don't output message on MDS for normal occurrence (fixed previously in
[fs/lustre-release.git] / lustre / doc / lctl.lyx
1 #LyX 1.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 220
3 \textclass amsart-plain
4 \language english
5 \inputencoding auto
6 \fontscheme times
7 \graphics default
8 \paperfontsize default
9 \spacing single 
10 \papersize letterpaper
11 \paperpackage a4
12 \use_geometry 0
13 \use_amsmath 0
14 \use_natbib 0
15 \use_numerical_citations 0
16 \paperorientation portrait
17 \secnumdepth 3
18 \tocdepth 3
19 \paragraph_separation skip
20 \defskip medskip
21 \quotes_language english
22 \quotes_times 2
23 \papercolumns 1
24 \papersides 1
25 \paperpagestyle default
26
27 \layout Section
28
29 lctl
30 \layout Subsection
31
32 NAME 
33 \layout Description
34
35 lctl Low level Lustre filesystem configuration utility.
36 \layout Subsection
37
38 SYNOPSIS
39 \layout Standard
40
41
42 \series bold 
43 lctl 
44 \layout Standard
45
46
47 \series bold 
48 lctl\SpecialChar ~
49 --device\SpecialChar ~
50 <devno> <command\SpecialChar ~
51 [args]>
52 \layout Standard
53
54
55 \series bold 
56 lctl\SpecialChar ~
57 --threads\SpecialChar ~
58 <numthreads>\SpecialChar ~
59 <verbose>\SpecialChar ~
60 <devno>\SpecialChar ~
61 <command [args]>
62 \layout Subsection
63
64 DESCRIPTION
65 \layout Standard
66
67 The program can be invoked in interactive mode by issuing 
68 \series bold 
69 lctl.
70
71 \series default 
72  After that, commands are issued as below.
73  The most common commands in lctl are (in matching pairs) 
74 \family typewriter 
75 \size small 
76 device
77 \family default 
78 \size default 
79  and 
80 \family typewriter 
81 \size small 
82 attach
83 \family default 
84 \size default 
85
86 \family typewriter 
87 \size small 
88 detach
89 \family default 
90 \size default 
91  and 
92 \family typewriter 
93 \size small 
94 setup
95 \family default 
96 \size default 
97
98 \family typewriter 
99 \size small 
100 cleanup
101 \family default 
102 \size default 
103  and 
104 \family typewriter 
105 \size small 
106 connect
107 \family default 
108 \size default 
109
110 \family typewriter 
111 \size small 
112 disconnect
113 \family default 
114 \size default 
115  and 
116 \family typewriter 
117 \size small 
118 help
119 \family default 
120 \size default 
121 , and 
122 \family typewriter 
123 \size small 
124 quit
125 \family default 
126 \size default 
127 .
128  To get a complete listing of available commands, type 
129 \family typewriter 
130 \size small 
131 help
132 \family default 
133 \size default 
134  at the lctl prompt.
135   To get basic help on the meaning and syntax of a command, type 
136 \family typewriter 
137 \size small 
138 help command
139 \family default 
140 \size default 
141 .
142   Command completion is activated with the 
143 \family typewriter 
144 \size small 
145 TAB
146 \family default 
147 \size default 
148  key, and command history is available via the up- and down-arrow keys.
149  
150 \layout Standard
151
152 For non-interactive single threaded use, one uses the second invocation,
153  which runs 
154 \emph on 
155 command
156 \emph default 
157  after connecting to the device
158 \emph on 
159 .
160
161 \emph default 
162  
163 \layout Description
164
165 --device The device number to be used for the operation.
166  The value of devno is an integer, normally found by calling 
167 \emph on 
168 lctl name2dev 
169 \emph default 
170 on a device name.
171  
172 \layout Description
173
174 --threads How many threads should be forked doing the command specified.
175  The numthreads variable is a strictly positive integer indicating how many
176  threads should be started.
177  The 
178 \emph on 
179 devno 
180 \emph default 
181 option is used as above.
182 \layout Description
183
184 --ignore_errors\SpecialChar ~
185 |\SpecialChar ~
186 ignore_errors Ignore errors during script processing
187 \layout Description
188
189 dump Save ioctls to a file 
190 \layout LyX-Code
191
192 \layout Description
193
194 Network\SpecialChar ~
195 Configuration
196 \begin_deeper 
197 \layout Description
198
199 network\SpecialChar ~
200 <tcp/elans/myrinet> Indicate what kind of network applies for the
201  configuration commands that follow.
202 \layout Description
203
204 connect\SpecialChar ~
205 [[<hostname>\SpecialChar ~
206 <port>]\SpecialChar ~
207 |\SpecialChar ~
208 <elan\SpecialChar ~
209 id>] This will establish a connection to
210  a remote network network 
211 \emph on 
212 id
213 \emph default 
214  given by the hostname/port combination, or the elan 
215 \emph on 
216 id
217 \emph default 
218 .
219 \layout Description
220
221 disconnect\SpecialChar ~
222 <nid> Disconnect from a remote 
223 \emph on 
224 nid
225 \emph default 
226 .
227 \layout Description
228
229 mynid\SpecialChar ~
230 [nid] Informs the socknal of the local 
231 \emph on 
232 nid
233 \emph default 
234 .
235  It defaults to hostname for tcp networks and is automatically setup for
236  elan/myrinet networks.
237 \layout Description
238
239 add_uuid\SpecialChar ~
240 <uuid>\SpecialChar ~
241 <nid> Associate a given UUID with an 
242 \emph on 
243 nid.
244 \layout Description
245
246 close_uuid\SpecialChar ~
247 <uuid> Disconnect a UUID.
248 \layout Description
249
250 del_uuid\SpecialChar ~
251 <uuid> Delete a UUID association.
252 \layout Description
253
254 add_route\SpecialChar ~
255 <gateway>\SpecialChar ~
256 <target>\SpecialChar ~
257 [target] Add an entry to the routing table for
258  the given target.
259 \layout Description
260
261 del_route\SpecialChar ~
262 <target> Delete an entry for the target from the routing table.
263 \layout Description
264
265 route_list Print the complete routing table.
266 \layout Description
267
268 recv_mem\SpecialChar ~
269 [size] Set the socket 
270 \emph on 
271 receive
272 \emph default 
273  buffer size; if the size is omitted, the default size for the buffer is
274  printed.
275 \layout Description
276
277 send_mem\SpecialChar ~
278 [size] Set send buffer size for the socket; if size is omitted,
279  the default size for the buffer is printed.
280 \layout Description
281
282 nagle\SpecialChar ~
283 [on/off] Enable/disable nagle; omitting the argument will cause the
284  default value to be printed.
285 \layout Description
286
287 fail\SpecialChar ~
288 nid|all\SpecialChar ~
289 [count] Fail/restore communications.
290  Ommiting tha count implies fail indefinitely, count of zero indicates that
291  communication should be restored.
292  A non-zero count indicates the number of portals messages to be dropped
293  after which the communication is restored.
294 \end_deeper 
295 \layout Description
296
297 Device\SpecialChar ~
298 Selection
299 \begin_deeper 
300 \layout Description
301
302 newdev Create a new device.
303 \layout Description
304
305 name2dev This command can be used to determine a device number for the given
306  device name.
307 \layout Description
308
309 device This will select the specified OBD device.
310   All other commands depend on the device being set.
311  
312 \layout Description
313
314 device_list Show all the devices.
315 \layout Description
316
317 lustre_build_version Print the Lustre build version.
318 \end_deeper 
319 \layout Description
320
321 Device\SpecialChar ~
322 Configuration
323 \begin_deeper 
324 \layout Description
325
326 attach\SpecialChar ~
327 type\SpecialChar ~
328 [name\SpecialChar ~
329 [uuid]] 
330 \shape italic 
331 \emph on 
332 Attach
333 \shape default 
334 \emph default 
335  a type to the current device (which you need to set using the 
336 \family typewriter 
337 \size small 
338 device
339 \family default 
340 \size default 
341  command) and give that device a name and UUID.
342   This allows us to identify the device for use later, and also tells us
343  what type of device we will have.
344 \layout Description
345
346 setup\SpecialChar ~
347 <args...> Type specific device setup commands.
348  For obdfilter, a setup command tells the driver which block device it should
349  use for storage and what type of filesystem is on that device.
350  
351 \layout Description
352
353 cleanup Cleanup a previously setup device.
354 \layout Description
355
356 detach Remove driver (and name and UUID) from the current device.
357 \layout Description
358
359 lov_setconfig\SpecialChar ~
360 lov-uuid\SpecialChar ~
361 stripe-count\SpecialChar ~
362 default-stripe-size\SpecialChar ~
363 offset\SpecialChar ~
364 pattern\SpecialChar ~
365 UUID1\SpecialChar ~
366 [UUID2...]
367  Write LOV configuration to an MDS device.
368 \layout Description
369
370 lov_getconfig\SpecialChar ~
371 lov-uuid Read LOV configuration from an MDS device.
372  Returns default-stripe-count, default-stripe-size, offset, pattern, and
373  a list of OST UUID's.
374 \end_deeper 
375 \layout Description
376
377 Device\SpecialChar ~
378 Operations
379 \begin_deeper 
380 \layout Description
381
382 probe\SpecialChar ~
383 [timeout] Build a connection handle to a device.
384  This command is used to suspend configuration until the lctl command has
385  ensured that the MDS and OSC services are available.
386  This is to avoid mount failures in a rebooting cluster.
387 \layout Description
388
389 close
390 \emph on 
391  
392 \emph default 
393 Close the
394 \emph on 
395  
396 \emph default 
397 connection handle
398 \layout Description
399
400 getattr\SpecialChar ~
401 <objid> Get attributes for an OST object 
402 \emph on 
403 <objid>
404 \emph default 
405  .
406 \layout Description
407
408 setattr\SpecialChar ~
409 <objid>\SpecialChar ~
410 <mode> Set mode attribute for OST object 
411 \emph on 
412 <objid>
413 \emph default 
414 .
415 \layout Description
416
417 create\SpecialChar ~
418 [num\SpecialChar ~
419 [mode\SpecialChar ~
420 [verbose]]] Create the specified number 
421 \emph on 
422 <num>
423 \emph default 
424  of OST objects with the given 
425 \emph on 
426 <mode>
427 \emph default 
428 .
429 \layout Description
430
431 destroy\SpecialChar ~
432 <num>\SpecialChar ~
433 starting\SpecialChar ~
434 at\SpecialChar ~
435 <objid> Destroy <
436 \emph on 
437 num
438 \emph default 
439 > number of objects starting from the object with object id <
440 \emph on 
441 objid
442 \emph default 
443 >.
444 \layout Description
445
446 test_getattr\SpecialChar ~
447 <num>\SpecialChar ~
448 [verbose\SpecialChar ~
449 [[t]objid]] Do 
450 \emph on 
451 <num>
452 \emph default 
453  
454 \emph on 
455 getattrs
456 \emph default 
457  on OST object 
458 \emph on 
459 <objid>
460 \emph default 
461  (
462 \emph on 
463 objectid
464 \emph default 
465 +1 on each thread).
466 \layout Description
467
468 test_brw\SpecialChar ~
469 [t]<num>\SpecialChar ~
470 [write\SpecialChar ~
471 [verbose\SpecialChar ~
472 [npages\SpecialChar ~
473 [[t]objid]]]] Do 
474 \emph on 
475 <num>
476 \emph default 
477  bulk 
478 \emph on 
479 read
480 \emph default 
481 /
482 \emph on 
483 writes
484 \emph default 
485  on OST object 
486 \emph on 
487 <objid>
488 \emph default 
489  (
490 \emph on 
491 <npages>
492 \emph default 
493  per I/O).
494 \layout Description
495
496 test_ldlm Perform lock manager test.
497 \layout Description
498
499 ldlm_regress_start\SpecialChar ~
500 %s\SpecialChar ~
501 [numthreads\SpecialChar ~
502 [refheld\SpecialChar ~
503 [numres\SpecialChar ~
504 [numext]]]] Start lock manager
505  stress test.
506 \layout Description
507
508 ldlm_regress_stop Stop lock manager stress test.
509 \layout Description
510
511 dump_ldlm Dump all lock manager state, this is very useful for debugging
512 \layout Description
513
514 activate Activate an import
515 \layout Description
516
517 deacttivate De-activate an import
518 \layout Description
519
520 recover\SpecialChar ~
521 <connection UUID> 
522 \layout Description
523
524 lookup\SpecialChar ~
525 <directory>\SpecialChar ~
526 <file>
527 \layout Description
528
529 notransno Disable sending of committed transnumber updates
530 \layout Description
531
532 readonly Disable writes to the underlying device
533 \layout Description
534
535 abort_recovery Abort recovery on MDS device
536 \layout Description
537
538 mount_option Dump mount options to a file
539 \layout Description
540
541 get_stripe show stripe info for an echo client object.
542 \layout Description
543
544 set_stripe\SpecialChar ~
545 <objid>[\SpecialChar ~
546 width!count[@offset]\SpecialChar ~
547 [:id:id....] set stripe info for an echo
548  client
549 \layout Description
550
551 unset_stripe\SpecialChar ~
552 <objid> unset stripe info for an echo client object.
553 \end_deeper 
554 \layout Description
555
556 Debug
557 \begin_deeper 
558 \layout Description
559
560 debug_daemon debug daemon control and dump to a file
561 \layout Description
562
563 debug_kernel\SpecialChar ~
564 [file]\SpecialChar ~
565 [raw] Get debug buffer and dump to a 
566 \emph on 
567 fileusage
568 \emph default 
569 .
570 \layout Description
571
572 debug_file\SpecialChar ~
573 <input>\SpecialChar ~
574 [output]\SpecialChar ~
575 [raw] Read debug buffer from input and dump to
576  
577 \emph on 
578 outputusage
579 \emph default 
580 .
581 \layout Description
582
583 clear Clear kernel debug buffer.
584 \layout Description
585
586 mark\SpecialChar ~
587 <text> Insert marker text in kernel debug buffer.
588 \layout Description
589
590 filter\SpecialChar ~
591 <subsystem\SpecialChar ~
592 id/debug\SpecialChar ~
593 mask> Filter message type from the kernel debug
594  buffer.
595 \layout Description
596
597 show\SpecialChar ~
598 <subsystem\SpecialChar ~
599 id/debug\SpecialChar ~
600 mask> Show specific type of messages.
601 \layout Description
602
603 debug_list\SpecialChar ~
604 <subs/types> List all the subsystem and debug types.
605 \layout Description
606
607 panic Force the kernel to panic.
608 \end_deeper 
609 \layout Description
610
611 Control
612 \begin_deeper 
613 \layout Description
614
615 help Show a complete list of commands; 
616 \emph on 
617 help <command name>
618 \emph default 
619  can be used to get help on specific command.
620 \layout Description
621
622 exit Close the lctl session.
623 \layout Description
624
625 quit Close the lctl session.
626 \end_deeper 
627 \layout Subsection
628
629 EXAMPLES
630 \layout Description
631
632 attach
633 \layout LyX-Code
634
635
636 \size small 
637 # lctl
638 \newline 
639 lctl > newdev
640 \newline 
641 lctl > attach obdfilter OBDDEV OBDUUID
642 \size default 
643
644 \newline 
645
646 \layout Description
647
648 connect
649 \layout LyX-Code
650
651
652 \size small 
653 lctl > name2dev OSCDEV
654 \newline 
655
656 \newline 
657 lctl > device 2
658 \newline 
659 lctl > connect
660 \size default 
661
662 \newline 
663
664 \layout Description
665
666 getattr
667 \layout LyX-Code
668
669
670 \size small 
671 lctl > getattr 12
672 \newline 
673 id: 12
674 \newline 
675 grp: 0
676 \newline 
677 atime: 1002663714
678 \newline 
679 mtime: 1002663535
680 \newline 
681 ctime: 1002663535
682 \newline 
683 size: 10
684 \newline 
685 blocks: 8
686 \newline 
687 blksize: 4096
688 \newline 
689 mode: 100644
690 \newline 
691 uid: 0
692 \newline 
693 gid: 0
694 \newline 
695 flags: 0
696 \newline 
697 obdflags: 0
698 \newline 
699 nlink: 1
700 \newline 
701 valid: ffffffff
702 \newline 
703 inline:
704 \newline 
705 obdmd:
706 \newline 
707 lctl > disconnect 
708 \newline 
709 Finished (success)
710 \newline 
711
712 \layout Description
713
714 setup
715 \emph on 
716  
717 \layout LyX-Code
718
719
720 \size small 
721 lctl > setup /dev/loop0 extN
722 \newline 
723 lctl > quit
724 \size default 
725
726 \newline 
727
728 \layout LyX-Code
729
730 \layout Subsection
731
732 BUGS
733 \layout Standard
734
735 None are known.
736 \the_end