- Filesystems From First Principles — a filesystem is a metadata index over a pile of data blocks.
- Network Filesystems: From NFS to GFS — why bolting a network onto a disk-owning server is brittle, and how GFS, HDFS, and MooseFS split an authoritative metadata service from a scalable pool of data storage.
How CloudFS Does It
CloudFS is built on JuiceFS, which — in its authors’ words — was “inspired by Google File System, HDFS and MooseFS.” JuiceFS takes the metadata/data split those systems proved at cluster scale and replaces each half with a managed cloud primitive, so you operate neither a metadata master nor a fleet of data servers:- The metadata index — the master’s job in GFS, the NameNode’s in HDFS — becomes a transactional database. The database provides strong consistency for the small, hot, correctness-critical half: an entry is committed or it is not, and every client reads the same tree. This is the direct answer to NFS’s stale-attribute cache and AFS’s callback bookkeeping — put the index in one consistent place that all clients share, rather than caching copies and trying to keep them in sync. It also inherits the database’s transactions: the crash-consistency machinery a local filesystem hand-builds as journaling — write-ahead log, commit, replay — is simply what the database already does, so a metadata change is one atomic transaction with no partial-update window and no
fsck-style recovery scan. - The data blocks — the chunkservers’ job — become object storage (Telnyx Cloud Storage). JuiceFS splits every file into a chunk → slice → block hierarchy and writes the blocks as ordinary objects; object storage supplies the durability and throughput for the large half. The blocks are opaque — you cannot reassemble a file from the bucket alone, because the index that orders them lives in the metadata database. Object storage also rewards writing new immutable objects over rewriting in place, so JuiceFS follows a log-structured discipline: each write becomes a new slice, never an overwrite, and a background compaction later merges overlapping slices and reclaims the garbage — exactly the cleaner a log-structured filesystem runs.
- There is no CloudFS server in the data path. JuiceFS is a “rich client”: like AFS’s client and MooseFS’s FUSE mount, all the filesystem logic — the directory tree, inode allocation, splitting files into blocks, caching — runs in the process that mounts the volume. But instead of caching whole files and chasing callbacks, it reads and writes the shared metadata database directly, so consistency comes from the database rather than from a promise a server has to remember. When you
juicefs mount, the client opens one connection to the metadata database and one to object storage, and serves POSIX calls from those two.
The Two Lanes
Concretely, a CloudFS mount talks to two backends over two independent lanes, each with its own credential. There is no CloudFS server in the request path — your client connects to both directly.The Metadata Lane
The client reaches metadata over the connection string CloudFS gives you asmeta_url:
- You connect to a managed metadata endpoint, not to the database directly. The public host
us-east-1.telnyxcloudfs.com:5432is a pooled front end to a per-filesystem metadata database (fs_<hex>). The database server itself is not directly reachable. - TLS is required. The connection uses
sslmode=require; there is no plaintext metadata path. - The
meta_tokenis the password. In themeta_urlabove, thecloudfs_tok_...embedded before the@is themeta_tokenused as the connection password. It is a managed, rotatable credential (see The Metadata Token Lifecycle) — not the underlying database’s own credential, which you never handle.
Metadata is centralized in us-east-1 for every filesystem, no matter which data region you pick. A
us-central-1 or us-west-1 filesystem still has its metadata host set to us-east-1.telnyxcloudfs.com. Always use the host embedded in meta_url.The Data Lane
File contents go to a per-filesystem bucket namedcloudfs-fs-<hex> on Telnyx Cloud Storage, reached through the S3 endpoint for the filesystem’s region (s3_endpoint, e.g. https://us-east-1.telnyxcloudstorage.com). JuiceFS splits every file into 4 MiB block objects and writes them under chunks/… in that bucket; a 10 MiB file plus a small git repo, for example, lands as dozens of block objects. The blocks are opaque to S3 — reconstructing a file requires the chunk/slice index from the metadata lane.
Authentication to the data lane reuses your account credentials, following the Telnyx Cloud Storage model:
- The S3 access-key is your
TELNYX_API_KEY. - The S3 secret-key is ignored — Telnyx Storage does not verify the SigV4 signature (see Cloud Storage authentication). You must still supply some non-empty secret, because JuiceFS’s AWS SDK rejects empty static credentials.
CloudFS pre-formats the bucket at create time: provisioning writes a
juicefs_uuid object and formats the volume (JuiceFS volume name cloudfs-fs-<hex>). Do not run juicefs format against a ready filesystem — it is already formatted, and re-formatting fails with cannot update volume name. Just mount. The one exception is a filesystem whose status is needs_format, which was provisioned without the final format step: format it once as described in Mounting, then mount.Two Credentials, One API Key
Putting the lanes together, a mounting client holds exactly what it needs and nothing more:
The point of splitting the credentials this way is that the client never holds a raw database credential. It talks to the metadata endpoint with a managed
meta_token that Telnyx can rotate independently of the underlying metadata database, and it never connects to the database server directly. Your API key, meanwhile, only ever reaches object storage. Compromising a mount host exposes a rotatable metadata token and your (already-scoped) API key — not standing database credentials.
Regions
You choose a data region at create time:us-central-1, us-east-1, or us-west-1. That region is required — there is no default — and it determines the S3 endpoint (s3_endpoint) and where the file blocks physically live. It is the only region choice you make.
Metadata is always in us-east-1. Picking us-west-1 for data does not move the metadata database; that filesystem’s metadata host is still us-east-1.telnyxcloudfs.com. Mount as close to us-east-1 as your data region allows if metadata latency matters to your workload.
The Metadata Token Lifecycle
Themeta_token is the one credential in the system designed to be rolled. Rotation is a control-plane action:
POST /v2/storage/cloudfs/{id}/actions/rotate-meta-token (Idempotency-Key required) issues a new meta_token and returns a new token-bearing meta_url. Rotation touches only the token — the metadata database and the S3 bucket are unchanged, so no data moves and no files are re-encrypted or re-keyed.
The cutover is connection-scoped, which makes rotation safe to run against a live filesystem:
- The old token stops authenticating on the next metadata connection — any new
juicefs mount(or reconnect) must use the newmeta_url. - An already-mounted client is unaffected on its existing connection. It keeps working with the connection it opened before rotation; you only need the new token the next time it reconnects.
meta_url is stored (secrets, deploy config) before your mounts next reconnect.
Filesystem Status
Each filesystem carries astatus:
The steady states are
ready, needs_format, and failed; provisioning and deleting are transitional. There is no soft-delete or trash lifecycle — deleted is terminal and permanent.
Further Reading
- JuiceFS — the open-source filesystem CloudFS is built on: architecture and how JuiceFS stores files.
- OSTEP on the ideas CloudFS reuses: Crash Consistency: FSCK and Journaling — why the metadata index belongs in a transactional database — and Log-structured File Systems — write-new-never-overwrite, and the cleaner behind JuiceFS compaction.
Next Steps
- Quick Start — Create a filesystem and mount it
- Mounting — The verified
juicefs mountrecipe - Concurrent Access — Many clients mounting one filesystem, and file locking
- API Reference — The six control-plane endpoints
- Overview — What CloudFS is and when to use it