Setup
- Create a file system in the TiDB Cloud console or
with
ti fs, and note its region. - Copy its owner token, shown once in the Your File System is Ready! dialog, or create a scoped token: File Systems, the file system, Access Tokens, Create Token. See Manage File System Tokens.
- Set the host to the endpoint of the file system’s region. A token works only against its own region.
A scoped token reaches only the path it was created for, and only with the
operations it allows (
read, list, search, write, delete). Mount it
with root_path set to that path, since it cannot list the file system’s
root.
TiDB Cloud Filesystem runs on the open-source
drive9 server, and the same VFS mounts a
self-hosted drive9 server: set host to its origin and token to an API key
it issued.
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- Files keep their own names and bytes; nothing is converted.
root_path: /workspacemounts only that directory;..is refused.- A file in the extent layout, which only the file system’s FUSE client
reads, answers
Operation not supported.
Sample runs
echo hello > /fs/notes/a.txt writes a file; mv is one server-side rename
and rm -r one recursive delete. A file of 50,000 bytes or more uploads in
parts, and >> onto it sends only the new bytes.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.