Whamcloud - gitweb
Branch HEAD
[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 device 
20 ,
21 .B network 
22 .I <up/down>
23 ,
24 .B list_nids
25 ,
26 .B ping
27 .I nid
28 ,
29 .B help
30 ,
31 .B quit.
32
33 To get a complete listing of available commands, type
34 .B help
35 at the lctl prompt.  To get basic help on the meaning and syntax of a
36 command, type 
37 .B help 
38 .I command
39 .  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
40
41 For non-interactive use, one uses the second invocation, which runs command after connecting to the device. 
42
43 .SS Network Configuration
44 .TP
45 .BI network " <up/down>|<tcp/elan/myrinet>"
46 Start or stop LNET, or select a network type for other
47 .I lctl
48 LNET commands
49 .TP
50 .BI list_nids
51 Print all Network Identifiers on the local node. LNET must be running.
52 .TP
53 .BI which_nid " <nidlist>"
54 From a list of nids for a remote node, show which interface communication
55 will take place on.
56 .TP
57 .BI ping " <nid> "
58 Check LNET connectivity via an LNET ping. This will use the fabric
59 appropriate to the specified NID.
60 .TP
61 .BI interface_list 
62 Print the network interface information for a given 
63 .B network
64 type.
65 .TP
66 .BI peer_list 
67 Print the known peers for a given 
68 .B network
69 type.
70 .TP
71 .BI conn_list 
72 Print all the connected remote NIDs for a given
73 .B network
74 type.
75 .TP
76 .BI active_tx 
77 This command should print active transmits, and it is only used for elan network type.
78 .TP 
79 .BI route_list 
80 Print the complete routing table.
81 .PP
82 .SS Device Selection
83 .TP 
84 .BI device " <devname> " 
85 This will select the specified OBD device.  All other commands depend on the device being set. 
86 .TP 
87 .BI device_list 
88 Show all the local Lustre OBDs. AKA 
89 .B dl
90 .PP
91 .SS Device Operations
92 .TP 
93 .BI conf_param " <device> <parameter>"
94 Set a permanent configuration parameter for any device via the MGS.  This
95 command must be run on the MGS node. 
96 .TP 
97 .BI activate 
98 Reactivate an import after deactivating, below.
99 .TP 
100 .BI deactivate 
101 Deactivate an import, in particular meaning do not assign new file stripes
102 to an OSC.  This command should be used on the OSC in the MDT LOV
103 corresponding to a failed OST device, to prevent further attempts at
104 communication with the failed OST.
105 .TP 
106 .BI abort_recovery 
107 Abort the recovery process on a restarting MDT or OST device
108 .PP
109 .SS Virtual Block Device Operation
110 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.
111 .TP
112 .BI blockdev_attach " <file name> <device node>"
113 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.
114 .TP
115 .BI blockdev_detach " <device node>"
116 Detach the virtual block device.
117 .TP
118 .BI blockdev_info " <device node>"
119 Acquire which lustre file was attached to the device node.
120 .PP
121 .SS Debug
122 .TP 
123 .BI debug_daemon 
124 Start and stop the debug daemon, and control the output filename and size.
125 .TP 
126 .BI debug_kernel " [file] [raw]" 
127 Dump the kernel debug buffer to stdout or file.
128 .TP 
129 .BI debug_file " <input> [output]"
130 Convert kernel-dumped debug log from binary to plain text format.
131 .TP 
132 .BI clear 
133 Clear the kernel debug buffer.
134 .TP 
135 .BI mark " <text>" 
136 Insert marker text in the kernel debug buffer.
137 .TP 
138 .BI filter " <subsystem id/debug mask>" 
139 Filter kernel debug messages by subsystem or mask.
140 .TP 
141 .BI show " <subsystem id/debug mask>" 
142 Show specific type of messages.
143 .TP 
144 .BI debug_list " <subs/types>" 
145 List all the subsystem and debug types.
146 .TP
147 .BI modules " <path>" 
148 Provide gdb-friendly module information.
149
150 .SH OPTIONS
151 The following options can be used to invoke lctl. 
152 .TP
153 .B --device 
154 The device to be used for the operation. This can be specified by name or
155 number. See 
156 .B device_list
157 .TP
158 .B --ignore_errors | ignore_errors 
159 Ignore errors during script processing
160 .TP
161 .SH EXAMPLES
162 # lctl
163 .br
164 lctl > dl
165   0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
166   1 UP ost OSS OSS_uuid 3
167   2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
168 .br
169 lctl > dk /tmp/log
170 Debug log: 87 lines, 87 kept, 0 dropped.
171 .br
172 lctl > quit
173 .PP
174 # lctl conf_param testfs-MDT0000 sys.timeout=40
175
176 .SH BUGS
177 Please report all bugs to ClusterFileSystems, support@clusterfs.com
178 .SH AVAILABILITY
179 .B lctl
180 is part of the 
181 .BR Lustre (7) 
182 filesystem package and is available from CFS
183 .br
184 http://clusterfs.com
185 .SH SEE ALSO
186 .BR Lustre (7),
187 .BR mkfs.lustre (8),
188 .BR mount.lustre (8),
189 .BR lctl (8),
190 .BR lfs (1)