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