1 .TH lctl 1 "2003 Oct 8" Lustre "configuration utilities"
3 lctl \- Low level Lustre filesystem configuration utility
8 .B lctl --device <devno> <command [args]>
10 .B lctl --threads <numthreads> <verbose> <devno> <command [args]>
14 can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are (in matching pairs)
33 To get a complete listing of available commands, type help at the lctl prompt. To get basic help on the meaning and syntax of a command, type help command. Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys.
35 For non-interactive single-threaded use, one uses the second invocation, which runs command after connecting to the device.
37 .B Network Configuration
39 --net <tcp/elan/myrinet> <command>
40 Indicate the network type to be used for the operation.
42 network <tcp/elans/myrinet>
43 Indicate what kind of network applies for the configuration commands that follow.
46 Print the interface entries.
48 add_interface <ip> [netmask]
49 Add an interface entry.
52 Delete an interface entry.
55 Print the peer entries.
57 add_peer <nid> <host> <port>
60 del_peer [<nid>] [<host>] [ks]
64 Print autoconnect entries.
66 add_autoconn nid ipaddr port [ise]
67 Add an autoconnect entry.
69 del_autoconn [<nid>] [<host>] [ks]
70 Remove an autoconnect entry.
73 Print all the connected remote nid.
75 connect [[<hostname> <port>] | <elan id>]
76 This will establish a connection to a remote network network id given by the hostname/port combination, or the elan id.
79 Disconnect from a remote nid.
82 This command should print active transmits, and it is only used for elan network type.
85 Informs the socknal of the local nid. It defaults to hostname for tcp networks and is automatically setup for elan/myrinet networks.
91 Associate a given UUID with an nid.
97 Delete a UUID association.
99 add_route <gateway> <target> [target]
100 Add an entry to the routing table for the given target.
103 Delete an entry for the target from the routing table.
105 set_route <gateway> <up/down> [<time>]
106 Enable/disable routes via the given gateway in the protals routing table. <time> is used to tell when a gateway comes back online.
109 Print the complete routing table.
111 fail nid|_all_ [count]
112 Fail/restore communications. Omitting the count implies fail indefinitely, count of zero indicates that communication should be restored. A non-zero count indicates the number of portals messages to be dropped after which the communication is restored. The argument "nid" is used to specify the gateway, which is one peer of the communication.
120 This will select the specified OBD device. All other commands depend on the device being set.
123 Set current device being configured to <$name>.
126 Show all the devices.
129 Print the Lustre build version.
131 .B Device Configuration
133 attach type [name [uuid]]
134 Attach a type to the current device (which you need to set using the device command) and give that device a name and UUID. This allows us to identify the device for use later, and also tells us what type of device we will have.
137 Type specific device setup commands. For obdfilter, a setup command tells the driver which block device it should use for storage and what type of filesystem is on that device.
140 Cleanup a previously setup device.
143 Remove driver (and name and UUID) from the current device.
145 lov_setconfig lov-uuid stripe-count default-stripe-size offset pattern UUID1 [UUID2...]
146 Write LOV configuration to an MDS device.
148 lov_getconfig lov-uuid
149 Read LOV configuration from an MDS device. Returns default-stripe-count, default-stripe-size, offset, pattern, and a list of OST UUID's.
152 Record commands that follow in log.
157 parse config-uuid-name
158 Parse the log of recorded commands for this config.
160 dump_log config-uuid-name
161 Print log of recorded commands for this config to kernel debug log.
163 clear_log config-name
164 Delete current config log of recorded commands.
169 Build a connection handle to a device. This command is used to suspend configuration until the lctl command has ensured that the MDS and OSC services are available. This is to avoid mount failures in a rebooting cluster.
172 Close the connection handle
175 Get attributes for an OST object <objid> .
177 setattr <objid> <mode>
178 Set mode attribute for OST object <objid>.
180 create [num [mode [verbose]]]
181 Create the specified number <num> of OST objects with the given <mode>.
184 Starting at <objid>, destroy <num> number of objects starting from the object with object id <objid>.
186 test_getattr <num> [verbose [[t]objid]]
187 Do <num> getattrs on OST object <objid> (objectid+1 on each thread).
189 test_brw [t]<num> [write [verbose [npages [[t]objid]]]]
190 Do <num> bulk read/writes on OST object <objid> (<npages> per I/O).
193 Perform lock manager test.
195 ldlm_regress_start %s [numthreads [refheld [numres [numext]]]]
196 Start lock manager stress test.
199 Stop lock manager stress test.
202 Dump all lock manager state, this is very useful for debugging
208 De-activate an import
210 recover <connection UUID>
212 lookup <directory> <file>
215 Disable sending of committed transnumber updates
218 Disable writes to the underlying device
221 Abort recovery on MDS device
224 Dump mount options to a file
227 Show stripe info for an echo client object.
229 set_stripe <objid>[ width!count[@offset] [:id:id....]
230 Set stripe info for an echo client
233 Unset stripe info for an echo client object.
235 del_mount_option profile
236 Delete a specified profile.
239 Set the timeout(obd_timeout) for server to wait before failing recovery.
241 set_lustre_upcall </full/path/to/upcall>
242 Set the lustre upcall(obd_lustre_upcall) via the lustre.upcall sysctl.
245 List all catalog logs on current device.
247 llog_info <$logname|#oid#ogr#ogen>
248 Print log header information.
250 llog_print <$logname|#oid#ogr#ogen> [from] [to]
251 Print log content information. It will print all records from index 1 by default.
253 llog_check <$logname|#oid#ogr#ogen> [from] [to]
254 Check log content information. It will check all records from index 1 by default.
256 llog_cancel <catalog id|catalog name> <log id> <index>
257 Cancel one record in log.
259 llog_remove <catalog id|catalog name> <log id>
260 Remove one log from catalog, erase it from disk.
265 Debug daemon control and dump to a file
267 debug_kernel [file] [raw]
268 Get debug buffer and dump to a fileusage.
270 debug_file <input> [output] [raw]
271 Read debug buffer from input and dump to outputusage.
274 Clear kernel debug buffer.
277 Insert marker text in kernel debug buffer.
279 filter <subsystem id/debug mask>
280 Filter message type from the kernel debug buffer.
282 show <subsystem id/debug mask>
283 Show specific type of messages.
285 debug_list <subs/types>
286 List all the subsystem and debug types.
289 Provide gdb-friendly module information.
292 Force the kernel to panic.
294 lwt start/stop [file]
295 Light-weight tracing.
297 memhog <page count> [<gfp flags>]
298 Memory pressure testing.
303 Show a complete list of commands; help <command name> can be used to get help on specific command.
306 Close the lctl session.
309 Close the lctl session.
312 The following options can be used to invoke lctl.
315 The device number to be used for the operation. The value of devno is an integer, normally found by calling lctl name2dev on a device name.
318 How many threads should be forked doing the command specified. The numthreads variable is a strictly positive integer indicating how many threads should be started. The devno option is used as above.
320 .B --ignore_errors | ignore_errors
321 Ignore errors during script processing
324 Save ioctls to a file
332 lctl > attach obdfilter OBDDEV OBDUUID
336 lctl > name2dev OSCDEV 2
386 lctl > setup /dev/loop0 extN