Skip to main content
TiDBFilesystemVFS mounts a TiDB Cloud Filesystem through its REST API. Agents list, read, write, move and remove files under the mount with ordinary shell commands, and no FUSE mount is needed. For tokens and regions, see TiDB Cloud Filesystem Setup.

Config

Fields marked secret are redacted in snapshots.

Mount mode

read, write or exec. Use exec if python3 or js should run scripts from the mount.

VFS.md

The VFS.md an agent reads with TiDB Cloud Filesystem mounted at /<path>.

Virtual Filesystem

Supported Unix Commands for VFS

Unix commands work on each path as on a local filesystem, as far as the path supports them:

Limitations of Unix Commands for VFS

Where a path differs from a local filesystem:Run man to list every command, and man <cmd> or <cmd> --help for one command’s usage.

Behavior

  • A file under 50,000 bytes is written with one request; a larger one goes up in parts, a few at a time, and reads of it stream from object storage, ranged when a command reads only part of it.
  • >> onto a file of 50,000 bytes or more sends only the new bytes and the file’s last part; a smaller file is read and written back.
  • mv is one server-side rename, for a file or a whole directory. rm -r is one recursive delete.
  • cp reads the file and writes the copy, so the two never share content.
  • Before a write, mkdir or mv, Mirage asks the file system what the destination and its parents are, so a missing parent, a file in the way or a directory target fails as it does on a local disk.
  • A file in the extent layout, which only the file system’s FUSE client writes and reads, reads as Operation not supported.

Example

See examples/python/vfs/tidb_filesystem/tidb_filesystem.py.