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.
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
start | Start the metadata server |
init creds | Initialize the credentials file |
init systemd | Create and enable a systemd service unit |
deinit creds | Remove the credentials file |
deinit systemd | Remove the systemd service unit |
version | Print the build version |
license | Print license information |
verify | Verify database integrity |
migrate | Run database migrations |
meta.flexfs start [flags]Persistent Flags
Section titled “Persistent Flags”These flags apply to all subcommands:
| Flag | Type | Default | Description |
|---|---|---|---|
--credsFile | string | ~/.flexfs/meta/creds | Credentials file path |
--dbFolder | string | ~/.flexfs/meta/data | Database folder path |
Start Flags
Section titled “Start Flags”| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--bindAddr | string | 0.0.0.0:443 | Address and port to bind | Public |
--noSSL | bool | false | Disable SSL for the REST API | Public |
--sslCert | string | ~/.flexfs/ssl/cert | SSL certificate file path | Public |
--sslKey | string | ~/.flexfs/ssl/key | SSL private key file path | Public |
--sync | bool | false | Fsync every write for full crash durability | Public |
--verbose, -v | bool | false | Enable verbose logging | Public |
--adminAddr | string | Admin server address (overrides creds file) | Internal | |
--blockPass | string | Block storage password (overrides creds file) | Internal | |
--blockUser | string | Block storage username (overrides creds file) | Internal | |
--dbMemCapacity | string | 40% | Database memory cache capacity (e.g. 5%, 64M) | Internal |
--fallback | string | Fallback RPC version for old clients (e.g. v1.4) | Internal | |
--noAdminSSL | bool | false | Disable SSL for admin server connections | Internal |
--pprof | bool | false | Enable pprof profiler | Internal |
--sizeBins | bool | false | Group volume size stats into atime bins | Internal |
--token | string | Metadata server auth token (overrides creds file) | Internal |
Init Creds
Section titled “Init Creds”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.
| Flag | Type | Default | Description |
|---|---|---|---|
--adminAddr | string | "" | Admin server address |
--blockPass | string | "" | Block storage password |
--blockUser | string | "" | Block storage username |
--token | string | "" | Metadata server auth token (will prompt if omitted) |
--force | bool | false | Overwrite existing creds file |
Init Systemd
Section titled “Init Systemd”sudo meta.flexfs init systemd [flags]Creates and enables a systemd service unit (flexfs-meta.service) for the metadata server. Requires root.
| Flag | Type | Default | Description |
|---|---|---|---|
--now | bool | false | Start the service immediately after enabling |
--startFlags | string | "" | Additional flags to pass to the start command |
--force | bool | false | Overwrite existing systemd unit file |
Deinit Creds
Section titled “Deinit Creds”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.
| Flag | Type | Default | Description |
|---|---|---|---|
--force | bool | false | Remove creds even if referenced by systemd (removes references too) |
Deinit Systemd
Section titled “Deinit Systemd”sudo meta.flexfs deinit systemdRemoves the systemd service unit (flexfs-meta.service) for the metadata server. Requires root.
Verify (Internal)
Section titled “Verify (Internal)”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.
| Flag | Type | Default | Description |
|---|---|---|---|
--fix | bool | false | Fix mismatched counts by recomputing from actual data |
Migrate (Internal)
Section titled “Migrate (Internal)”meta.flexfs migrate [flags]Migrates volume data from the legacy snapshot format to the current database format.
| Flag | Type | Default | Description |
|---|---|---|---|
--srcFolder | string | ~/.flexfs/meta/data | Source data folder |
Credentials File
Section titled “Credentials File”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"REST Endpoints
Section titled “REST Endpoints”The metadata server exposes the following REST endpoints for utilities and monitoring:
| Endpoint | Method | Description |
|---|---|---|
/analyze/files | GET | Top files by size or cost |
/analyze/folders | GET | Per-directory recursive size and cost |
/analyze/users | GET | Per-user size and cost |
/duplicates | GET | Duplicate file candidates |
/find | GET | Filesystem search |
/metrics | GET | Prometheus metrics |
/status | GET | Server health status |