Contact
Skip to the page text

Documentation / Guides / Machine administration

Data directories

What a data directory holds

The control plane has no data directory of this kind: no control-plane backend instance keeps a record on its own disk. Its records are in its database and in object storage, so any control-plane backend instance is interchangeable with any other. The files the install writes on the control plane's machine (the settings in effect, the secrets, the certificate files, the installed release) are in one folder, listed in Files and folders on the machine. Each inference node does have a data directory, because a node holds the model weights and the GPUs and cannot be replaced by another machine.

An inference node keeps everything it must survive a restart in one directory, its data directory, and its model weights in a second one, its cached file set directory. Both are shown per inference node under Servers → (the node) → Config:

  • The data directory is read-only there. It is chosen when the software is installed.
  • The cached file set directory can be changed there (below).

An inference node's data directory holds:

  • The node's database, inference-node.sqlite: which model weights it has, what it has been asked to run, and its own event history.
  • Error report packages, under error-reports/.
  • The generated metrics collector configuration and its retry queue.
  • Cached file sets, under cached-file-sets/, unless the cached file set directory was changed to somewhere else: model weights, and the files a benchmark reads.

Model weights are almost always the largest thing on the node — a single model can be tens of gigabytes, and a node holding several can fill a disk. That is why their directory can be changed on its own.

Where the control plane keeps error report packages

The debugging material collected for a failure — the error report package — is kept in object storage, an S3-compatible store you run beside the control plane. How many bytes of packages to keep is a setting in the Configuration page's "Error reports" section; where they go is an installation setting in /etc/onprem-ai/control-plane/config.env: change it there, then run sudo onprem-ai-ctl apply. Which failed requests write an error report at all is the error trace policy (see "Error reports for failed requests").

WhatVariable
The object storage endpointOBJECT_STORAGE_ENDPOINT_URL
The bucket every stored file is kept in: error report packages, deployment plans, catalog filesOBJECT_STORAGE_BUCKET
The region string the store expectsOBJECT_STORAGE_REGION
The file holding the access keyOBJECT_STORAGE_ACCESS_KEY_FILE
The file holding the secret keyOBJECT_STORAGE_SECRET_KEY_FILE

The two credentials are files, never values in an environment file, and the control plane refuses to start if it cannot read them or cannot reach the store — with the endpoint and the store's own answer in the reason.

No control-plane backend instance writes an error report package to its own disk, so there is no folder to move, no volume to keep and nothing to copy when an instance is replaced. The only local disk it uses is scratch in the operating system's temporary directory, which costs a retry if it is lost, and the alert notification configuration it writes for the alerting services on the same machine, which it writes again from the database at every start.

The defaults

An inference node's default depends on how it was installed:

InstallationDefault data directory
Linux, installed with the install command/var/lib/onprem-ai/inference-node
macOS, installed with the install command/Library/Application Support/onprem.ai/state/inference-node
Linux, run by hand as an ordinary user~/.local/share/onprem-ai/platform/inference-node
macOS, run by hand as an ordinary user~/Library/Application Support/onprem-ai/platform/inference-node

Downloaded software updates are kept apart from the data, in the cache directory: /var/cache/onprem-ai/inference-node on Linux and /Library/Caches/onprem.ai/inference-node on macOS when installed with the install command. It may be emptied at any time; an update downloads what it needs again.

On Linux, the service manager creates the data and cache directories at every start of the inference node and gives them back to the inference node's account (onprem-ai) if their owner was changed. A data or cache directory you set elsewhere must belong to that account too: sudo chown -R onprem-ai:onprem-ai <directory>. The inference node checks at start that it can write them, and a directory it cannot write is named, with its fix, in its error reports and as the reason its software update cannot run.

The install command writes the data and cache directories into the inference node's configuration file (/etc/onprem-ai/inference-node/config.env on Linux, /Library/Application Support/onprem.ai/inference-node.env on macOS). Commands you run on the node with sudo onprem-ai-node ... read that file too, so they always work on the installed node's directory.

Which variable sets which directory

WhatVariable
An inference node's data directoryINFERENCE_NODE_DATA_DIRECTORY
That node's database file, if it must sit elsewhereINFERENCE_NODE_DATABASE_PATH
An inference node's cache directory (downloaded software updates)INFERENCE_NODE_CACHE_DIRECTORY

The database override is optional. Left unset, the database is <data directory>/inference-node.sqlite.

Every configured path must be absolute.

Changing the cached file set directory

Model weights default to <data directory>/cached-file-sets. To keep them somewhere else — typically a larger or faster disk — change the cached file set directory under Servers → (the node) → Config. On the machine itself, onprem-ai-node cached-file-set-dir get prints the current directory and onprem-ai-node cached-file-set-dir set PATH changes it, for a node that cannot reach the control plane. The command works only while the inference node is stopped; while it runs, it refuses and points you to the Config tab. The setting belongs to the inference node and survives restarts.

