'\" t .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 11/04/2009 .\" Manual: MySQL Database System .\" Source: MySQL 5.1 .\" Language: English .\" .TH "\FBNDBD\FR" "8" "11/04/2009" "MySQL 5\&.1" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .\" ndbd .\" MySQL Cluster: ndbd .\" MySQL Cluster: data nodes .\" data nodes (MySQL Cluster) .\" storage nodes - see data nodes, ndbd .SH "NAME" ndbd \- the MySQL Cluster data node daemon .SH "SYNOPSIS" .HP \w'\fBndbd\ \fR\fB\fIoptions\fR\fR\ 'u \fBndbd \fR\fB\fIoptions\fR\fR .SH "DESCRIPTION" .PP \fBndbd\fR is the process that is used to handle all the data in tables using the NDB Cluster storage engine\&. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks\&. .PP In a MySQL Cluster, a set of \fBndbd\fR processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. .\" MySQL Cluster: administration .\" MySQL Cluster: commands .\" command options (MySQL Cluster): ndbd .\" MySQL Cluster: ndbd process .PP The following table includes command options specific to the MySQL Cluster data node program \fBndbd\fR\&. Additional descriptions follow the table\&. For options common to all MySQL Cluster programs, see Section\ \&17.4.2, \(lqOptions Common to MySQL Cluster Programs\(rq\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP All of these options also apply to the multi\-threaded version of this program \(em \fBndbmtd\fR, which is available in MySQL Cluster NDB 7\&.0 \(em and you may substitute \(lq\fBndbmtd\fR\(rq for \(lq\fBndbd\fR\(rq wherever the latter occurs in this section\&. .sp .5v .RE .PP For options common to all NDBCLUSTER programs, see Section\ \&17.4.2, \(lqOptions Common to MySQL Cluster Programs\(rq\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-bind\-address\fR .TS allbox tab(:); l l s l l s l l s ^ l l ^ l l. T{ \fBVersion Introduced\fR T}:T{ 5\&.1\&.12 T} T{ \fBCommand Line Format\fR T}:T{ \-\-bind\-address=name T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ string T} :T{ \fBDefault\fR T}:T{ T} .TE .sp 1 Causes \fBndbd\fR to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. .sp This option was added in MySQL 5\&.1\&.12\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-daemon\fR, \fB\-d\fR .TS allbox tab(:); l l s l l s ^ l l ^ l l. T{ \fBCommand Line Format\fR T}:T{ \-\-daemon T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ boolean T} :T{ \fBDefault\fR T}:T{ TRUE T} .TE .sp 1 Instructs \fBndbd\fR to execute as a daemon process\&. This is the default behavior\&. \fB\-\-nodaemon\fR can be used to prevent the process from running as a daemon\&. .sp This option has no effect when running \fBndbd\fR or \fBndbmtd\fR on Windows platforms\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" --initial option (ndbd) .\" --initial option (ndbmtd) \fB\-\-initial\fR .TS allbox tab(:); l l s l l s ^ l l ^ l l. T{ \fBCommand Line Format\fR T}:T{ \-\-initial T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ boolean T} :T{ \fBDefault\fR T}:T{ FALSE T} .TE .sp 1 Instructs \fBndbd\fR to perform an initial start\&. An initial start erases any files created for recovery purposes by earlier instances of \fBndbd\fR\&. It also re\-creates recovery log files\&. Note that on some operating systems this process can take a substantial amount of time\&. .sp An \fB\-\-initial\fR start is to be used \fIonly\fR when starting the \fBndbd\fR process under very special circumstances; this is because this option causes all files to be removed from the Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} When performing a software upgrade which has changed the contents of any files\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} When restarting the node with a new version of \fBndbd\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} As a measure of last resort when for some reason the node restart or system restart repeatedly fails\&. In this case, be aware that this node can no longer be used to restore data due to the destruction of the data files\&. .RE .RS 4 Use of this option prevents the StartPartialTimeout and StartPartitionedTimeout configuration parameters from having any effect\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br This option does \fInot\fR affect either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Backup files that have already been created by the affected node .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} MySQL Cluster Disk Data files (see Section\ \&17.5.9, \(lqMySQL Cluster Disk Data Tables\(rq)\&. .RE .RS 4 .sp This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in a MySQL Cluster that is running normally\&. .sp .5v .RE It is permissible to use this option when starting the cluster for the very first time (that is, before any data node files have been created); however, it is \fInot\fR necessary to do so\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" --initial-start option (ndbd) .\" --initial-start option (ndbmtd) \fB\-\-initial\-start\fR .TS allbox tab(:); l l s l l s l l s ^ l l ^ l l. T{ \fBVersion Introduced\fR T}:T{ 5\&.1\&.11 T} T{ \fBCommand Line Format\fR T}:T{ \-\-initial\-start T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ boolean T} :T{ \fBDefault\fR T}:T{ FALSE T} .TE .sp 1 This option is used when performing a partial initial start of the cluster\&. Each node should be started with this option, as well as \fB\-\-nowait\-nodes\fR\&. .sp For example, suppose you have a 4\-node cluster whose data nodes have the IDs 2, 3, 4, and 5, and you wish to perform a partial initial start using only nodes 2, 4, and 5 \(em that is, omitting node 3: .sp .if n \{\ .RS 4 .\} .nf ndbd \-\-ndbd\-nodeid=2 \-\-nowait\-nodes=3 \-\-initial\-start ndbd \-\-ndbd\-nodeid=4 \-\-nowait\-nodes=3 \-\-initial\-start ndbd \-\-ndbd\-nodeid=5 \-\-nowait\-nodes=3 \-\-initial\-start .fi .if n \{\ .RE .\} .sp This option was added in MySQL 5\&.1\&.11\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br Prior to MySQL 5\&.1\&.19, it was not possible to perform DDL operations involving Disk Data tables on a partially started cluster\&. (See \m[blue]\fBBug#24631\fR\m[]\&\s-2\u[1]\d\s+2\&.) .sp .5v .RE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" --nowait-nodes option (ndbd) .\" --nowait-nodes option (ndbmtd) \fB\-\-nowait\-nodes=\fR\fB\fInode_id_1\fR\fR\fB[, \fR\fB\fInode_id_2\fR\fR\fB[, \&.\&.\&.]]\fR .TS allbox tab(:); l l s l l s l l s ^ l l ^ l l. T{ \fBVersion Introduced\fR T}:T{ 5\&.1\&.11 T} T{ \fBCommand Line Format\fR T}:T{ \-\-nowait\-nodes=list T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ string T} :T{ \fBDefault\fR T}:T{ T} .TE .sp 1 This option takes a list of data nodes which for which the cluster will not wait for before starting\&. .sp This can be used to start the cluster in a partitioned state\&. For example, to start the cluster with only half of the data nodes (nodes 2, 3, 4, and 5) running in a 4\-node cluster, you can start each \fBndbd\fR process with \fB\-\-nowait\-nodes=3,5\fR\&. In this case, the cluster starts as soon as nodes 2 and 4 connect, and does \fInot\fR wait StartPartitionedTimeout milliseconds for nodes 3 and 5 to connect as it would otherwise\&. .sp If you wanted to start up the same cluster as in the previous example without one \fBndbd\fR \(em say, for example, that the host machine for node 3 has suffered a hardware failure \(em then start nodes 2, 4, and 5 with \fB\-\-nowait\-nodes=3\fR\&. Then the cluster will start as soon as nodes 2, 4, and 5 connect and will not wait for node 3 to start\&. .sp This option was added in MySQL 5\&.1\&.9\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" --nodaemon option (ndbd) .\" --nodaemon option (ndbmtd) \fB\-\-nodaemon\fR .TS allbox tab(:); l l s l l s ^ l l ^ l l. T{ \fBCommand Line Format\fR T}:T{ \-\-nodaemon T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ boolean T} :T{ \fBDefault\fR T}:T{ FALSE T} .TE .sp 1 Instructs \fBndbd\fR not to start as a daemon process\&. This is useful when \fBndbd\fR is being debugged and you want output to be redirected to the screen\&. .sp As of MySQL Cluster NDB 7\&.0\&.8, the default behavior for \fBndbd\fR and \fBndbmtd\fR on Windows is to run in the foreground, making this option unnecessary on Windows platforms\&. (\m[blue]\fBBug#45588\fR\m[]\&\s-2\u[2]\d\s+2) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" --nostart option (ndbd) .\" -n option (ndbd) .\" --nostart option (ndbmtd) .\" -n option (ndbmtd) \fB\-\-nostart\fR, \fB\-n\fR .TS allbox tab(:); l l s l l s ^ l l ^ l l. T{ \fBCommand Line Format\fR T}:T{ \-\-nostart T} T{ \ \& T}:T{ \fBPermitted Values \fR T} :T{ \fBType\fR T}:T{ boolean T} :T{ \fBDefault\fR T}:T{ FALSE T} .TE .sp 1 Instructs \fBndbd\fR not to start automatically\&. When this option is used, \fBndbd\fR connects to the management server, obtains configuration data from it, and initializes communication objects\&. However, it does not actually start the execution engine until specifically requested to do so by the management server\&. This can be accomplished by issuing the proper START command in the management client (see Section\ \&17.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq)\&. .RE .\" MySQL Cluster: log files .\" log files (MySQL Cluster) .PP \fBndbd\fR generates a set of log files which are placed in the directory specified by DataDir in the config\&.ini configuration file\&. .PP These log files are listed below\&. \fInode_id\fR is the node\'s unique identifier\&. Note that \fInode_id\fR represents the node\'s unique identifier\&. For example, ndb_2_error\&.log is the error log generated by the data node whose node ID is 2\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" MySQL Cluster: error logs .\" error logs (MySQL Cluster) ndb_\fInode_id\fR_error\&.log is a file containing records of all crashes which the referenced \fBndbd\fR process has encountered\&. Each record in this file contains a brief error string and a reference to a trace file for this crash\&. A typical entry in this file might appear as shown here: .sp .if n \{\ .RS 4 .\} .nf Date/Time: Saturday 30 July 2004 \- 00:20:01 Type of error: error Message: Internal program error (failed ndbrequire) Fault ID: 2341 Problem data: DbtupFixAlloc\&.cpp Object of reference: DBTUP (Line: 173) ProgramName: NDB Kernel ProcessID: 14909 TraceFile: ndb_2_trace\&.log\&.2 ***EOM*** .fi .if n \{\ .RE .\} .sp Listings of possible \fBndbd\fR exit codes and messages generated when a data node process shuts down prematurely can be found in \m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[3]\d\s+2\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br \fIThe last entry in the error log file is not necessarily the newest one\fR (nor is it likely to be)\&. Entries in the error log are \fInot\fR listed in chronological order; rather, they correspond to the order of the trace files as determined in the ndb_\fInode_id\fR_trace\&.log\&.next file (see below)\&. Error log entries are thus overwritten in a cyclical and not sequential fashion\&. .sp .5v .RE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} .\" MySQL Cluster: trace files .\" trace files (MySQL Cluster) ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the MySQL Cluster development team\&. .sp It is possible to configure the number of these trace files that will be created before old files are overwritten\&. \fItrace_id\fR is a number which is incremented for each successive trace file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} ndb_\fInode_id\fR_trace\&.log\&.next is the file that keeps track of the next trace file number to be assigned\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} ndb_\fInode_id\fR_out\&.log is a file containing any data output by the \fBndbd\fR process\&. This file is created only if \fBndbd\fR is started as a daemon, which is the default behavior\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} ndb_\fInode_id\fR\&.pid is a file containing the process ID of the \fBndbd\fR process when started as a daemon\&. It also functions as a lock file to avoid the starting of nodes with the same identifier\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} ndb_\fInode_id\fR_signal\&.log is a file used only in debug versions of \fBndbd\fR, where it is possible to trace all incoming, outgoing, and internal messages with their data in the \fBndbd\fR process\&. .RE .PP It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the \&.pid file remains in effect even after the process has terminated\&. .PP To start \fBndbd\fR, it may also be necessary to specify the host name of the management server and the port on which it is listening\&. Optionally, one may also specify the node ID that the process is to use\&. .sp .if n \{\ .RS 4 .\} .nf shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR .fi .if n \{\ .RE .\} .PP See Section\ \&17.3.2.3, \(lqThe MySQL Cluster Connectstring\(rq, for additional information about this issue\&. \fBndbd\fR(8), describes other options for \fBndbd\fR\&. .PP When \fBndbd\fR starts, it actually initiates two processes\&. The first of these is called the \(lqangel process\(rq; its only job is to discover when the execution process has been completed, and then to restart the \fBndbd\fR process if it is configured to do so\&. Thus, if you attempt to kill \fBndbd\fR via the Unix \fBkill\fR command, it is necessary to kill both processes, beginning with the angel process\&. The preferred method of terminating an \fBndbd\fR process is to use the management client and stop the process from there\&. .PP The execution process uses one thread for reading, writing, and scanning data, as well as all other activities\&. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions\&. In addition, a watch\-dog thread supervises the execution thread to make sure that it does not hang in an endless loop\&. A pool of threads handles file I/O, with each thread able to handle one open file\&. Threads can also be used for transporter connections by the transporters in the \fBndbd\fR process\&. In a multi\-processor system performing a large number of operations (including updates), the \fBndbd\fR process can consume up to 2 CPUs if permitted to do so\&. .PP For a machine with many CPUs it is possible to use several \fBndbd\fR processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5\&.1 in a production setting\&. See Section\ \&17.1.5, \(lqKnown Limitations of MySQL Cluster\(rq\&. .SH "COPYRIGHT" .br .PP Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. .sp .SH "NOTES" .IP " 1." 4 Bug#24631 .RS 4 \%http://bugs.mysql.com/24631 .RE .IP " 2." 4 Bug#45588 .RS 4 \%http://bugs.mysql.com/45588 .RE .IP " 3." 4 ndbd Error Messages .RS 4 \%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. .SH AUTHOR Sun Microsystems, Inc. (http://www.mysql.com/).