Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / doc / lctl.8
index 55652c0..e56331a 100644 (file)
@@ -7,385 +7,172 @@ lctl \- Low level Lustre filesystem configuration utility
 .br
 .B lctl --device <devno> <command [args]>
 .br
-.B lctl --threads <numthreads> <verbose> <devno> <command [args]>
-.br
 .SH DESCRIPTION
 .B lctl
-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) 
+is used to directly control Lustre via an ioctl interface, allowing
+various configuration, maintenance, and debugging features to be accessed.
+.B lctl
+can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are
+.B dl
+,
 .B device 
-and 
-.B attach
-, 
-.B detach 
-and 
-.B setup
 ,
-.B cleanup 
-and
-.B connect
+.B network 
+.I <up/down>
+,
+.B list_nids
+,
+.B ping
+.I nid
 ,
-.B disconnect 
-and
 .B help
-, and
+,
 .B quit.
 
-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. 
+To get a complete listing of available commands, type
+.B help
+at the lctl prompt.  To get basic help on the meaning and syntax of a
+command, type 
+.B help 
+.I command
+.  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
 
-For non-interactive single-threaded use, one uses the second invocation, which runs command after connecting to the device. 
+For non-interactive use, one uses the second invocation, which runs command after connecting to the device. 
 
-.B Network Configuration
+.SS Network Configuration
 .TP
---net <tcp/elan/myrinet> <command> 
-Indicate the network type to be used for the operation.
-.TP 
-network <tcp/elans/myrinet> 
-Indicate what kind of network applies for the configuration commands that follow.
-.TP
-interface_list 
-Print the interface entries.
-.TP
-add_interface <ip> [netmask] 
-Add an interface entry.
+.BI network " <up/down>|<tcp/elan/myrinet>"
+Start or stop LNET, or select a network type for other
+.I lctl
+LNET commands
 .TP
-del_interface [ip] 
-Delete an interface entry.
+.BI list_nids
+Print all Network Identifiers on the local node. LNET must be running.
 .TP
-peer_list 
-Print the peer entries.
+.BI which_nid " <nidlist>"
+From a list of nids for a remote node, show which interface communication
+will take place on.
 .TP
-add_peer <nid> <host> <port> 
-Add a peer entry.
+.BI ping " <nid> "
+Check LNET connectivity via an LNET ping. This will use the fabric
+appropriate to the specified NID.
 .TP
-del_peer [<nid>] [<host>] [ks] 
-Remove a peer entry.
+.BI interface_list 
+Print the network interface information for a given 
+.B network
+type.
 .TP
-autoconn_list 
-Print autoconnect entries.
+.BI peer_list 
+Print the known peers for a given 
+.B network
+type.
 .TP
-add_autoconn nid ipaddr port [ise] 
-Add an autoconnect entry.
-.TP
-del_autoconn [<nid>] [<host>] [ks] 
-Remove an autoconnect entry.
-.TP
-conn_list 
-Print all the connected remote nid.
-.TP 
-connect [[<hostname> <port>] | <elan id>] 
-This will establish a connection to a remote network network id given by the hostname/port combination, or the elan id.
-.TP 
-disconnect <nid> 
-Disconnect from a remote nid.
+.BI conn_list 
+Print all the connected remote NIDs for a given
+.B network
+type.
 .TP
-active_tx 
+.BI active_tx 
 This command should print active transmits, and it is only used for elan network type.
 .TP 
-mynid [nid] 
-Informs the socknal of the local nid. It defaults to hostname for tcp networks and is automatically setup for elan/myrinet networks.
-.TP
-shownid 
-Print the local NID.
-.TP 
-add_uuid <uuid> <nid> 
-Associate a given UUID with an nid.
-.TP 
-close_uuid <uuid> 
-Disconnect a UUID.
-.TP 
-del_uuid <uuid> 
-Delete a UUID association.
-.TP 
-add_route <gateway> <target> [target] 
-Add an entry to the routing table for the given target.
-.TP 
-del_route <target> 
-Delete an entry for the target from the routing table.
-.TP
-set_route <gateway> <up/down> [<time>] 
-Enable/disable routes via the given gateway in the protals routing table. <time> is used to tell when a gateway comes back online.
-.TP 
-route_list 
+.BI route_list 
 Print the complete routing table.
-.TP
-fail nid|_all_ [count] 
-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.
 .PP
-.B Device Selection
+.SS Device Selection
 .TP 
-newdev 
-Create a new device.
-.TP 
-device 
+.BI device " <devname> " 
 This will select the specified OBD device.  All other commands depend on the device being set. 
