SingleStore Node Config Files

The following is an example of a default installation directory structure for two nodes on a host.

/var/lib/memsql/
├── <node-1>                   A node directory
|   |
|   ├── memsql.cnf             The node configuration file; also stores engine variables
|   |
│   ├── auditlogs              When audit logging is enabled, holds an audit
|   |                          log of all database activity from the cluster
|   | 
│   ├── data                   The node's data; the default backup
|   |   |                      directory for local backups made to “./”
|   |   |
│   │   ├── logs               Transaction logs used in node recovery and replication
|   |   |
│   │   └── snapshots          Database snapshots
|   |
│   ├── plancache              Files for plans in the plancache
│   └── tracelogs
│       └── memsql.log         The consolidated general/error log
|
├── <node-2>                   Same file and directory descriptions as node-1 above
|   ├── memsql.cnf
│   ├── auditlogs
│   ├── data
│   │   ├── logs
│   │   └── snapshots
│   ├── plancache
│   └── tracelogs
│       └── memsql.log
|
├── db_files                   The location from which data can be loaded locally if SECURE_FILE_PRIV
|                              has not been set to NULL; SECURE_FILE_PRIV can also be set to a
|                              different directory; refer to Setting SECURE_FILE_PRIV for more info.
|
└── nodes.hcl                  The memsqlctl state file; also referred to as the node metadata file;
                               contains information about the nodes that reside on a host

All nodes on a host and their data reside within a default installation, or "base," directory which is defined by:

  • The defaultInstallDir entry in the memsqlctl configuration file, memsqlctl.hcl.

  • The basedir entry in the node configuration file, memsql.cnf.

To locate the default node base directory on a host, run the memsqlctl env command.

memsqlctl env
+-------------------+---------------------------------+
| memsqlctlConfig   | /etc/memsql/memsqlctl.hcl       |
| defaultInstallDir | /var/lib/memsql                 |
| nodeMetadataFile  | /var/lib/memsql/nodes.hcl       |
| userInfo          | uid=985(memsql) gid=978(memsql) |
| user              | memsql                          |
+-------------------+---------------------------------+

The following table lists each configuration file and provides the location of each file, additional information about each file, and each file’s format.

File

Location & Description

Format

memsql.cnf

/var/lib/memsql/<node-ID>/memsql.cnf

HCL

The node configuration file.

Stores engine variables, the values of which are loaded when a node starts. Compatible extension of MySQL’s my.cnf file.

This file contains a basedir entry that defines the node base directory, which is /var/lib/memsql (or simply .) by default.

The location of this file can be overridden temporarily by either:

nodes.hcl

/var/lib/memsql/nodes.hcl

HCL

The memsqlctl state file.

Also referred to as the node metadata file.

The file where memsqlctl stores information about the nodes that reside on a host.

This file contains

  • A memsqlConfigPath entry that defines the location of the node configuration file, memsql.cnf, which is /var/lib/memsql/<node-ID>/memsql.cnf by default

  • Encrypted passwords for connecting to each node

The location of this file can be overridden:

If an error is displayed stating that the node metadata file (nodes.hcl) is missing, confirm that the permissions are set correctly on this file. By default, the memsql:memsql user and group have access to this file.

The following is an example of an empty nodes.hcl file.

version = 1

The following is an example of a nodes.hcl file for a single host, two-node cluster with one Master Aggregator and one leaf node. Note that the directory structure is equivalent for both the aggregator and leaf node, differing only by the node ID.

version = 1

node {
  memsqlConfigPath = "/var/lib/memsql/e3e100b7-f432-4129-b7f6-ebfc7d3993d3/memsql.cnf"

  password {
    cipherText = "sXDnREUKCJ3d2M1i6Nf2GGVVwfLqFiIvHy/Z6g=="
  }
}

node {
  memsqlConfigPath = "/var/lib/memsql/3825e8c8-5a5b-43f0-9162-8c8de242d661/memsql.cnf"

  password {
    cipherText = "J5t6bZiX+ktxWtifWbfOSBBrmTtd5PfrGOd3cA=="
  }
}

secure = "q9gqg4JLdUiCcbwUPEQVWCdjmWezRrYT2ruvXy42/I4="

Last modified: August 21, 2024

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK