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
startStart the metadata server
init credsInitialize the credentials file
init systemdCreate and enable a systemd service unit
deinit credsRemove the credentials file
deinit systemdRemove the systemd service unit
versionPrint the build version
licensePrint license information
verifyVerify database integrity
migrateRun database migrations
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
--bindAddrstring0.0.0.0:443Address and port to bindPublic
--noSSLboolfalseDisable SSL for the REST APIPublic
--sslCertstring~/.flexfs/ssl/certSSL certificate file pathPublic
--sslKeystring~/.flexfs/ssl/keySSL private key file pathPublic
--syncboolfalseFsync every write for full crash durabilityPublic
--verbose, -vboolfalseEnable verbose loggingPublic
--adminAddrstringAdmin server address (overrides creds file)Internal
--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
--pprofboolfalseEnable pprof profilerInternal
--sizeBinsboolfalseGroup volume size stats into atime binsInternal
--tokenstringMetadata server auth token (overrides creds file)Internal
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
--tokenstring""Metadata server auth token (will prompt if omitted)
--forceboolfalseOverwrite existing creds file
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
--nowboolfalseStart the service immediately after enabling
--startFlagsstring""Additional flags to pass to the start command
--forceboolfalseOverwrite existing systemd unit file
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