Skip to content

proxy.flexfs

proxy.flexfs is a CDN-like block caching server that sits between mount clients and object storage. Multiple proxy servers form a proxy group. Mount clients select a group by measured round-trip time and send each block to one member of the group, chosen from the block’s key, so every client uses the same server for a given block.

These flags apply to every subcommand.

FlagTypeDefaultDescriptionVisibility
--reportErrorsboolfalseReport errors and panics to Paradigm4Public
SubcommandDescriptionVisibility
deinit credsRemove the credentials filePublic
deinit systemdRemove the systemd service unitPublic
init credsInitialize the credentials filePublic
init systemdCreate and enable a systemd service unitPublic
licensePrint license informationPublic
startStart the proxy serverPublic
versionPrint the build versionPublic
Terminal window
proxy.flexfs deinit creds [flags]

Removes the credentials file for the proxy server. If the credentials file is referenced by a systemd unit, the command refuses unless --force is passed, in which case it removes the references too.

FlagTypeDefaultDescriptionVisibility
--credsFilestring~/.flexfs/proxy/credsCredentials file pathPublic
--forceboolfalseRemove creds even if referenced by systemd (removes references too)Public
Terminal window
sudo proxy.flexfs deinit systemd

Removes the systemd service unit (flexfs-proxy.service) for the proxy server. Requires root.

Terminal window
proxy.flexfs init creds [flags]

Initializes a credentials file for the proxy server with block storage credentials. With neither --blockUser nor --blockPass, no file is written. init on its own does the same thing as init creds.

FlagTypeDefaultDescriptionVisibility
--blockPassstring""Block storage passwordPublic
--blockUserstring""Block storage usernamePublic
--credsFilestring~/.flexfs/proxy/credsCredentials file pathPublic
--forceboolfalseOverwrite existing credentials filePublic
Terminal window
sudo proxy.flexfs init systemd [flags]

Creates and enables a systemd service unit (flexfs-proxy.service) for the proxy server. Requires root. Optional: the server can also be run directly with start by any user. The service runs as root, so it uses root’s /root/.flexfs defaults, credentials included, unless --startFlags names other paths.

FlagTypeDefaultDescriptionVisibility
--forceboolfalseOverwrite an existing systemd unit filePublic
--nowboolfalseStart the service immediately after enablingPublic
--startFlagsstring""Additional flags to pass to the start commandPublic
Terminal window
proxy.flexfs start [flags]

Starts the proxy server, binding the block-cache endpoint. Any user can run it, and ~ in the defaults is that user’s home folder. A non-root user needs a --bindAddr port above 1023 and a --diskFolder it can write.

FlagTypeDefaultDescriptionVisibility
--bindAddrstring0.0.0.0:443Address and port to bindPublic
--blockPassstring""Block storage password (overrides credentials file)Internal
--blockUserstring""Block storage username (overrides credentials file)Internal
--bufferSizestring1MI/O buffer size, given as a size (1M) or bytes (1048576). Minimum 4K.Internal
--credsFilestring~/.flexfs/proxy/credsCredentials file pathPublic
--dbFolderstring~/.flexfs/proxy/dataDatabase folder pathPublic
--dbMemCapacitystring10%Database memory cache capacity (e.g. 5%, 64M)Internal
--diskFolderstring/cacheOn-disk block cache folder pathPublic
--diskQuotastring90%On-disk block cache capacity (e.g. 5%, 64M). Must be greater than zero; the server will not start otherwise.Public
--maxBopsuint320 = autoMaximum number of parallel block operationsInternal
--minDiskAvailstring1GMinimum free space on the database folder filesystem (e.g. 2%, 512M; 0 = disabled)Public
--noSSLboolfalseServe the block-cache endpoint over plain HTTP. Mount clients must then use their Internal --noProxySSL flag; otherwise their probes fail and they bypass the proxy.Public
--noWritebackboolfalseNever upload written blocks to object storage; they exist only in this proxy’s cacheInternal
--pprofboolfalseEnable pprof profilerInternal
--pprofPortint6066Pprof server portInternal
--sseboolfalseRequest S3 server-side encryption (AES256)Public
--sslCertstring~/.flexfs/ssl/certSSL certificate file path. A self-signed certificate and key are created if neither exists.Public
--sslKeystring~/.flexfs/ssl/keySSL private key file pathPublic
--syncboolfalseFsync dirty block writes for full crash durabilityPublic
--verbose, -vboolfalseEnable verbose loggingPublic
--writebackActiveuint320 = autoMaximum number of parallel writeback operationsInternal
--writebackDelaystring0How long each writeback should sleep, given as a duration (250ms, 1s) or whole milliseconds (0). 0 = disabled.Internal

When --maxBops or --writebackActive is left at 0, the proxy sizes it automatically.

The proxy tracks its cached blocks in a database under --dbFolder, which cannot be written safely on a filesystem that has run out of space. The server therefore guards that filesystem:

  • On startup, it refuses to start if the available space is already below --minDiskAvail.
  • While running, it re-checks every minute and shuts down gracefully as soon as available space drops below --minDiskAvail. Both events are logged, naming the folder and the space available.

The block cache under --diskFolder is bounded separately by --diskQuota, so this guard is about the database folder; when both live on the same filesystem, it covers them together. Watch flexfs_proxy_db_folder_disk_available_bytes to catch this well before it happens; see Alerting. Setting --minDiskAvail to 0 disables both checks.