Learn Labs
Internals

The Filer

Names, directories, and chunks, and choosing a metadata store

The filer is the part of SeaweedFS that knows names. Every S3 bucket is a directory under /buckets, every key a path in it, and every entry a list of chunks pointing into volumes.

An entry, as the filer stores it

Ask the filer for an object's metadata with ?metadata=true:

curl -s -H 'Accept: application/json' \
'localhost:8888/buckets/app-data/invoices/2026/10/inv-1.json?metadata=true'

{"FullPath": "/buckets/app-data/invoices/2026/10/inv-1.json",
"Mtime": "2026-10-12T13:00:25Z", "Mime": "application/json", "FileSize": 38,
"Md5": "6YksR6VCQqEcHbXvFl96kA==",
"Extended": {"Seaweed-X-Amz-Owner": "YWRtaW4=",      # "admin", base64
            "X-Amz-Meta-Source": "bGFi", ...},       # x-amz-meta-source: "lab"
"chunks": [{"file_id": "9,01b651906d06", "size": 38, ...}]}

The S3 metadata you set on upload lives here, in the filer, not in the volume. That's why the durability lab could read each object's checksum even when the object's bytes were on stopped servers.

Large objects are chunked

The 24 MiB multipart object from s3_basics.py is six chunks of 4 MiB (the filer's -maxMB, default 4), spread over three volumes:

db/dump-1.bin0M164M138M1412M1316M1620M166 chunks × 4 MiBoffset 024 MiB
16,01ba225168d1  offset 0         size 4194304
13,01bb9022011e  offset 4194304   size 4194304
14,01bccf889707  offset 8388608   size 4194304
13,01bd16a8a9d4  offset 12582912  size 4194304
16,01bed6bec06b  offset 16777216  size 4194304
16,01bfcec2807d  offset 20971520  size 4194304

Chunks let one object be bigger than a volume, let a range read fetch only the chunks it needs, and let parts upload in parallel to different servers. They also mean one object depends on several volumes: lose every copy of any one of them and the whole object is unreadable.

The metadata store

The filer keeps entries in a pluggable store. weed scaffold -config=filer prints a filer.toml with every option:

[leveldb2]default: embedded, on the filer's disk (this lab)[rocksdb] [sqlite]also embedded[postgres2]one table per bucket; shared by many filers[mysql2][redis2] [redis_cluster2] [redis2_sentinel][cassandra2] [tikv] [foundationdb] [etcd] [mongodb] [elastic8] ...
StoreFilersGood for
LevelDB / RocksDB (embedded)One, or several syncing to each otherSimple setups; fastest; its disk is your metadata
Postgres / MySQLMany, statelessMost production setups; backups and HA you already know
RedisMany, statelessVery high metadata rates; needs persistence configured with care
Cassandra / TiKV / FoundationDBMany, statelessBillions of entries across many nodes

Small files in the filer store

-saveToFilerLimit makes the filer store objects smaller than the limit inside the metadata entry itself, with no volume write at all. It saves a round trip for tiny objects, and it moves them out of volume replication and into whatever protection the metadata store has. Off by default, as in this lab.

Watching changes

The filer keeps a log of every metadata change, which several tools build on:

weed filer.meta.tail -filer=filer:8888 -pathPrefix=/buckets/app-datalive change feedweed filer.sync -a filer-a:8888 -b filer-b:8888replicate between clustersweed filer.backup ...continuous copy to S3, GCS, a local dirweed filer.remote.sync ...write back to a cloud bucket

Lab

  1. Fetch the metadata of backups/db/dump-1.bin and look up each chunk's volume with /dir/lookup?volumeId=. How many volume servers does this one object depend on?
  2. Run weed filer.meta.tail -filer=filer:8888 in the filer container while running s3_basics.py. What does each S3 call produce?
  3. Stop the filer, then read a chunk directly from a volume server by its file id. The bytes are there; the name isn't.

On this page