Configuration
Concepts and Implementation
JuiceFS consists of a metadata engine and data storage.
In the current version, meta is passed through to juicefs as the metadata engine URL, and PostgreSQL is typically used in production.
Data storage is defined by data options passed to juicefs format.
JUICE module core commands:
Notes:
--no-updateensures existing filesystems are not overwritten.datais only used for initial format; it does not affect existing filesystems.mountis only used during mount, you can pass cache and concurrency options.
Module Parameters
JUICE module has only two parameters:
| Parameter | Type | Level | Description |
|---|---|---|---|
juice_cache |
path |
C |
JuiceFS shared cache directory |
juice_instances |
dict |
I |
JuiceFS instance dict (can be empty) |
juice_cache: shared local cache directory for all instances, default/data/juicejuice_instances: instance-level dict, key is filesystem name; an empty dict means no instances are managed
Instance Configuration
Each entry in juice_instances represents a JuiceFS instance:
| Field | Required | Default | Description |
|---|---|---|---|
path |
Yes | - | Mount point path, e.g. /fs |
meta |
Yes | - | Metadata engine URL (PostgreSQL recommended) |
data |
No | '' |
juicefs format options (storage backend) |
unit |
No | juicefs-<name> |
systemd service name |
mount |
No | '' |
Extra juicefs mount options |
port |
No | 9567 |
Metrics port (unique per node) |
owner |
No | root |
Mount point owner |
group |
No | root |
Mount point group |
mode |
No | 0755 |
Mount point permissions |
state |
No | create |
create / absent |
- It’s recommended to explicitly set
dataon first format to make the storage backend clear. - Multiple instances on the same node must use different
portvalues.
Example:
Storage Backends
data is appended to juicefs format, any supported backend works. Common examples:
PostgreSQL Data Backend
JuiceFS creates a jfs_blob table in the database selected by --bucket for file data. This PostgreSQL data backend and the meta metadata engine are separate roles; they may use one database or be deployed separately. The database and a user with read/write privileges must already exist.
Silo / MinIO-Compatible Object Storage
S3-Compatible Storage
Typical Configurations
Multi-Instance (Same Node)
Shared Mount Across Nodes
Mount the same JuiceFS on multiple nodes:
Only one node needs to format the filesystem; others will skip via --no-update.
Notes
portis exposed on0.0.0.0. Use firewall or security group to restrict access.- Changing
datawill not update an existing filesystem; handle migration manually. metaanddatamay contain database or object-storage credentials. Restrict access topigsty.yml, use dedicated least-privilege accounts, and never keep example passwords in production.