Whamcloud - gitweb
b=21592 BLKGETSIZE64 redefinition on some platform.
[fs/lustre-release.git] / lustre / doc / lctl.8
index 2015734..088bd1f 100644 (file)
@@ -7,212 +7,136 @@ 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. 
 
 .SS Network Configuration
 .TP
 .BI network " <up/down>|<tcp/elan/myrinet>"
 Start or stop LNET, or select a network type for other
-.I
-lctl
-commands
+.I lctl
+LNET commands
 .TP
 .BI list_nids
-Print all Network Identifiers on the local node
+Print all Network Identifiers on the local node. LNET must be running.
 .TP
 .BI which_nid " <nidlist>"
 From a list of nids for a remote node, show which interface communication
 will take place on.
 .TP
-.BI interface_list 
-Print the interface entries.
-.TP
-.BI add_interface " <ip> [netmask]" 
-Add an interface entry.
+.BI ping " <nid> "
+Check LNET connectivity via an LNET ping. This will use the fabric
+appropriate to the specified NID.
 .TP
-.BI del_interface " [ip]" 
-Delete an interface entry.
+.BI interface_list 
+Print the network interface information for a given 
+.B network
+type.
 .TP
 .BI peer_list 
-Print the peer entries.
-.TP
-.BI add_peer " <nid> <host> <port>"
-Add a peer entry.
-.TP
-.BI del_peer " [<nid>] [<host>] [ks] "
-Remove a peer entry.
+Print the known peers for a given 
+.B network
+type.
 .TP
 .BI conn_list 
-Print all the connected remote nids on a network.
+Print all the connected remote NIDs for a given
+.B network
+type.
 .TP
 .BI active_tx 
 This command should print active transmits, and it is only used for elan network type.
 .TP 
-.BI add_route " <gateway> <target> [target] "
-Add an entry to the routing table for the given target.
-.TP 
-.BI del_route " <target>" 
-Delete an entry for the target from the routing table.
-.TP
-.BI 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 
 .BI route_list 
 Print the complete routing table.
-.TP
-.BI 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 LNET 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
 .SS Device Selection
 .TP 
-.BI device 
+.BI device " <devname> " 
 This will select the specified OBD device.  All other commands depend on the device being set. 
-.TP
-.BI cfg_device " <$name>" 
-Set current device being configured to <$name>.
 .TP 
 .BI device_list 
-Show all the devices.
-.TP 
-.BI lustre_build_version 
-Print the Lustre build version.
-.PP
-.SS Device Configuration
-.TP 
-.BI conf_param " <device> <parameter>"
-Set a configuration parameter 
-.TP 
-.BI cleanup " [force/failover]"
-Cleanup a previously setup device.
-.TP 
-.BI detach 
-Remove driver (and name and UUID) from the current device.
+Show all the local Lustre OBDs. AKA 
+.B dl
 .PP
 .SS Device Operations
 .TP 
-.BI getattr " <objid>" 
-Get attributes for an OST object <objid> .
-.TP 
-.BI setattr " <objid> <mode>" 
-Set mode attribute for OST object <objid>.
-.TP 
-.BI create " [num [mode [verbose]]]" 
-Create the specified number <num> of OST objects with the given <mode>.
-.TP 
-.BI destroy " <num>" 
-Starting at <objid>, destroy <num> number of objects starting from the object with object id <objid>.
-.TP 
-.BI test_getattr " <num> [verbose [[t]objid]]" 
-Do <num> getattrs on OST object <objid> (objectid+1 on each thread).
-.TP 
-.BI test_brw " [t]<num> [write [verbose [npages [[t]objid]]]]" 
-Do <num> bulk read/writes on OST object <objid> (<npages> per I/O).
-.TP 
-.BI test_ldlm 
-Perform lock manager test.
-.TP 
-.BI ldlm_regress_start " %s [numthreads [refheld [numres [numext]]]]" 
-Start lock manager stress test.
-.TP 
-.BI ldlm_regress_stop 
-Stop lock manager stress test.
-.TP 
-.BI dump_ldlm 
-Dump all lock manager state, this is very useful for debugging
+.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 
 .BI activate 
-Activate an import
+Reactivate an import after deactivating, below.
 .TP 
 .BI deactivate 
