Whamcloud - gitweb
b=22458 consolidate fs_db flags.
[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 dk
20 ,
21 .B device 
22 ,
23 .B network 
24 .I <up/down>
25 ,
26 .B list_nids
27 ,
28 .B ping
29 .I nid
30 ,
31 .B help
32 ,
33 .B quit.
34
35 To get a complete listing of available commands, type
36 .B help
37 at the lctl prompt.  To get basic help on the meaning and syntax of a
38 command, type 
39 .B help 
40 .I command
41 .  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
42
43 For non-interactive use, one uses the second invocation, which runs command after connecting to the device. 
44
45 .SS Network Configuration
46 .TP
47 .BI network " <up/down>|<tcp/elan/myrinet>"
48 Start or stop LNET, or select a network type for other
49 .I lctl
50 LNET commands
51 .TP
52 .BI list_nids
53 Print all Network Identifiers on the local node. LNET must be running.
54 .TP
55 .BI which_nid " <nidlist>"
56 From a list of nids for a remote node, show which interface communication
57 will take place on.
58 .TP
59 .BI ping " <nid> "
60 Check LNET connectivity via an LNET ping. This will use the fabric
61 appropriate to the specified NID.
62 .TP
63 .BI interface_list 
64 Print the network interface information for a given 
65 .B network
66 type.
67 .TP
68 .BI peer_list 
69 Print the known peers for a given 
70 .B network
71 type.
72 .TP
73 .BI conn_list 
74 Print all the connected remote NIDs for a given
75 .B network
76 type.
77 .TP
78 .BI active_tx 
79 This command should print active transmits, and it is only used for elan network type.
80 .TP 
81 .BI route_list 
82 Print the complete routing table.
83 .PP
84 .SS Device Selection
85 .TP 
86 .BI device " <devname> " 
87 This will select the specified OBD device.  All other commands depend on the device being set. 
88 .TP 
89 .BI device_list 
90 Show all the local Lustre OBDs. AKA 
91 .B dl
92 .PP
93 .SS Device Operations
94 .TP 
95 .BI conf_param " [-d] <device|fsname>.<parameter>=<value>"
96 Set a permanent configuration parameter for any device via the MGS.  This
97 command must be run on the MGS node.
98 .br
99 .B -d <device|fsname>.<parameter>
100 Delete a parameter setting (use the default value at the next restart).  A null value for <value> also deletes the parameter setting.
101 .br
102 .B Parameters:
103 .br
104 All of the writable parameters under 
105 .B lctl list_param
106 (e.g. 
107 .I lctl list_param -F osc.*.* | grep =
108 ) can be permanently set using
109 .B lctl conf_param
110 , but the format is slightly different.  For conf_param, the device is specified first, then the obdtype. (See examples below.)  Wildcards are not supported.
111 .br
112 Additionally, failover nodes may be added (or removed), and some system-wide parameters may be set as well (sys.at_max, sys.at_min, sys.at_extra, sys.at_early_margin, sys.at_history, sys.timeout, sys.ldlm_timeout.)  <device> is ignored for system wide parameters.
113 .br
114 .B Examples:
115 .br 
116 # lctl conf_param testfs.sys.at_max=1200
117 .br
118 # lctl conf_param testfs.llite.max_read_ahead_mb=16 
119 .br
120 # lctl conf_param testfs-MDT0000.lov.stripesize=2M
121 .br
122 # lctl conf_param lustre-OST0001.osc.active=0 
123 .br
124 # lctl conf_param testfs-OST0000.osc.max_dirty_mb=29.15 
125 .br
126 # lctl conf_param testfs-OST0000.ost.client_cache_seconds=15 
127 .br
128 # lctl conf_param testfs-OST0000.failover.node=1.2.3.4@tcp1
129 .TP 
130 .BI activate 
131 Reactivate an import after deactivating, below.  This setting is only effective until the next restart (see 
132 .B conf_param
133 ).
134 .TP 
135 .BI deactivate 
136 Deactivate an import, in particular meaning do not assign new file stripes
137 to an OSC.  This command should be used on the OSC in the MDT LOV
138 corresponding to a failed OST device, to prevent further attempts at
139 communication with the failed OST.
140 .TP 
141 .BI abort_recovery 
142 Abort the recovery process on a restarting MDT or OST device
143 .PP
144 .SS Virtual Block Device Operation
145 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.
146 .TP
147 .BI blockdev_attach " <file name> <device node>"
148 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.
149 .TP
150 .BI blockdev_detach " <device node>"
151 Detach the virtual block device.
152 .TP
153 .BI blockdev_info " <device node>"
154 Acquire which lustre file was attached to the device node.
155 .PP
156 .SS Changelogs
157 .TP
158 .BI changelog_register
159 Register a new changelog user for a particular device.  Changelog entries
160 will not be purged beyond any registered users' set point. (See lfs changelog_clear.)
161 .TP
162 .BI changelog_deregister " <id>"
163 Unregister an existing changelog user.  If the user's "clear" record number
164 is the minimum for the device, changelog records will be purged until the
165 next minimum.  
166 .PP
167 .SS Debug
168 .TP 
169 .BI debug_daemon 
170 Start and stop the debug daemon, and control the output filename and size.
171 .TP 
172 .BI debug_kernel " [file] [raw]" 
173 Dump the kernel debug buffer to stdout or file.
174 .TP 
175 .BI debug_file " <input> [output]"
176 Convert kernel-dumped debug log from binary to plain text format.
177 .TP 
178 .BI clear 
179 Clear the kernel debug buffer.
180 .TP 
181 .BI mark " <text>" 
182 Insert marker text in the kernel debug buffer.
183 .TP 
184 .BI filter " <subsystem id/debug mask>" 
185 Filter kernel debug messages by subsystem or mask.
186 .TP 
187 .BI show " <subsystem id/debug mask>" 
188 Show specific type of messages.
189 .TP 
190 .BI debug_list " <subs/types>" 
191 List all the subsystem and debug types.
192 .TP
193 .BI modules " <path>" 
194 Provide gdb-friendly module information.
195
196 .SH OPTIONS
197 The following options can be used to invoke lctl. 
198 .TP
199 .B --device 
200 The device to be used for the operation. This can be specified by name or
201 number. See 
202 .B device_list
203 .TP
204 .B --ignore_errors | ignore_errors 
205 Ignore errors during script processing
206
207 .SH EXAMPLES
208 # lctl
209 .br
210 lctl > dl
211   0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
212   1 UP ost OSS OSS_uuid 3
213   2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
214 .br
215 lctl > dk /tmp/log
216 Debug log: 87 lines, 87 kept, 0 dropped.
217 .br
218 lctl > quit
219
220 .SH BUGS
221 Please report all bugs to Sun Microsystems, Inc. http://bugzilla.lustre.org/
222 .SH AVAILABILITY
223 .B lctl
224 is part of the 
225 .BR Lustre (7) 
226 filesystem package and is available from Sun Microsystems, Inc.
227 .br
228 http://www.sun.com/software/products/lustre/index.xml
229 .SH SEE ALSO
230 .BR Lustre (7),
231 .BR mkfs.lustre (8),
232 .BR mount.lustre (8),
233 .BR lctl (8),
234 .BR lfs (1)