TinyS3 Storage Modes
TinyS3 supports three storage configurations. All of them plug into the same storage facade — the S3 semantics (versioning, multipart, tagging, locking, …) live above the storage layer, so every mode supports the full S3 feature set; the modes differ only in how bytes reach disk. See File-system module for the architecture.
Simple Mode
Objects stored as plain files on one directory tree — no erasure encoding (DiskFileSystem). Fastest option and the easiest to inspect or back up with ordinary tools; no fault tolerance beyond the disk it runs on.
yaml
server:
port: 8000
auth:
accessKey: "your-access-key"
secretKey: "your-secret-key"
region: "us-east-1"
storage:
mode: simple
path: ./storageErasure Mode - Single Disk
Erasure coding on one disk. Provides data integrity verification but no protection against disk failure.
yaml
server:
port: 8000
auth:
accessKey: "your-access-key"
secretKey: "your-secret-key"
region: "us-east-1"
storage:
mode: erasure
erasure:
dataShards: 4
parityShards: 2
disks:
- ./storageErasure Mode - Multiple Disks
Erasure coding across multiple disks. Provides fault tolerance - survives disk failures.
yaml
server:
port: 8000
auth:
accessKey: "your-access-key"
secretKey: "your-secret-key"
region: "us-east-1"
storage:
mode: erasure
erasure:
dataShards: 4
parityShards: 2
disks:
- /mnt/disk1
- /mnt/disk2
- /mnt/disk3
- /mnt/disk4
- /mnt/disk5
- /mnt/disk6Disk Requirements
Number of disks must be ≥ total shards (dataShards + parityShards).
| Config | Total Shards | Min Disks | Max Disk Failures | Storage Overhead |
|---|---|---|---|---|
| 4+2 | 6 | 6 | 2 | 50% |
| 4+3 | 7 | 7 | 3 | 75% |
| 8+4 | 12 | 12 | 4 | 50% |
If you have fewer disks than shards, multiple shards land on the same disk. Losing that disk loses multiple shards, reducing fault tolerance.