-.TP
-cfg_device <$name> 
-Set current device being configured to <$name>.
-.TP 
-device_list 
-Show all the devices.
 .TP 
-lustre_build_version 
-Print the Lustre build version.
+.BI device_list 
+Show all the local Lustre OBDs. AKA 
+.B dl
 .PP
-.B Device Configuration
-.TP 
-attach type [name [uuid]] 
-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.
-.TP 
-setup <args...> 
-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. 
-.TP 
-cleanup 
-Cleanup a previously setup device.
-.TP 
-detach 
-Remove driver (and name and UUID) from the current device.
-.TP 
-lov_setconfig lov-uuid stripe-count default-stripe-size offset pattern UUID1 [UUID2...] 
-Write LOV configuration to an MDS device.
-.TP 
-lov_getconfig lov-uuid 
-Read LOV configuration from an MDS device. Returns default-stripe-count, default-stripe-size, offset, pattern, and a list of OST UUID's.
-.TP
-record cfg-uuid-name 
-Record commands that follow in log.
-.TP
-endrecord 
-Stop recording.
-.TP
-parse config-uuid-name 
-Parse the log of recorded commands for this config.
-.TP
-dump_log config-uuid-name 
-Print log of recorded commands for this config to kernel debug log.
-.TP
-clear_log config-name 
-Delete current config log of recorded commands.
-.PP
-.B Device Operations
-.TP 
-probe [timeout] 
-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.
-.TP 
-close 
-Close the connection handle
-.TP 
-getattr <objid> 
-Get attributes for an OST object <objid> .
-.TP 
-setattr <objid> <mode> 
-Set mode attribute for OST object <objid>.
-.TP 
-create [num [mode [verbose]]] 
-Create the specified number <num> of OST objects with the given <mode>.
-.TP 
-destroy <num> 
-Starting at <objid>, destroy <num> number of objects starting from the object with object id <objid>.
-.TP 
-test_getattr <num> [verbose [[t]objid]] 
-Do <num> getattrs on OST object <objid> (objectid+1 on each thread).
-.TP 
-test_brw [t]<num> [write [verbose [npages [[t]objid]]]] 
-Do <num> bulk read/writes on OST object <objid> (<npages> per I/O).
-.TP 
-test_ldlm 
-Perform lock manager test.
-.TP 
-ldlm_regress_start %s [numthreads [refheld [numres [numext]]]] 
-Start lock manager stress test.
-.TP 
-ldlm_regress_stop 
-Stop lock manager stress test.
-.TP 
-dump_ldlm 
-Dump all lock manager state, this is very useful for debugging
-.TP 
-activate 
-Activate an import
-.TP 
-deacttivate 
-De-activate an import
+.SS Device Operations
 .TP 
-recover <connection UUID> 
+.BI conf_param " <device> <parameter>"
+Set a permanent configuration parameter for any device via the MGS.  This
+command must be run on the MGS node. 
 .TP 
-lookup <directory> <file>
+.BI activate 
+Reactivate an import after deactivating, below.
 .TP 
-notransno 
-Disable sending of committed transnumber updates
+.BI deactivate 
+Deactivate an import, in particular meaning do not assign new file stripes
+to an OSC.  This command should be used on the OSC in the MDT LOV
+corresponding to a failed OST device, to prevent further attempts at
+communication with the failed OST.
 .TP 
