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