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 all the connected remote nid.
66 connect [[<hostname> <port>] | <elan id>]
67 This will establish a connection to a remote network network id given by the hostname/port combination, or the elan id.
70 Disconnect from a remote nid.
73 This command should print active transmits, and it is only used for elan network type.
76 Informs the socknal of the local nid. It defaults to hostname for tcp networks and is automatically setup for elan/myrinet networks.
82 Associate a given UUID with an nid.
88 Delete a UUID association.
90 add_route <gateway> <target> [target]
91 Add an entry to the routing table for the given target.
94 Delete an entry for the target from the routing table.
96 set_route <gateway> <up/down> [<time>]
97 Enable/disable routes via the given gateway in the protals routing table. <time> is used to tell when a gateway comes back online.
100 Print the complete routing table.
102 fail nid|_all_ [count]
103 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.
111 This will select the specified OBD device. All other commands depend on the device being set.
114 Set current device being configured to <$name>.
117 Show all the devices.
120 Print the Lustre build version.
122 .B Device Configuration
124 attach type [name [uuid]]
125 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.
128 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.
131 Cleanup a previously setup device.
134 Remove driver (and name and UUID) from the current device.
136 lov_setconfig lov-uuid stripe-count default-stripe-size offset pattern UUID1 [UUID2...]
137 Write LOV configuration to an MDS device.
139 lov_getconfig lov-uuid
140 Read LOV configuration from an MDS device. Returns default-stripe-count, default-stripe-size, offset, pattern, and a list of OST UUID's.
143 Record commands that follow in log.
148 parse config-uuid-name
149 Parse the log of recorded commands for this config.
151 dump_log config-uuid-name
152 Print log of recorded commands for this config to kernel debug log.
154 clear_log config-name
155 Delete current config log of recorded commands.
160 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.
163 Close the connection handle
166 Get attributes for an OST object <objid> .
168 setattr <objid> <mode>
169 Set mode attribute for OST object <objid>.
171 create [num [mode [verbose]]]
172 Create the specified number <num> of OST objects with the given <mode>.
175 Starting at <objid>, destroy <num> number of objects starting from the object with object id <objid>.
177 test_getattr <num> [verbose [[t]objid]]
178 Do <num> getattrs on OST object <objid> (objectid+1 on each thread).
180 test_brw [t]<num> [write [verbose [npages [[t]objid]]]]
181 Do <num> bulk read/writes on OST object <objid> (<npages> per I/O).
184 Perform lock manager test.
186 ldlm_regress_start %s [numthreads [refheld [numres [numext]]]]
187 Start lock manager stress test.
190 Stop lock manager stress test.
193 Dump all lock manager state, this is very useful for debugging
199 De-activate an import
201 recover <connection UUID>
203 lookup <directory> <file>
206 Disable sending of committed transnumber updates
209 Disable writes to the underlying device
212 Abort recovery on MDS device
215 Dump mount options to a file
218 Show stripe info for an echo client object.
220 set_stripe <objid>[ width!count[@offset] [:id:id....]
221 Set stripe info for an echo client
224 Unset stripe info for an echo client object.
226 del_mount_option profile
227 Delete a specified profile.
230 Set the timeout(obd_timeout) for server to wait before failing recovery.
232 set_lustre_upcall </full/path/to/upcall>
233 Set the lustre upcall(obd_lustre_upcall) via the lustre.upcall sysctl.
236 List all catalog logs on current device.
238 llog_info <$logname|#oid#ogr#ogen>
239 Print log header information.
241 llog_print <$logname|#oid#ogr#ogen> [from] [to]
242 Print log content information. It will print all records from index 1 by default.
244 llog_check <$logname|#oid#ogr#ogen> [from] [to]
245 Check log content information. It will check all records from index 1 by default.
247 llog_cancel <catalog id|catalog name> <log id> <index>
248 Cancel one record in log.
250 llog_remove <catalog id|catalog name> <log id>
251 Remove one log from catalog, erase it from disk.
256 Debug daemon control and dump to a file
258 debug_kernel [file] [raw]
259 Get debug buffer and dump to a fileusage.
261 debug_file <input> [output]
262 Convert kernel-dumped debug log from binary to plain text format.
265 Clear kernel debug buffer.
268 Insert marker text in kernel debug buffer.
270 filter <subsystem id/debug mask>
271 Filter message type from the kernel debug buffer.
273 show <subsystem id/debug mask>
274 Show specific type of messages.
276 debug_list <subs/types>
277 List all the subsystem and debug types.
280 Provide gdb-friendly module information.
283 Force the kernel to panic.
285 lwt start/stop [file]
286 Light-weight tracing.
288 memhog <page count> [<gfp flags>]
289 Memory pressure testing.
294 Show a complete list of commands; help <command name> can be used to get help on specific command.
297 Close the lctl session.
300 Close the lctl session.
303 The following options can be used to invoke lctl.
306 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.
309 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.
311 .B --ignore_errors | ignore_errors
312 Ignore errors during script processing
315 Save ioctls to a file
323 lctl > attach obdfilter OBDDEV OBDUUID
327 lctl > name2dev OSCDEV 2
377 lctl > setup /dev/loop0 ldiskfs