Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / doc / lctl.lyx
1 #LyX 1.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 221
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 device_list/dl
169 \emph default 
170 .
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 that occur during script processing.
187 \layout Description
188
189 dump Save ioctl buffer to file.
190 \layout LyX-Code
191
192 \layout Description
193
194 Network\SpecialChar ~
195 Configuration
196 \begin_deeper 
197 \layout Description
198
199 --net\SpecialChar ~
200
201 \series bold 
202 <tcp/elan/myrinet>
203 \series default 
204 \SpecialChar ~
205
206 \series bold 
207 <command> 
208 \series default 
209 Indicate the network type to be used for the operation.
210 \layout Description
211
212 network\SpecialChar ~
213 <tcp/elans/myrinet> Indicate what kind of network applies for the
214  configuration commands that follow.
215 \layout Description
216
217 interface_list Print the interface entries.
218 \layout Description
219
220 add_interface\SpecialChar ~
221
222 \series bold 
223 <
224 \series default 
225 ip>\SpecialChar ~
226 [netmask] Add an interface entry.
227 \layout Description
228
229 del_interface\SpecialChar ~
230 [ip] Delete an interface entry.
231 \layout Description
232
233 peer_list Print the peer entries.
234 \layout Description
235
236 add_peer\SpecialChar ~
237
238 \series bold 
239 <
240 \series default 
241 nid>\SpecialChar ~
242
243 \series bold 
244 <
245 \series default 
246 host>\SpecialChar ~
247
248 \series bold 
249 <
250 \series default 
251 port> 
252 \series bold 
253 Add a peer entry.
254 \layout Description
255
256 del_peer\SpecialChar ~
257 [
258 \series bold 
259 <
260 \series default 
261 nid>]\SpecialChar ~
262 [
263 \series bold 
264 <
265 \series default 
266 host>]\SpecialChar ~
267 [ks] Remove a peer entry.
268 \layout Description
269
270 connect\SpecialChar ~
271 <hostname>\SpecialChar ~
272 <port>\SpecialChar ~
273 [iIOC] This will establish a connection to a remote
274  network, network 
275 \emph on 
276 id
277 \emph default 
278  given by the hostname/port combination.
279 \layout Description
280
281 disconnect\SpecialChar ~
282 <nid> Disconnect from a remote 
283 \emph on 
284 nid
285 \emph default 
286 .
287 \layout Description
288
289 active_tx This command should print active transmits, and it is only used
290  for elan network type.
291 \layout Description
292
293 mynid\SpecialChar ~
294 [nid] Informs the socknal of the local 
295 \emph on 
296 nid
297 \emph default 
298 .
299  It defaults to hostname for tcp networks and is automatically setup for
300  elan/myrinet networks.
301 \layout Description
302
303 shownid Print the local NID.
304 \layout Description
305
306 add_uuid\SpecialChar ~
307 <uuid>\SpecialChar ~
308 <nid>\SpecialChar ~
309 <net_type> Associate a given UUID with an 
310 \emph on 
311 nid.
312 \layout Description
313
314 close_uuid\SpecialChar ~
315 <uuid>\SpecialChar ~
316 <net_type> Disconnect a UUID.
317 \layout Description
318
319 del_uuid\SpecialChar ~
320 <uuid> Delete a UUID association.
321 \layout Description
322
323 add_route\SpecialChar ~
324 <gateway>\SpecialChar ~
325 <target>\SpecialChar ~
326 [<target>] Add an entry to the portals routing
327  table for the given target.
328  The arguments should be nid.
329  If only one <target> is provided, this command should only add the route
330  for this target.
331  But, if both of the <target>s are provides, this command should add the
332  route for all the target in the range specified by the two targets(from
333  low nid to high nid).
334 \layout Description
335
336 del_route\SpecialChar ~
337 <gateway>\SpecialChar ~
338 [<target>]\SpecialChar ~
339 [<target>] Delete the route entry for the given
340  targets from the portals routing table.
341  The arguments should be nid.
342  
343 \layout Description
344
345 set_route\SpecialChar ~
346 <gateway>\SpecialChar ~
347 <up/down>\SpecialChar ~
348 [<time>] Enable/disable routes via the given
349  gateway in the protals routing table.
350  <time> is used to tell when a gateway comes back online.
351 \layout Description
352
353 route_list Print the complete portals routing table.
354 \layout Description
355
356 fail\SpecialChar ~
357 nid|_all_\SpecialChar ~
358 [count] Fail/restore communications.
359  Omitting the count implies fail indefinitely, count of zero indicates that
360  communication should be restored.
361  A non-zero count indicates the number of portals messages to be dropped
362  after which the communication is restored.
363  The argument 
364 \begin_inset Quotes eld
365 \end_inset 
366
367 nid
368 \begin_inset Quotes erd
369 \end_inset 
370
371  is used to specify the gateway, which is one peer of the communication.
372 \end_deeper 
373 \layout Description
374
375 Device\SpecialChar ~
376 Selection
377 \begin_deeper 
378 \layout Description
379
380 newdev Create a new device.
381 \layout Description
382
383 device\SpecialChar ~
384 <%name|$name|devno> This will select the specified OBD device.
385   All other commands depend on the device being set.
386 \layout Description
387
388 cfg_device\SpecialChar ~
389 <$name> Set current device being configured to <$name>.
390 \layout Description
391
392 device_list Show all the devices.
393 \layout Description
394
395 dl The same as device_list.
396 \layout Description
397
398 lustre_build_version Print the Lustre build version.
399 \end_deeper 
400 \layout Description
401
402 Device\SpecialChar ~
403 Configuration
404 \begin_deeper 
405 \layout Description
406
407 attach\SpecialChar ~
408 type\SpecialChar ~
409 [name\SpecialChar ~
410 [uuid]] 
411 \shape italic 
412 \emph on 
413 Attach
414 \shape default 
415 \emph default 
416  a type to the current device (which you need to set using the 
417 \family typewriter 
418 \size small 
419 device
420 \family default 
421 \size default 
422  command) and give that device a name and UUID.
423   This allows us to identify the device for use later, and also tells us
424  what type of device we will have.
425 \layout Description
426
427 setup\SpecialChar ~
428 <args...> Type specific device setup commands.
429  For obdfilter, a setup command tells the driver which block device it should
430  use for storage and what type of filesystem is on that device.
431  
432 \layout Description
433
434 cleanup\SpecialChar ~
435 [force|failover] Cleanup a previously setup device.
436 \layout Description
437
438 detach Remove driver (and name and UUID) from the current device.
439 \layout Description
440
441 lov_setup\SpecialChar ~
442 lov-uuid\SpecialChar ~
443 stripe-count\SpecialChar ~
444 stripe-size\SpecialChar ~
445 offset\SpecialChar ~
446 pattern\SpecialChar ~
447 UUID1\SpecialChar ~
448 [UUID2...] Write
449  LOV configuration to an MDS device.
450 \layout Description
451
452 lov_getconfig\SpecialChar ~
453 lov-uuid Read LOV configuration from an MDS device.
454  Returns stripe-count, stripe-size, offset, pattern, and a list of OST UUID's.
455 \layout Description
456
457 record\SpecialChar ~
458 cfg-uuid-name Record commands that follow in log.
459 \layout Description
460
461 endrecord Stop recording
462 \layout Description
463
464 parse\SpecialChar ~
465 config-uuid-name Parse the log of recorded commands for this config.
466 \layout Description
467
468 dump_log\SpecialChar ~
469 config-uuid-name Print log of recorded commands for this config
470  to kernel debug log.
471 \layout Description
472
473 clear_log\SpecialChar ~
474 config-name Delete current config log of recorded commands.
475 \end_deeper 
476 \layout Description
477
478 Device\SpecialChar ~
479 Operations
480 \begin_deeper 
481 \layout Description
482
483 probe\SpecialChar ~
484 [timeout] Build a connection handle to a device.
485  This command is used to suspend configuration until the lctl command has
486  ensured that the MDS and OSC services are available.
487  This is to avoid mount failures in a rebooting cluster.
488 \layout Description
489
490 close
491 \emph on 
492  
493 \emph default 
494 Close the
495 \emph on 
496  
497 \emph default 
498 connection handle
499 \layout Description
500
501 getattr\SpecialChar ~
502 <objid> Get attributes for an OST object 
503 \emph on 
504 <objid>
505 \emph default 
506  .
507 \layout Description
508
509 setattr\SpecialChar ~
510 <objid>\SpecialChar ~
511 <mode> Set mode attribute for OST object 
512 \emph on 
513 <objid>
514 \emph default 
515 .
516 \layout Description
517
518 create\SpecialChar ~
519 [num\SpecialChar ~
520 [mode\SpecialChar ~
521 [verbose\SpecialChar ~
522 [lsm\SpecialChar ~
523 data]]]] Create the specified number 
524 \emph on 
525 <num>
526 \emph default 
527  of OST objects with the given 
528 \emph on 
529 <mode>
530 \emph default 
531 .
532 \layout Description
533
534 destroy\SpecialChar ~
535 <num>\SpecialChar ~
536 starting\SpecialChar ~
537 at\SpecialChar ~
538 <objid> Destroy <
539 \emph on 
540 num
541 \emph default 
542 > number of objects starting from the object with object id <
543 \emph on 
544 objid
545 \emph default 
546 >.
547 \layout Description
548
549 test_getattr\SpecialChar ~
550 <num>\SpecialChar ~
551 [verbose\SpecialChar ~
552 [[t]objid]] Do 
553 \emph on 
554 <num>
555 \emph default 
556  
557 \emph on 
558 getattrs
559 \emph default 
560  on OST object 
561 \emph on 
562 <objid>
563 \emph default 
564  (
565 \emph on 
566 objectid
567 \emph default 
568 +1 on each thread).
569 \layout Description
570
571 test_brw\SpecialChar ~
572 [t]<num>\SpecialChar ~
573 [write\SpecialChar ~
574 [verbose\SpecialChar ~
575 [npages\SpecialChar ~
576 [[t]objid]]]] Do 
577 \emph on 
578 <num>
579 \emph default 
580  bulk 
581 \emph on 
582 read
583 \emph default 
584 /
585 \emph on 
586 writes
587 \emph default 
588  on OST object 
589 \emph on 
590 <objid>
591 \emph default 
592  (
593 \emph on 
594 <npages>
595 \emph default 
596  per I/O).
597 \layout Description
598
599 get_stripe\SpecialChar ~
600 objid Show stripe info for an echo client object.
601 \layout Description
602
603 set_stripe\SpecialChar ~
604 <objid>[=width!count[@offset]\SpecialChar ~
605 [:id:id....] Set stripe info for an echo
606  client object.
607 \layout Description
608
609 unset_stripe\SpecialChar ~
610 <objid> Unset stripe info for an echo client object.
611 \layout Description
612
613 test_ldlm Perform lock manager test.
614 \layout Description
615
616 ldlm_regress_start\SpecialChar ~
617 [numthreads\SpecialChar ~
618 [refheld\SpecialChar ~
619 [numres\SpecialChar ~
620 [numext]]]] Start lock manager
621  stress test.
622 \layout Description
623
624 ldlm_regress_stop Stop lock manager stress test.
625 \layout Description
626
627 dump_ldlm Dump all lock manager state, this is very useful for debugging.
628 \layout Description
629
630 activate Activate an import.
631 \layout Description
632
633 deactivate De-activate an import.
634 \layout Description
635
636 recover\SpecialChar ~
637 [<connection\SpecialChar ~
638 UUID>] Pass the information of the new target and initialize
639  the connection to this target.
640  
641 \layout Description
642
643 lookup\SpecialChar ~
644 <directory>\SpecialChar ~
645 <file> Print some information of the given file.
646 \layout Description
647
648 notransno Disable sending of committed transnumber updates.
649 \layout Description
650
651 readonly Disable writes to the underlying device.
652 \layout Description
653
654 abort_recovery Abort recovery on MDS device.
655 \layout Description
656
657 start\SpecialChar ~
658 <profilename> Setup mds/ost from the llog file.
659 \layout Description
660
661 mount_option\SpecialChar ~
662 profile\SpecialChar ~
663 osc_name\SpecialChar ~
664 [mdc_name] Add a new profile to lustre.
665 \layout Description
666
667 del_mount_option\SpecialChar ~
668 profile Delete a specified profile.
669 \layout Description
670
671 set_timeout\SpecialChar ~
672 <secs> Set the timeout(
673 \emph on 
674 obd_timeout
675 \emph default 
676 ) for server to wait before failing recovery.
677 \layout Description
678
679 set_lustre_upcall\SpecialChar ~
680 </full/path/to/upcall> Set the lustre upcall(obd_lustre_upcall)
681  via the lustre.upcall sysctl.
682 \layout Description
683
684 llog_catlist List all catalog logs on current device.
685 \layout Description
686
687 llog_info\SpecialChar ~
688 <$logname|#oid#ogr#ogen> Print log header information.
689  
690 \layout Description
691
692 llog_print\SpecialChar ~
693 <$logname|#oid#ogr#ogen>\SpecialChar ~
694 [from]\SpecialChar ~
695 [to] Print log content information.
696  It will print all records from index 1 by default.
697 \layout Description
698
699 llog_check\SpecialChar ~
700 <$logname|#oid#ogr#ogen>\SpecialChar ~
701 [from]\SpecialChar ~
702 [to] Check log content information.
703  It will check all records from index 1 by default.
704 \layout Description
705
706 llog_cancel\SpecialChar ~
707 <catalog\SpecialChar ~
708 id|catalog\SpecialChar ~
709 name>\SpecialChar ~
710 <log\SpecialChar ~
711 id>\SpecialChar ~
712 <index> Cancel one record in log.
713 \layout Description
714
715 llog_remove\SpecialChar ~
716 <catalog\SpecialChar ~
717 id|catalog\SpecialChar ~
718 name>\SpecialChar ~
719 <log\SpecialChar ~
720 id> Remove one log from catalog, erase
721  it from disk.
722 \end_deeper 
723 \layout Description
724
725 Debug
726 \begin_deeper 
727 \layout Description
728
729 debug_daemon\SpecialChar ~
730 [start\SpecialChar ~
731 file\SpecialChar ~
732 <#MB>|stop|pause|continue] Debug daemon control and
733  dump to a file.
734 \layout Description
735
736 debug_kernel\SpecialChar ~
737 [file]\SpecialChar ~
738 [raw] Get Lustre debug buffer from kernel and dump to a
739 \emph on 
740 file
741 \emph default 
742 .
743 \layout Description
744
745 dk The same as debug_kernel.
746 \layout Description
747
748 debug_file\SpecialChar ~
749 <input>\SpecialChar ~
750 [output]\SpecialChar ~
751 Convert kernel-dumped debug log from binary to plain text format.
752  
753 \emph on 
754 output
755 \emph default 
756 .
757 \layout Description
758
759 clear Clear kernel debug buffer.
760 \layout Description
761
762 mark\SpecialChar ~
763 <text> Insert marker text in kernel debug buffer.
764 \layout Description
765
766 filter\SpecialChar ~
767 <subsystem\SpecialChar ~
768 id/debug\SpecialChar ~
769 mask> Filter message type from the kernel debug
770  buffer.
771 \layout Description
772
773 show\SpecialChar ~
774 <subsystem\SpecialChar ~
775 id/debug\SpecialChar ~
776 mask> Show specific type of messages.
777 \layout Description
778
779 debug_list\SpecialChar ~
780 <subs/types> List all the subsystem and debug types.
781 \layout Description
782
783 modules\SpecialChar ~
784 <path> Provide gdb-friendly module information.
785 \layout Description
786
787 panic Force the kernel to panic.
788 \layout Description
789
790 lwt\SpecialChar ~
791 start/stop\SpecialChar ~
792 [file] Light-weight tracing.
793 \layout Description
794
795 memhog\SpecialChar ~
796 <page\SpecialChar ~
797 count>\SpecialChar ~
798 [<gfp\SpecialChar ~
799 flags>] Memory pressure testing.
800 \end_deeper 
801 \layout Description
802
803 Control
804 \begin_deeper 
805 \layout Description
806
807 help Show a complete list of commands; 
808 \emph on 
809 help <command name>
810 \emph default 
811  can be used to get help on specific command.
812 \layout Description
813
814 exit Close the lctl session.
815 \layout Description
816
817 quit Close the lctl session.
818 \end_deeper 
819 \layout Subsection
820
821 EXAMPLES
822 \layout Description
823
824 attach
825 \layout LyX-Code
826
827
828 \size small 
829 # lctl
830 \newline 
831 lctl > newdev
832 \newline 
833 lctl > attach obdfilter OBDDEV OBDUUID
834 \size default 
835
836 \newline 
837
838 \layout Description
839
840 connect
841 \layout LyX-Code
842
843
844 \size small 
845 lctl > name2dev OSCDEV
846 \newline 
847
848 \newline 
849 lctl > device 2
850 \newline 
851 lctl > connect
852 \size default 
853
854 \newline 
855
856 \layout Description
857
858 getattr
859 \layout LyX-Code
860
861
862 \size small 
863 lctl > getattr 12
864 \newline 
865 id: 12
866 \newline 
867 grp: 0
868 \newline 
869 atime: 1002663714
870 \newline 
871 mtime: 1002663535
872 \newline 
873 ctime: 1002663535
874 \newline 
875 size: 10
876 \newline 
877 blocks: 8
878 \newline 
879 blksize: 4096
880 \newline 
881 mode: 100644
882 \newline 
883 uid: 0
884 \newline 
885 gid: 0
886 \newline 
887 flags: 0
888 \newline 
889 obdflags: 0
890 \newline 
891 nlink: 1
892 \newline 
893 valid: ffffffff
894 \newline 
895 inline:
896 \newline 
897 obdmd:
898 \newline 
899 lctl > disconnect 
900 \newline 
901 Finished (success)
902 \newline 
903
904 \layout Description
905
906 setup
907 \emph on 
908  
909 \layout LyX-Code
910
911
912 \size small 
913 lctl > setup /dev/loop0 ldiskfs
914 \newline 
915 lctl > quit
916 \size default 
917
918 \newline 
919
920 \layout LyX-Code
921
922 \layout Subsection
923
924 BUGS
925 \layout Standard
926
927 None are known.
928 \the_end