Configuration
Concepts and Implementation
JuiceFS consists of a metadata engine and data storage.
The current version passes meta to juicefs as the metadata engine URL. Production deployments typically use PostgreSQL.
Data storage is defined by data options passed to juicefs format.
JUICE module core commands:
Notes:
--no-updateensures existing filesystems are not overwritten.dataapplies only to the initial format. It does not affect existing filesystems.mountapplies only during mounting. Use it to 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 dictionary. Each key is a filesystem name. An empty dictionary means that the module manages no instances.
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 |
- We recommend that you explicitly set
dataon the first format. This makes the storage backend clear. - Multiple instances on the same node must use different
portvalues.
Example:
Storage Backends
The module appends data to juicefs format. You can use any supported backend. Common examples follow.
PostgreSQL Data Backend
JuiceFS creates a jfs_blob table in the database selected by --bucket for file data. The PostgreSQL data backend and the meta metadata engine have separate roles. They can use one database or separate deployments. 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. Other nodes skip this operation because of --no-update.
Notes
portis exposed on0.0.0.0. Use firewall or security group to restrict access.- A change to
datadoes not update an existing filesystem. Migrate the data manually. metaanddatacan contain database or object-storage credentials. Restrict access topigsty.yml. Use dedicated accounts with the minimum required privileges. Never keep example passwords in production.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)