-readonly 
-Disable writes to the underlying device
-.TP 
-abort_recovery 
-Abort recovery on MDS device
-.TP 
-mount_option 
-Dump mount options to a file
-.TP 
-get_stripe 
-Show stripe info for an echo client object.
-.TP 
-set_stripe <objid>[ width!count[@offset] [:id:id....] 
-Set stripe info for an echo client
-.TP 
-unset_stripe <objid> 
-Unset stripe info for an echo client object.
-.TP
-del_mount_option profile 
-Delete a specified profile.
-.TP
-set_timeout <secs> 
-Set the timeout(obd_timeout) for server to wait before failing recovery.
-.TP
-set_lustre_upcall </full/path/to/upcall> 
-Set the lustre upcall(obd_lustre_upcall) via the lustre.upcall sysctl.
-.TP
-llog_catlist 
-List all catalog logs on current device.
-.TP
-llog_info <$logname|#oid#ogr#ogen> 
-Print log header information. 
-.TP
-llog_print <$logname|#oid#ogr#ogen> [from] [to] 
-Print log content information. It will print all records from index 1 by default.
-.TP
-llog_check <$logname|#oid#ogr#ogen> [from] [to] 
-Check log content information. It will check all records from index 1 by default.
-.TP
-llog_cancel <catalog id|catalog name> <log id> <index> 
-Cancel one record in log.
-.TP
-llog_remove <catalog id|catalog name> <log id> 
-Remove one log from catalog, erase it from disk.
+.BI abort_recovery 
+Abort the recovery process on a restarting MDT or OST device
 .PP
-.B Debug
+.SS Debug
 .TP 
-debug_daemon 
-Debug daemon control and dump to a file
+.BI debug_daemon 
+Start and stop the debug daemon, and control the output filename and size.
 .TP 
-debug_kernel [file] [raw] 
-Get debug buffer and dump to a fileusage.
+.BI debug_kernel " [file] [raw]" 
+Dump the kernel debug buffer to stdout or file.
 .TP 
-debug_file <input> [output] [raw] 
-Read debug buffer from input and dump to outputusage.
+.BI debug_file " <input> [output]"
+Convert kernel-dumped debug log from binary to plain text format.
 .TP 
-clear 
-Clear kernel debug buffer.
+.BI clear 
+Clear the kernel debug buffer.
 .TP 
-mark <text> 
-Insert marker text in kernel debug buffer.
+.BI mark " <text>" 
+Insert marker text in the kernel debug buffer.
 .TP 
-filter <subsystem id/debug mask> 
-Filter message type from the kernel debug buffer.
+.BI filter " <subsystem id/debug mask>" 
+Filter kernel debug messages by subsystem or mask.
 .TP 
-show <subsystem id/debug mask> 
+.BI show " <subsystem id/debug mask>" 
 Show specific type of messages.
 .TP 
-debug_list <subs/types> 
+.BI debug_list " <subs/types>" 
 List all the subsystem and debug types.
 .TP
-modules <path> 
+.BI modules " <path>" 
 Provide gdb-friendly module information.
-.TP 
-panic 
-Force the kernel to panic.
-.TP
-lwt start/stop [file] 
-Light-weight tracing.
-.TP
-memhog <page count> [<gfp flags>] 
-Memory pressure testing.
-.PP
-.B Control
-.TP 
-help 
-Show a complete list of commands; help <command name> can be used to get help on specific command.
-.TP 
-exit 
-Close the lctl session.
-.TP 
-quit 
-Close the lctl session.
 
 .SH OPTIONS
 The following options can be used to invoke lctl. 
 .TP
 .B --device 
-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. 
-.TP
-.B --threads 
-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.
+The device to be used for the operation. This can be specified by name or
+number. See 
+.B device_list
 .TP
 .B --ignore_errors | ignore_errors 
 Ignore errors during script processing
 .TP
-.B dump 
-Save ioctls to a file 
 .SH EXAMPLES
-.B attach
-
 # lctl
 .br
-lctl > newdev
-.br
-lctl > attach obdfilter OBDDEV OBDUUID
-
-.B connect
-
-lctl > name2dev OSCDEV 2 
-.br
-lctl > device 2
-.br
-lctl > connect
-
-.B getattr
-
-lctl > getattr 12
-.br
-id: 12
-.br
-grp: 0
-.br
-atime: 1002663714
-.br
-mtime: 1002663535
-.br
-ctime: 1002663535
-.br
-size: 10
-.br
-blocks: 8
-.br
-blksize: 4096
-.br
-mode: 100644
+lctl > dl
+  0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
+  1 UP ost OSS OSS_uuid 3
+  2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
 .br
-uid: 0
-.br
-gid: 0
-.br
-flags: 0
-.br
-obdflags: 0
-.br
-nlink: 1
-.br
-valid: ffffffff
-.br
-inline:
-.br
-obdmd:
-.br
-lctl > disconnect 
-.br
-Finished (success)
-
-.B setup 
-
-lctl > setup /dev/loop0 extN
+lctl > dk /tmp/log
+Debug log: 87 lines, 87 kept, 0 dropped.
 .br
 lctl > quit
+.PP
+# lctl conf_param testfs-MDT0000 sys.timeout=40
 
 .SH BUGS
-None are known.
+Please report all bugs to ClusterFileSystems, support@clusterfs.com
+.SH AVAILABILITY
+.B lctl
+is part of the 
+.BR Lustre (7) 
+filesystem package and is available from CFS
+.br
+http://clusterfs.com
+.SH SEE ALSO
+.BR Lustre (7),
+.BR mkfs.lustre (8),
+.BR mount.lustre (8),
+.BR lctl (8),
+.BR lfs (1)