Node working directory

Table of Contents

During operation, the system uses the local disk to store service information.

All such resources are placed in the /var directory.

Each node has its own working directory: /var/lib/era/_workdir/<NODE>.

Each node has access to local directories subject to various types of synchronization: /var/lib/era_files. Each such directory is addressed uniformly in scripts (see Local paths) and is used in various processes by the system’s internal services.

Each node maintains logs: /var/log/era/<NODE>.

If the system runs in a Docker container, the specified paths are available only inside it. The working directory is located on an external volume and remains on disk after the Docker container is removed.

Directory contents

filetree
Table 1. Resource overview
Resource Purpose

/var/lib/era/_workdir/<NODE>

Node working directory.

Each node is named automatically based on the names of the logical roles running on it and the server IP address.

The node working directories contain the resources of the running roles.

For example, in the diagram, the mdc role stores the license file (lic/r.lic), configuration management roles store the update file (autoupdate) and the active configuration (cfg and cfgv3.json), and so on.

The working directory also contains a symlink to the directory with logs and traces.

/var/lib/era_files

Local directories for various types of synchronization. Each such directory is addressed uniformly in scripts (see Local paths) and is used in various processes by the system’s internal services.

  • siteshare – directory pointing to network storage available to all servers of the current site.

  • globalshare – directory pointing to network storage available to all servers of all sites.

  • local – local directory for temporary storage of resources that does not use synchronization.

  • syncroot – local directory for automatic delayed synchronization of media files.

  • logstore – local directory for temporary storage of logs that does not use synchronization.

  • rectemp – local directory for temporary storage of RTP stream recordings produced by media gateways. Does not use synchronization.

  • recpath – local directory, or a directory pointing to network storage available to all servers of the current site. Used for long-term storage of call recordings in domains that do not use S3 storage. Also used as intermediate storage of recordings after mixing until they are placed in domain storages.

When creating a configuration, the paths to these service directory categories can be changed individually on each server. The location given here is recommended and is used by default.

/var/log/era/<NODE>

Directory with the node’s logs.

It also contains virtual machine process traces when used for debugging: trc/<TRACE>.txt.

/var/run/era/<NODE>

Directory containing pipes and sockets of the active node.

For debugging purposes, pipes are used to connect to the node in the Erlang virtual machine interpreter.