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.

SubcommandDescription
deinit credsRemove the credentials file
deinit systemdRemove the systemd service unit
init credsInitialize the credentials file
init systemdCreate and enable a systemd service unit
licensePrint license information
migrateRun database migrations
startStart the metadata server
verifyVerify database integrity
versionPrint the build version
Terminal window
meta.flexfs start [flags]

These flags apply to all subcommands:

FlagTypeDefaultDescription
--credsFilestring~/.flexfs/meta/credsCredentials file path
--dbFolderstring~/.flexfs/meta/dataDatabase folder path
FlagTypeDefaultDescriptionVisibility
--adminAddrstringAdmin server address (overrides creds file)Internal
--bindAddrstring0.0.0.0:443Address and port to bindPublic
--blockPassstringBlock storage password (overrides creds file)Internal
--blockUserstringBlock storage username (overrides creds file)Internal
--dbMemCapacitystring40%Database memory cache capacity (e.g. 5%, 64M)Internal
--fallbackstringFallback RPC version for old clients (e.g. v1.4)Internal
--noAdminSSLboolfalseDisable SSL for admin server connectionsInternal
--noSSLboolfalseDisable SSL for the REST APIPublic
--pprofboolfalseEnable pprof profilerInternal
--pprofPortint6062Pprof server portInternal
--sizeBinsboolfalseDeprecated — size bins are now always enabledInternal
--sslCertstring~/.flexfs/ssl/certSSL certificate file pathPublic
--sslKeystring~/.flexfs/ssl/keySSL private key file pathPublic
--syncboolfalseFsync every write for full crash durabilityPublic
--tokenstringMetadata server auth token (overrides creds file)Internal
--verbose, -vboolfalseEnable verbose loggingPublic
Terminal window
meta.flexfs init creds [flags]

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

FlagTypeDefaultDescription
--adminAddrstring""Admin server address
--blockPassstring""Block storage password
--blockUserstring""Block storage username
--forceboolfalseOverwrite existing creds file
--tokenstring""Metadata server auth token (will prompt if omitted)
Terminal window
sudo meta.flexfs init systemd [flags]

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

FlagTypeDefaultDescription
--forceboolfalseOverwrite existing systemd unit file
--nowboolfalseStart the service immediately after enabling
--startFlagsstring""Additional flags to pass to the start command
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.

FlagTypeDefaultDescription
--forceboolfalseRemove creds even if referenced by systemd (removes references too)
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 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.

FlagTypeDefaultDescription
--fixboolfalseFix mismatched counts by recomputing from actual data
Terminal window
meta.flexfs migrate [flags]

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

FlagTypeDefaultDescription
--srcFolderstring~/.flexfs/meta/dataSource data folder

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

adminAddr = "admin.example.com:443"
token = "$TOKEN"
blockUser = "$USERNAME"
blockPass = "$PASSWORD"

The metadata server exposes the following REST endpoints for utilities and monitoring:

EndpointMethodDescription
/analyze/filesGETTop files by size or cost
/analyze/foldersGETPer-directory recursive size and cost
/analyze/usersGETPer-user size and cost
/duplicatesGETDuplicate file candidates
/findGETFilesystem search
/metricsGETPrometheus metrics
/statusGETServer health status