Skip to content

meta.flexfs

meta.flexfs is the metadata server that stores inodes, directory entries, attributes, extended attributes, and ACLs for one or more flexFS volumes. Mount clients communicate with it over an RPC protocol, and utilities like analyze.flexfs and find.flexfs use its REST API.

These flags apply to every subcommand.

FlagTypeDefaultDescriptionVisibility
--dbFolderstring~/.flexfs/meta/dataDatabase folder pathPublic
--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
migrateMigrate volume data from the legacy snapshot format to the current formatInternal
missing-objectsReport meta-tracked block keys absent from the block storeInternal
startStart the metadata serverPublic
verifyVerify database integrityInternal
versionPrint the build versionPublic
Terminal window
meta.flexfs deinit creds [flags]

Removes the credentials file for the metadata 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/meta/credsCredentials file pathPublic
--forceboolfalseRemove creds even if referenced by systemd (removes references too)Public
Terminal window
sudo meta.flexfs deinit systemd

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

Terminal window
meta.flexfs init creds --adminAddr <admin-addr> [flags]

Initializes a credentials file for the metadata server. If --token is omitted, the command prompts for a metadata server token interactively.

FlagTypeDefaultDescriptionVisibility
--adminAddrstring""Admin server address (required)Public
--blockPassstring""Block storage passwordPublic
--blockUserstring""Block storage usernamePublic
--credsFilestring~/.flexfs/meta/credsCredentials file pathPublic
--forceboolfalseOverwrite existing credentials filePublic
--tokenstring""Metadata server auth token (will prompt if omitted)Public

The credentials file is a TOML file with connection details populated during init creds:

adminAddr = "admin.example.com:443"
token = "<meta-token>"
blockUser = "<username>"
blockPass = "<password>"
Terminal window
sudo meta.flexfs init systemd [flags]

Creates and enables a systemd service unit (flexfs-meta.service) for the metadata server. Requires root.

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

Migrates volume data from the legacy snapshot format to the current database format.

FlagTypeDefaultDescriptionVisibility
--srcFolderstring~/.flexfs/meta/dataSource data folderPublic
Terminal window
meta.flexfs missing-objects [volume-id] [flags]

For each block key tracked by meta (live and/or retired), HEADs the corresponding object in the block store and reports any that are missing. Runs offline against the metadata database, so the meta service must be stopped (the database lock); contacts the admin server to fetch per-volume block settings, so the admin server must be reachable. If a volume ID is provided, only that volume is scanned; otherwise all volumes are scanned.

FlagTypeDefaultDescriptionVisibility
--concurrencyint16Number of parallel HEAD requests. Matches the metadata server’s block-store concurrency ceiling; higher values queue on that limit.Public
--credsFilestring~/.flexfs/meta/credsCredentials file pathPublic
--live-onlyboolfalseOnly check live block keysPublic
--noAdminSSLboolfalseDisable SSL for admin server connectionsInternal
--retired-onlyboolfalseOnly check retired block keysPublic
Terminal window
meta.flexfs start [flags]

Starts the metadata server, binding the RPC and REST endpoints.

FlagTypeDefaultDescriptionVisibility
--accessFilestring~/.flexfs/meta/accessAPI access file path — whitelists the source addresses allowed to reach each endpoint. Absent = all endpoints unrestrictedPublic
--adminAddrstring""Admin server address (overrides credentials file)Internal
--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
--credsFilestring~/.flexfs/meta/credsCredentials file pathPublic
--dbMemCapacitystring50%Database memory cache capacity (e.g. 5%, 64M)Internal
--fallbackstring""Fallback RPC version for old clients (e.g. v1.4)Internal
--minDiskAvailstring1GMinimum free space on the database folder filesystem (e.g. 2%, 512M; 0 = disabled)Public
--minRESTVersionint2Lowest REST API version to serve. 1 also serves the deprecated version 1 endpoints, which require no credential, and the unversioned paths that belong to them. A version below this one is not registered, so its URLs answer 404.Internal
--noAdminSSLboolfalseDisable SSL for admin server connectionsInternal
--noSSLboolfalseDisable SSL for the REST APIPublic
--pprofboolfalseEnable pprof profilerInternal
--pprofPortint6063Pprof server portInternal
--sslCertstring~/.flexfs/ssl/certSSL certificate file pathPublic
--sslKeystring~/.flexfs/ssl/keySSL private key file pathPublic
--syncboolfalseFsync every metadata writePublic
--tokenstring""Metadata server auth token (overrides credentials file)Internal
--verbose, -vboolfalseEnable verbose loggingPublic

--accessFile names a TOML file listing the IP addresses and CIDR blocks allowed to reach each endpoint. There is no file by default and nothing creates one, so every endpoint is unrestricted until you write it.

  • The file is re-read every two seconds, so a change takes effect within seconds without a restart. Deleting it lifts all restrictions.
  • A file that cannot be parsed, or that names an endpoint this server does not serve, is refused: the server will not start on one, and a running server keeps the rules already in force. Access control does not fail open on a bad edit.
  • The WebSocket root (/) is reached only by a rule naming it explicitly, never by the file’s global list — a rule aimed at the maintenance endpoints must not disconnect every mounted client. Nothing else is exempt, /metrics included, so remember to whitelist the Prometheus host.
  • Blocked requests are answered 403, logged with their source address whether or not --verbose is set, and counted in flexfs_meta_rest_ops_total{status="403"}.

See API Access Control for the file format and the rule precedence.

The metadata database cannot be written safely on a filesystem that has run out of space, and shutting it down is itself a write: closing each volume persists its lock state and flushes buffered writes into the database folder. The server therefore guards the --dbFolder 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 — draining in-flight requests and closing the database cleanly — as soon as available space drops below --minDiskAvail. Both events are logged, naming the folder and the space available.

Watch flexfs_meta_db_folder_disk_available_bytes to catch this well before it happens; see Alerting. The default floor leaves room for compaction and for the flush on close; raise it if a deployment needs more headroom than that. Setting it to 0 disables both checks.

The metadata server exposes REST endpoints for utilities, monitoring, and maintenance. See the Metadata REST API reference for the full list of endpoints and their parameters.

Terminal window
meta.flexfs verify [volume-id] [flags]

Verifies the integrity of the metadata database by comparing stored counters, dentries, and size bins against actual data. If a volume ID is provided, only that volume is verified; otherwise all volumes are checked.

FlagTypeDefaultDescriptionVisibility
--fixboolfalseRepair the database in place: tombstone orphan dentries, fix per-inode block counts, and recompute stored counters and size bins from the actual dataPublic