The change moves and deletes no model weights, so it has conditions:

  1. No model weights on the node, and no downloads running. Remove the node's models first under Servers → (the node) → Work, and cancel or wait for any download there. Download them again after the change; they land in the new directory.
  2. The new directory is created if it is missing, also under a parent directory only root may write, such as /data. The machine creates it for the inference node's account and, where SELinux is enabled, records the label model containers need. If the directory already exists, it must be empty, or already belong to the inference node's account.
  3. Some paths are refused. The machine's own system directories (/etc, /usr, /var/lib/docker and the others), the top directories /home, /mnt, /opt, /srv and /var themselves, a path with a symbolic link, a path through another account's directory, and an existing directory another account owns. An existing empty directory owned by root is accepted only when it is the top directory of a mounted disk. Choose a path that does not exist yet, for example /data/onprem.ai/model-weights or /mnt/fast/model-weights.
  4. The old directory is deleted afterwards. If it cannot be deleted — it is a mount point, or the service account may not remove it — the change still stands, and the Config tab tells you why so you can delete it yourself.

The Config tab shows the new path as soon as the change is done.

When the change is refused

Nothing changes when a change is refused. What each answer means:

The control plane saysWhat to do
The node still holds model weights in its current directory (it lists what it found)Remove them under Servers → (the node) → Work, then change the directory again.
The node is still downloading model weightsCancel the downloads under Servers → (the node) → Work, or let them finish and remove those model weights, then change the directory again.
The new directory already exists and is not emptyChoose a new or empty directory, or empty that one on the node, then retry.
The path cannot be the cached file set directoryEnter an absolute path that is not the current directory and is neither inside it nor contains it, then retry.
The new directory cannot be used (with the reason: a system directory, a link, another account's directory, an existing directory that is not empty)Do what the message's Fix lines say, usually: choose a path that does not exist yet, then change the directory again.
The machine could not create the directory, on a node whose software is older than this feature (with the operating system's reason)Run the commands the message's Fix lines name on the node (create the directory, give it to the inference node's account, and where SELinux is enabled, label it), then change the directory again.
The node is not connected to the control planeCheck under Servers that the node shows as connected, then try again.
The node did not confirm the change in timeCheck the cached file set directory on the Config tab; if it has not changed, try again.
A defect, with an error report idNothing you do fixes it. Contact support with the error report id; the report holds the details.

Mounting a disk instead

Instead of changing the directory, you can also mount or bind the other disk at the current cached file set directory, <data directory>/cached-file-sets by default. Do it while the node is stopped, and keep the ownership of the directory with the inference node's service account.

Bringing model weights you already have

An inference node does not download model weights it already finds on its disk. You can put a model's folder in the cached file set directory yourself, for example from an earlier installation on the same machine, from another inference node, or from a disk you carried to a machine without internet access. When you then deploy the model, the node checks the folder and uses it.

  1. Put the folder where the download would put it: <cached file set directory>/<source>/<model folder>. The source is onprem-ai or huggingface; the model folder is the name the model's download shows under Servers → (the node) → Work, for example onprem-ai/unsloth--Qwen3.8-27B-NVFP4--model. Keep the folder name exactly.
  2. Give it to the inference node's service account, for example sudo chown -R <service account> <the folder>. On a machine with SELinux, also run sudo restorecon -R <the folder>.
  3. Deploy the model. Its download finds the folder and checks it instead of downloading. The check takes a few minutes for a large model; the download shows it as verifying.

Copy or move the folder from another inference node as it is, with its SHA256SUMS file: the node checks every file against it. A folder from anywhere else, without SHA256SUMS, is used only when it holds exactly the model's files, with no extra files and no symbolic links, and every file has the size and checksum the source publishes; the node then writes the SHA256SUMS itself.

When the folder does not match, nothing is downloaded over it: the download stops and names the first file that differs. Remove the folder or make it match the source, then select Retry. A model whose catalog requires signed model weights is never taken from a folder you placed without its SHA256SUMS, because such a folder carries no signature; that model downloads as usual.

Notes

  • Model weights are downloaded again if they are lost, but re-downloading tens of gigabytes over a slow link is expensive. Move them; do not delete them and expect a quick recovery. To use model weights you already have, see "Bringing model weights you already have" above.
  • The error report package folder is an inference node setting only. The control plane's packages are in object storage, and the size limit in the "Error reports" section applies to them there — a bigger disk on a node does not raise it, and a full node data directory is not the same problem as a reached limit.
  • The control plane never edits the data directory. If the Config tab shows a path you did not expect, check the environment in which the inference node was started.

Found a mistake, or is something missing? Suggest an improvement to this page on GitHub.

Platform release 5.10.4, . Source of this page at v5.10.4. This page as Markdown.