Table of Contents
Directory Usage
The dir_usage plugin worker job keeps the size of each bucket and of the large directories in it, so that reading them walks nothing. It is off by default; turn it on for its job type in the admin UI. fs.du -report reads what it keeps.
What it keeps
For each bucket, and each top-level directory outside the buckets folder, the job keeps what fs.du adds up (bytes, chunks, files and directories) of the bucket and of each directory in it holding at least 1% of the bucket's bytes, down to 10 levels below the bucket. A smaller or deeper directory counts toward the directory above it. Directories at one depth do not overlap, so a bucket has at most 1,000 such directories, whatever the shape of its tree.
The totals of a bucket are one file, /etc/seaweedfs/dir_usage/<store signature>/buckets/<bucket>.json, or .../top/<name>.json for a top-level directory. The job's position in the metadata log is /etc/seaweedfs/dir_usage/cursor-<store signature>.json, and meta_log_purge keeps the log from there on.
How it stays current
- A bucket without totals is walked once while the job follows the metadata log, and the two are reconciled, so the totals are those of the bucket at one position in the log. All buckets without totals are walked in one walk of the buckets folder, and the top-level directories in one walk of
/. A walk takes about as long asfs.duof the same tree. - After that, each run (every hour by default) replays the metadata events since the last one and rewrites the files that changed.
- A bucket created since the last run is walked by the next one.
- A directory that moves keeps its totals at its new path.
- A directory that grows past 1% after its bucket was walked counts toward the directory above it until the bucket is walked again.
- A bucket whose events the log no longer holds is walked again, as after the job was off for longer than
meta_log_purgekeeps the log for it.
To have a bucket walked again, delete its file; the next run walks it:
> fs.rm /etc/seaweedfs/dir_usage/<store signature>/buckets/<bucket>.json
An entry that a TTL expires comes off in the first run after the end of the hour it expires in, or, for a TTL of 200 hours or more, after the end of a step of up to 1% of the TTL. The filer removes such an entry without logging an event, so the job keeps when each one expires. An S3 lifecycle expiration also logs a delete, and the entry comes off only once.
Reading it
> fs.du -report -depth=1 /buckets/media
block:1201 logical size: 14680064 /buckets/media/2025
block: 702 logical size: 6729608 /buckets/media/2026
block:1903 logical size: 21409672 /buckets/media
as of 2026-12-03T08:30:00Z, 12m0s ago
Introduction
- Quick Start with weed mini
- Simplest S3 Bucket and User Setup
- Components
- Blob Store Architecture
- Getting Started
- Production Setup
- A typical step‐by‐step example
- Benchmarks
- FAQ
- Applications
API
Configuration
- Replication
- Store file with a Time To Live
- Failover Master Server
- Erasure coding for warm storage
- EC Bitrot Detection
- Server Startup via Systemd
- Environment Variables
Filer
- Filer Setup
- Directories and Files
- File Operations Quick Reference
- Data Structure for Large Files
- Filer Data Encryption
- Filer Commands and Operations
- Filer JWT Use
- TUS Resumable Uploads
Filer Stores
- Filer Cassandra Setup
- Filer Redis Setup
- Super Large Directories
- Path-Specific Filer Store
- Choosing a Filer Store
- Customize Filer Store
Management
Advanced Filer Configurations
- Migrate to Filer Store
- Migrate Between Filer Stores
- Add New Filer Store
- Filer Store Replication
- Filer Active Active cross cluster continuous synchronization
- Filer as a Key-Large-Value Store
- Path Specific Configuration
- Filer Change Data Capture
- Filer Operation Serialization
FUSE Mount
- Mount on Windows
- FIO benchmark
- fstab and systemd mount
- POSIX Compliance
- Distributed POSIX Locks
- P2P reading in weed mount
- Mount over the Internet
WebDAV
SFTP Server
Cloud Drive
- Cloud Drive Benefits
- Cloud Drive Architecture
- Configure Remote Storage
- Azure Blob Storage Authentication
- Mount Remote Storage
- Cache Remote Storage
- Cloud Drive Quick Setup
- Gateway to Remote Object Storage
AWS S3 API
- Amazon S3 API
- Supported APIs vs Minio
- S3 Lifecycle
- S3 Lifecycle vs Volume TTL
- S3 Conditional Operations
- S3 CORS
- S3 Object Lock and Retention
- S3 Object Versioning
- S3 RenameObject
- S3 API Benchmark
- S3 API FAQ
- S3 Bucket Quota
- S3 Rate Limiting
- S3 API Audit log
- S3 Nginx Proxy
- Docker Compose for S3
- Image Gateway
S3 Table Bucket
- S3 Table Bucket
- S3 Table Bucket Commands
- S3 Tables Security
- SeaweedFS Iceberg Catalog
- Iceberg REST Catalog API
- Iceberg Table Maintenance
- SeaweedFS Lance Catalog
- Lance Maintenance Worker
S3 Vector Bucket
- S3 Vector Bucket
- S3 Vectors API
- S3 Vector Bucket Metadata Filtering
- S3 Vector Bucket Security
- S3 Vector Bucket Performance
Iceberg Integrations
- Spark Iceberg Integration
- Trino Iceberg Integration
- Dremio Iceberg Integration
- DuckDB Iceberg Integration
- Doris Iceberg Integration
- RisingWave Iceberg Integration
- Lakekeeper Iceberg Integration
- OLake Go Iceberg Integration
Lance Integrations
S3 Authentication & IAM
- S3 Configuration - Start Here
- S3 Credentials (
-s3.config) - OIDC Integration (
-s3.iam.config) - STS - Temporary Credentials
- Kubernetes ServiceAccount Authentication (IRSA-style)
- S3 Policy Variables
- S3 Policy Conditions
- S3 Bucket Policies
- Amazon IAM API
- AWS IAM CLI
- weed shell - Shell IAM Commands
Server-Side Encryption
S3 Client Tools
- AWS CLI with SeaweedFS
- s3cmd with SeaweedFS
- rclone with SeaweedFS
- restic with SeaweedFS
- nodejs with Seaweed S3
Machine Learning
HDFS
- Hadoop Compatible File System
- run Spark on SeaweedFS
- run HBase on SeaweedFS
- Run Trino on SeaweedFS
- Hadoop Benchmark
- HDFS via S3 connector
Replication and Backup
- Async Replication to another Filer [Deprecated]
- Async Backup
- Async Filer Metadata Backup
- Async Replication to Cloud [Deprecated]
- Kubernetes Backups and Recovery with K8up
Metadata Change Events
Messaging
- Structured Data Lake with SMQ and SQL
- Seaweed Message Queue
- SQL Queries on Message Queue
- SQL Quick Reference
- PostgreSQL-compatible Server weed db
- Pub-Sub to SMQ to SQL
- Kafka to Kafka Gateway to SMQ to SQL
Use Cases
Operations
- System Metrics
- weed shell
- Data Backup
- Deployment to Kubernetes and Minikube
- Helm Chart Recipes
- Deployment with seaweed-up
Rust Volume Server
Advanced
- Large File Handling
- Optimization
- Optimization for Many Small Buckets
- Volume Management
- Fixing Damaged Volumes
- Tiered Storage
- Cloud Tier
- Cloud Monitoring
- Load Command Line Options from a file
- SRV Service Discovery
- Volume Files Structure
Security
- Security Overview
- Security Configuration
- Cryptography and FIPS Compliance
- Run Blob Storage on Public Internet