Miscellaneous options

Working directory

Used for reports, shared memory dumps, sockets, core files, and so on. The default value is /var/run/storpool:

SP_WORKDIR=/var/run/storpool

Restart automatically in case of crash

The main StorPool services (see Background services) are governed by a special storpool_daemon service. There is an option for this service, which specifies a period of time in seconds (default is 1800). In case this service crashes, and the number of crashes within the specified period is less than 3, then the service would be restarted automatically.

SP_RESTART_ON_CRASH=1800

Logging of non-read-only open/close for StorPool devices

By default, when user-space processes open or close a StorPool device (/dev/sp-*), the storpool_bd kernel module logs the event. If the SP_BD_LOG_OPEN_CLOSE option is set to 0, the storpool_bd kernel module will not log anything about opening or closing StorPool devices.

SP_BD_LOG_OPEN_CLOSE=1

Configuring the StorPool log daemon service

For details about the storpool_logd service, see storpool_logd.

To configure an HTTP/S proxy for the service:

SP_HTTPS_PROXY=<proxy URL>

To override the URL for the service:

SP_LOGD_URL=<logd-URL>

Note

Custom instances require HTTPS with properly installed certificates, locally if necessary.

Cache size

Each storpool_server process allocates the amount of RAM (in MB) set using SP_CACHE_SIZE for caching. The size of the cache depends on the number of storage devices on each storpool_server instance, and is taken care by the storpool_cg tool during cgroups configuration. Here is an example configuration for all storpool_server instances:

SP_CACHE_SIZE=4096

Note

A node with three storpool_server processes running will use 4096*3 = 12GB cache total.

You can override the size of the cache for each of the storpool_server instances, as shown below. This is useful when different instances control different number of drives:

SP_CACHE_SIZE=1024
SP_CACHE_SIZE_1=1024
SP_CACHE_SIZE_2=4096
SP_CACHE_SIZE_3=8192

These options are configured via the storpool_cg service and don’t require manual setting in most cases.

Internal write-back caching

Setting on the internal write-back caching:

SP_WRITE_BACK_CACHE_ENABLED=1

Attention

UPS is mandatory with write-back caching. A clean server shutdown is required before the UPS batteries are depleted.

Type of sleep

What kind of sleep to use when there are no requests. Default: (empty)

SP_SLEEP_TYPE=

Valid values are:

  • (empty), or ksleep: Use default kernel sleep.

  • hsleep: Use the msleep kernel function directly. Processes will appear to be using %100 CPU time, but the processor will be put to sleep lower IO latency than ksleep.

  • no: Don’t sleep at all - lowest latency, but at the price of of always keeping the CPU in running state.

Type of sleep for the bridge service

What kind of sleep to use when there are no requests for the bridge service. Default: (empty)

SP_BRIDGE_SLEEP_TYPE=

The valid values are the same as those for the SP_SLEEP_TYPE option (see above).

C state latency

Highest C state latency allowed for the CPU, in microseconds. Default: 5

SP_CPU_DMA_LATENCY=5

Issue reports location

Location for collecting automated bug reports and shared memory dumps. Default: /var/spool/storpool

SP_REPORTDIR=/var/spool/storpool

See also the SP_REPORTS_FREE_SPACE_LIMIT option below.

Free space for reports

Based on the value of the SP_REPORTS_FREE_SPACE_LIMIT option, the system would check if there is enough free space in the directory specified with SP_REPORTDIR for creating a crash report:

  • If there is not enough space no report would be created.

  • The value should be provided in the <number>[KMGTP] format, in bytes.

  • If the value is 0 (default), the check would not be performed.

SP_REPORTS_FREE_SPACE_LIMIT = 0

CLI prompt string

As described in Using the interactive shell, you can use StorPool’s Command Line Interface (CLI) in interactive mode. You can use the SP_CLI_PROMPT option to set the string that would appear as a prompt for this mode. Consider the following about the value you set:

  • You can use the ${SP_VAR} format, where SP_VAR is some of the options in the /etc/storpool.conf configuration file. As shown in the example below, this could be SP_CLUSTER_NAME.

  • Trailing spaces are stripped and “> ” is appended.

  • Default: StorPool

SP_CLI_PROMPT=${SP_CLUSTER_NAME}