-De-activate an import
-.TP 
-.BI recover " <connection UUID>" 
-.TP 
-.BI lookup " <directory> <file>"
-.TP 
-.BI notransno 
-Disable sending of committed transnumber updates
-.TP 
-.BI readonly 
-Disable writes to the underlying device
+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 
 .BI abort_recovery 
-Abort recovery on MDS device
-.TP 
-.BI get_stripe 
-Show stripe info for an echo client object.
-.TP 
-.BI set_stripe " <objid>[ width!count[@offset] [:id:id....] "
-Set stripe info for an echo client
-.TP 
-.BI unset_stripe " <objid>" 
-Unset stripe info for an echo client object.
-.TP
-.BI set_lustre_upcall " </full/path/to/upcall> "
-Set the lustre upcall(obd_lustre_upcall) via the lustre.upcall sysctl.
-.TP
-.BI llog_catlist 
-List all catalog logs on current device.
-.TP
-.BI llog_info " <$logname|#oid#ogr#ogen> "
-Print log header information. 
-.TP
-.BI llog_print " <$logname|#oid#ogr#ogen> [from] [to] "
-Print log content information. It will print all records from index 1 by default.
+Abort the recovery process on a restarting MDT or OST device
+.PP
+.SS Virtual Block Device Operation
+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.
 .TP
-.BI llog_check " <$logname|#oid#ogr#ogen> [from] [to] "
-Check log content information. It will check all records from index 1 by default.
+.BI blockdev_attach " <file name> <device node>"
+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.
 .TP
-.BI llog_cancel " <catalog id|catalog name> <log id> <index> "
-Cancel one record in log.
+.BI blockdev_detach " <device node>"
+Detach the virtual block device.
 .TP
-.BI llog_remove " <catalog id|catalog name> <log id> "
-Remove one log from catalog, erase it from disk.
+.BI blockdev_info " <device node>"
+Acquire which lustre file was attached to the device node.
 .PP
 .SS Debug
 .TP 
 .BI debug_daemon 
-Debug daemon control and dump to a file
+Start and stop the debug daemon, and control the output filename and size.
 .TP 
 .BI debug_kernel " [file] [raw]" 
-Get debug buffer and dump to a fileusage.
+Dump the kernel debug buffer to stdout or file.
 .TP 
 .BI debug_file " <input> [output]"
 Convert kernel-dumped debug log from binary to plain text format.
 .TP 
 .BI clear 
-Clear kernel debug buffer.
+Clear the kernel debug buffer.
 .TP 
 .BI mark " <text>" 
-Insert marker text in kernel debug buffer.
+Insert marker text in the kernel debug buffer.
 .TP 
 .BI filter " <subsystem id/debug mask>" 
-Filter message type from the kernel debug buffer.
+Filter kernel debug messages by subsystem or mask.
 .TP 
 .BI show " <subsystem id/debug mask>" 
 Show specific type of messages.
@@ -222,41 +146,18 @@ List all the subsystem and debug types.
 .TP
 .BI modules " <path>" 
 Provide gdb-friendly module information.
-.TP 
-.BI panic 
-Force the kernel to panic.
-.TP
-.BI lwt " start/stop [file]" 
-Light-weight tracing.
-.TP
-.BI memhog " <page count> [<gfp flags>]" 
-Memory pressure testing.
-.PP
-.SS Control
-.TP 
-.BI help 
-Show a complete list of commands; help <command name> can be used to get help on specific command.
-.TP 
-.BI exit 
-Close the lctl session.
-.TP 
-.BI 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
 # lctl
 .br
@@ -273,14 +174,14 @@ lctl > quit
 # lctl conf_param testfs-MDT0000 sys.timeout=40
 
 .SH BUGS
-Please report all bugs to ClusterFileSystems, support@clusterfs.com
+Please report all bugs to Sun Microsystems, Inc. http://bugzilla.lustre.org/
 .SH AVAILABILITY
 .B lctl
 is part of the 
 .BR Lustre (7) 
-filesystem package and is available from CFS
+filesystem package and is available from Sun Microsystems, Inc.
 .br
-http://clusterfs.com
+http://www.sun.com/software/products/lustre/index.xml
 .SH SEE ALSO
 .BR Lustre (7),
 .BR mkfs.lustre (8),