1.1.2 NDB Cluster Data Node File System Directory

The location of this directory can be set usingFileSystemPath; the directory itself is always namedndb_nodeid_fs, wherenodeidis the data node's node ID. The file system directory contains the following directories:

  • Directories namedD1andD2,每个of which contains 2 subdirectories:

    • DBDICT: Contains data dictionary information. This is stored in:

      • The fileP0.SchemaLog

      • A set of directoriesT0,T1,T2, ..., each of which contains anS0.TableListfile.

    • Directories namedD8,D9,D10, andD11,每一个都包含一个目录命名DBLQH。这些包含重做日志,这是分裂的into four parts that are stored in these directories. with redo log part 0 being stored inD8, part 1 inD9, and so on.

      Within each directory can be found aDBLQHsubdirectory containing theNredo log files; these are namedS0.Fraglog,S1.FragLog,S2.FragLog, ...,SN。FragLog, whereNis equal to the value of theNoOfFragmentLogFilesconfiguration parameter. The default value forNoOfFragmentLogFilesis 16. The default size of each of these files is 16 MB, controlled by theFragmentLogFileSizeconfiguration parameter.

      The size of each of the four redo log parts isNoOfFragmentLogFiles * FragmentLogFileSize。You can find out how much space the redo log is using withDUMP 2398orDUMP 2399

    • DBDIH: This directory contains the filePX。sysfile, which records information such as the last GCI, restart status, and node group membership of each node; its structure is defined instorage/ndb/src/kernel/blocks/dbdih/Sysfile.hppin the NDB Cluster source tree. In addition, theSX。FragListfiles keep records of the fragments belonging to each table.

      The format used for thesysfilewas updated from version 1 to version 2 in NDB 8.0.

    • LCP: When using full local checkpoints (LCPs), this directory holds 2 subdirectories, named0and1,每个of which which contain local checkpoint data files, one per local checkpoint. In NDB 7.6 (and later), when using partial LCPs (EnablePartialLcpset totrue), there can be as many as 2064 subdirectories underLCP, named0,1,2, ...,2063, with a data file stored in each one. These directories are created as needed, in sequential order; for example, if the last data file used in the previous partial LCP was numbered 61 (inLCP/61), the next partial LCP data file is created inLCP/62

      These subdirectories each contain a number of files whose names follow the patternTNFM。Data, whereNis a table ID and M is a fragment number. Each data node typically has one primary fragment and one backup fragment. This means that, for an NDB Cluster having 2 data nodes, and withNoOfReplicasequal to 2,Mis either 0 or 1. For a 4-node cluster withNoOfReplicasequal to 2,Mis either 0 or 2 on node group 1, and either 1 or 3 on node group 2.

      For a partial local checkpoint, a single data file is normally used, but when more than 12.5% of the table rows stored are to be checkpointed up to 8 data files can be used for each LCP. Altogether, there can be from 1 to 2048 data files at any given time.

      When usingndbmtdthere may be more than one primary fragment per node. In this case,Mis a number in the range of 0 to the number of LQH worker threads in the entire cluster, less 1. The number of fragments on each data node is equal to the number of LQH on that node timesNoOfReplicas

      Note

      IncreasingMaxNoOfExecutionThreadsdoes not change the number of fragments used by existing tables; only newly-created tables automatically use the new fragment count. To force the new fragment count to be used by an existing table after increasingMaxNoOfExecutionThreads, you must perform anALTER TABLE ... REORGANIZE PARTITIONstatement (just as when adding new node groups).

  • LG: Default location for Disk Data undo log files. SeeSection 1.1.4, “Files Used by NDB Cluster Disk Data Tables”,NDB Cluster Disk Data Tables, andCREATE LOGFILE GROUP Statement, for more information.

  • TS: Default location for Disk Data tablespace data files. SeeSection 1.1.4, “Files Used by NDB Cluster Disk Data Tables”,NDB Cluster Disk Data Tables, andCREATE TABLESPACE Statement, for more information.