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]>
12 is used to directly control Lustre via an ioctl interface, allowing
13 various configuration, maintenance, and debugging features to be accessed.
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
35 To get a complete listing of available commands, type
37 at the lctl prompt. To get basic help on the meaning and syntax of a
41 . Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys.
43 For non-interactive use, one uses the second invocation, which runs command after connecting to the device.
45 .SS Network Configuration
47 .BI network " <up/down>|<tcp/elan/myrinet>"
48 Start or stop LNET, or select a network type for other
53 Print all Network Identifiers on the local node. LNET must be running.
55 .BI which_nid " <nidlist>"
56 From a list of nids for a remote node, show which interface communication
59 .BI replace_nids " <devicename> <nid1>[,nid2,nid3 ...]"
60 Replace the LNET Network Identifiers for a given device,
61 as when the server's IP address has changed.
62 This command must be run on the MGS node.
63 Only MGS server should be started (command execution returns error
64 in another cases). To start the MGS service only:
65 mount -t lustre <MDT partition> -o nosvc <mount point>
66 Note the replace_nids command skips any invalidated records in the configuration log.
67 The previous log is backed up with the suffix '.bak'.
70 Check LNET connectivity via an LNET ping. This will use the fabric
71 appropriate to the specified NID.
74 Print the network interface information for a given
79 Print the known peers for a given
84 Print all the connected remote NIDs for a given
89 Print the complete routing table.
93 .BI device " <devname> "
94 This will select the specified OBD device. All other commands depend on the device being set.
97 Show all the local Lustre OBDs. AKA
100 .SS Device Operations
102 .BI list_param " [-F|-R] <param_search ...>"
103 List the Lustre or LNet parameter name
105 Add '/', '@' or '=' for dirs, symlinks and writeable files, respectively.
108 Recursively list all parameters under the specified parameter search string. If
110 is unspecified, all the parameters will be shown.
115 # lctl list_param ost.*
122 # lctl list_param -F ost.* debug
131 # lctl list_param -R mdt
137 mdt.lustre-MDT0000.capa
139 mdt.lustre-MDT0000.capa_count
141 mdt.lustre-MDT0000.capa_key_timeout
143 mdt.lustre-MDT0000.capa_timeout
145 mdt.lustre-MDT0000.commit_on_sharing
147 mdt.lustre-MDT0000.evict_client
151 .BI get_param " [-F|-n|-N|-R] <parameter ...>"
152 Get the value of Lustre or LNET parameter.
155 When -N specified, add '/', '@' or '=' for directories, symlinks and writeable files, respectively.
159 Print only the value and not parameter name.
162 Print only matched parameter names and not the values. (Especially useful when using patterns.)
165 Print all of the parameter names below the specified name.
170 # lctl get_param ost.*
177 # lctl get_param -n debug timeout
179 super warning dlmtrace error emerg ha rpctrace vfstrace config console
184 # lctl get_param -N ost.* debug
192 lctl "get_param -NF" is equivalent to "list_param -F".
194 .BI set_param " [-n] [-P] [-d] <parameter=value ...>"
195 Set the value of Lustre or LNET parameter.
198 Disable printing of the key name when printing values.
201 Set the parameter permanently, filesystem-wide.
202 This parameters are only visible to 2.5.0 and later clients, older clients will not see these parameters.
205 Remove the permanent setting (only with -P option)
210 # lctl set_param fail_loc=0 timeout=20
217 # lctl set_param -n fail_loc=0 timeout=20
224 # lctl set_param -P osc.*.max_dirty_mb=32
227 .BI conf_param " [-d] <device|fsname>.<parameter>=<value>"
228 Set a permanent configuration parameter for any device via the MGS. This
229 command must be run on the MGS node.
231 .B -d <device|fsname>.<parameter>
232 Delete a parameter setting (use the default value at the next restart). A null value for <value> also deletes the parameter setting.
236 All of the writable parameters under
239 .I lctl list_param -F osc.*.* | grep =
240 ) can be permanently set using
242 , but the format is slightly different. For conf_param, the device is specified first, then the obdtype. (See examples below.) Wildcards are not supported.
244 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.
248 # lctl conf_param testfs.sys.at_max=1200
250 # lctl conf_param testfs.llite.max_read_ahead_mb=16
252 # lctl conf_param testfs-MDT0000.lov.stripesize=2M
254 # lctl conf_param lustre-OST0001.osc.active=0
256 # lctl conf_param testfs-OST0000.osc.max_dirty_mb=29.15
258 # lctl conf_param testfs-OST0000.ost.client_cache_seconds=15
260 # lctl conf_param testfs-OST0000.failover.node=1.2.3.4@tcp1
263 Reactivate an import after deactivating, below. This setting is only effective until the next restart (see
268 Deactivate an import, in particular meaning do not assign new file stripes
269 to an OSC. This command should be used on the OSC in the MDT LOV
270 corresponding to a failed OST device, to prevent further attempts at
271 communication with the failed OST.
274 Abort the recovery process on a restarting MDT or OST device
276 .SS Virtual Block Device Operation
277 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.
279 .BI blockdev_attach " <file name> <device node>"
280 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.
282 .BI blockdev_detach " <device node>"
283 Detach the virtual block device.
285 .BI blockdev_info " <device node>"
286 Acquire which lustre file was attached to the device node.
290 .BI changelog_register " [-n]"
291 Register a new changelog user for a particular device. Changelog entries
292 will not be purged beyond any registered users' set point. (See lfs changelog_clear.)
295 Print only the ID of the newly registered user.
297 .BI changelog_deregister " <id>"
298 Unregister an existing changelog user. If the user's "clear" record number
299 is the minimum for the device, changelog records will be purged until the
303 An identity mapping feature that facilitates mapping of client UIDs and GIDs to
304 local file system UIDs and GIDs, while maintaining POSIX ownership, permissions,
307 While the nodemap feature is enabled, all client file system access is subject
308 to the nodemap identity mapping policy, which consists of the 'default' catchall
309 nodemap, and any user-defined nodemaps. The 'default' nodemap maps all client
310 identities to 99:99 (nobody:nobody). Administrators can define nodemaps for a
311 range of client NIDs which map identities, and these nodemaps can be flagged as
312 'trusted' so identities are accepted without translation, as well as flagged
313 as 'admin' meaning that root is not squashed for these nodes.
315 Note: In the current phase of implementation, to use the nodemap functionality
316 you only need to enable and define nodemaps on the MDS. The MDSes must also be
317 in a nodemap with the admin and trusted flags set. To use quotas with nodemaps,
318 you must also use set_param to enable and define nodemaps on the OSS (matching
319 what is defined on the MDS). Nodemaps do not currently persist, unless you
320 define them with set_param and use the -P flag. Note that there is a hard limit
321 to the number of changes you can persist over the lifetime of the file system.
326 \fBlctl-nodemap-activate\fR(8)
328 Activate/deactivate the nodemap feature.
331 \fBlctl-nodemap-add\fR(8)
333 Add a new nodemap, to which NID ranges, identities, and properties can be added.
336 \fBlctl-nodemap-del\fR(8)
338 Delete an existing nodemap.
341 \fBlctl-nodemap-add-range\fR(8)
343 Define a range of NIDs for a nodemap.
346 \fBlctl-nodemap-del-range\fR(8)
348 Delete an existing NID range from a nodemap.
351 \fBlctl-nodemap-add-idmap\fR(8)
353 Add a UID or GID mapping to a nodemap.
356 \fBlctl-nodemap-del-idmap\fR(8)
358 Delete an existing UID or GID mapping from a nodemap.
361 \fBlctl-nodemap-modify\fR(8)
363 Modify a nodemap property.
367 An on-line Lustre consistency check and repair tool.
369 .B lfsck_start \fR<-M | --device [MDT,OST]_device>
370 \fR[-A | --all] [-c | --create_ostobj [on | off]]
371 \fR[-e | --error <continue | abort>] [-h | --help]
372 \fR[-n | --dryrun [on | off]] [-o | --orphan]
373 \fR[-r | --reset] [-s | --speed speed_limit]
374 \fR[-t | --type lfsck_type[,lfsck_type...]]
375 \fR[-w | --window_size size]
377 Start LFSCK on the specified MDT or OST device with specified parameters.
379 -M, --device <MDT,OST_device>
380 The MDT or OST device to start LFSCK/scrub on.
383 Start LFSCK on all available MDT devices.
385 -c, --create_ostobj [on | off]
386 Create the lost OST-object for dangling LOV EA: 'off' (default) or 'on'. Under
387 default mode, when the LFSCK find some MDT-object with dangling reference, it
388 will report the inconsistency but will not repair it. If 'on' is given, then
389 LFSCK will re-create the missed OST-object.
391 -e, --error <error_handle>
392 With error_handle as 'abort' then if a repair is impossible LFSCK will save
393 the current position stop with an error. Otherwise the default behavior is
394 to 'continue' if a repair is impossible.
397 Show the usage message.
399 -n, --dryrun [on | off]
400 Perform a trial run with no changes made, if 'on' or no argument is given.
401 Default is 'off', meaning that any inconsistencies found will be repaired.
404 Handle orphan objects, such as orphan OST-objects for layout LFSCK by
405 linking them under the .../.lustre/lost+found directory.
408 Set the current position of object iteration to the beginning of the specified
409 device. The non-specified parameters will also be reset to the default. By
410 default the iterator will resume the scanning from the last saved checkpoint
411 position, and other unspecified parameters will be the same as the prior
414 -s, --speed <speed_limit>
415 Set the upper limit of LFSCK processing in objects per second to reduce load
416 on the servers and storage. If no value is specified the saved value is used
417 (if resuming from a checkpoint). Otherwise the default value of 0 is used,
418 which means check the filesystem as quickly as possible.
420 -t, --type <lfsck_type[,lfsck_type...]>
421 The type of LFSCK checking/repair to execute. If no type is given and the
422 previous run was incomplete or internal consistency checks detected an error,
423 then the same types are used for the next run. Otherwise, the default is to
424 check all types of consistency. Any time LFSCK is triggered on an ldiskfs
425 MDT or OST then OI Scrub is run. Valid types are a comma-separated list of one or more of
427 to run only the local OI Scrub on ldiskfs targets,
429 for FID-in-dirent and linkEA checking on the MDT(s),
431 for MDT-OST cross-reference consistency, and
433 to run all of the available check types.
435 -w, --window_size <size>
436 Specifies the maximum number of in-flight request being processed at
437 one time. This controls the load placed on remote OSTs when running
439 checks. By default there are at most 1024 outstanding requests.
441 .B lfsck_stop \fR<-M | --device [MDT,OST]_device> [-A | --all] [-h | --help]
442 Stop LFSCK on the specified MDT or OST device.
444 -M, --device <[MDT,OST]_device>
445 The MDT or OST device to stop LFSCK/scrub on.
448 Stop LFSCK on all devices.
455 Start and stop the debug daemon, and control the output filename and size.
457 .BI debug_kernel " [file] [raw]"
458 Dump the kernel debug buffer to stdout or file.
460 .BI debug_file " <input> [output]"
461 Convert kernel-dumped debug log from binary to plain text format.
464 Clear the kernel debug buffer.
467 Insert marker text in the kernel debug buffer.
469 .BI filter " <subsystem id/debug mask>"
470 Filter kernel debug messages by subsystem or mask.
472 .BI show " <subsystem id/debug mask>"
473 Show specific type of messages.
475 .BI debug_list " <subs/types>"
476 List all the subsystem and debug types.
478 .BI modules " <path>"
479 Provide gdb-friendly module information.
482 The following options can be used to invoke lctl.
485 The device to be used for the operation. This can be specified by name or
489 .B --ignore_errors | ignore_errors
490 Ignore errors during script processing
492 .B lustre_build_version
493 Output the build version of the Lustre kernel modules
496 Output the build version of the lctl utility
499 Provides brief help on the various arguments
502 Quit the interactive lctl session
508 0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
509 1 UP ost OSS OSS_uuid 3
510 2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
513 Debug log: 87 lines, 87 kept, 0 dropped.
525 .BR mount.lustre (8),