Parameters
JUICE module parameter list, 2 parameters total:
juice_cache: JuiceFS cache directoryjuice_instances: JuiceFS instance definition dictionary
Parameter Overview
| Parameter | Type | Level | Description |
|---|---|---|---|
juice_cache | path | C | JuiceFS shared cache directory |
juice_instances | dict | I | JuiceFS instance definitions, required |
Default Parameters
JUICE: 2 parameters, defined in roles/juice/defaults/main.yml
#-----------------------------------------------------------------
# JUICE
#-----------------------------------------------------------------
juice_cache: /data/juice # JuiceFS shared cache directory
juice_instances: {} # JuiceFS instance definitions
JUICE
This section contains parameters for the juice role,
used by the juice.yml playbook.
juice_cache
Parameter: juice_cache, Type: path, Level: C
Shared local cache directory for all JuiceFS instances, defaults to /data/juice.
JuiceFS isolates cache data by filesystem UUID under this directory, accelerating frequently accessed file reads.
juice_cache: /data/juice
juice_instances
Parameter: juice_instances, Type: dict, Level: I
JuiceFS instance definition dictionary, required parameter, must be explicitly configured at Host level.
Content is JSON/YAML dictionary format, Key is filesystem name (instance ID), Value is instance config object.
juice_instances:
jfs: # Filesystem name
path : /fs # [Required] Mount point path
meta : postgres://u:p@h:5432/db # [Required] Metadata engine URL
data : --storage postgres --bucket ... # Storage backend options
unit : juicefs-jfs # systemd service name
mount : '' # Extra mount options
port : 9567 # Metrics port (must be unique per node)
owner : root # Mount point owner
group : root # Mount point group
mode : '0755' # Mount point permissions
state : create # create | absent
Instance config field descriptions:
| Field | Required | Default | Description |
|---|---|---|---|
path | Yes | - | Mount point path, e.g., /fs, /pgfs |
meta | Yes | - | Metadata engine URL, typically PostgreSQL connection string |
data | No | '' | juicefs format storage backend params |
unit | No | juicefs-<name> | systemd service unit name |
mount | No | '' | juicefs mount extra params |
port | No | 9567 | Prometheus metrics port, must be unique for multi-instance |
owner | No | root | Mount point directory owner |
group | No | root | Mount point directory group |
mode | No | 0755 | Mount point directory permissions |
state | No | create | create to create, absent to remove |
Config Examples:
Using PostgreSQL for metadata and data storage:
juice_instances:
jfs:
path : /fs
meta : postgres://dbuser_meta:[email protected]:5432/meta
data : --storage postgres --bucket 10.10.10.10:5432/meta --access-key dbuser_meta --secret-key DBUser.Meta
port : 9567
Using MinIO for data storage:
juice_instances:
jfs:
path : /fs
meta : postgres://dbuser_meta:[email protected]:5432/meta
data : --storage minio --bucket http://10.10.10.10:9000/juice --access-key minioadmin --secret-key minioadmin
port : 9567
Multi-instance config (note unique ports):
juice_instances:
pgfs:
path : /pgfs
meta : postgres://dbuser_meta:[email protected]:5432/meta
data : --storage postgres --bucket 10.10.10.10:5432/meta --access-key dbuser_meta --secret-key DBUser.Meta
port : 9567
shared:
path : /shared
meta : postgres://dbuser_meta:[email protected]:5432/shared
port : 9568 # Must differ from pgfs
owner : postgres
group : postgres
Multiple JuiceFS instances on the same node must configure different port values, otherwise the playbook will fail during validation.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.