Skip to content

comnipl/juicefs-mounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

juicefs-mounter

Rust launcher that orchestrates redis-server (replica), redis-rwproxy, and juicefs mount, then shuts them down in reverse order on SIGINT/SIGTERM or child exit.

Usage

CLI args (existing style):

juicefs-mounter <REMOTE> <REPLICA_PORT> <LOCAL_PORT> <USERNAME> <PASSWORD> <DATADIR> <MOUNTPOINT> <ARGS...>

Example:

juicefs-mounter 10.0.0.1:8080 8081 8082 testuser testpassword ~/.test/redis-read-replica ~/test -o allow_other --map-id 1000:2000 --map-id 1500:2500

YAML config

You can supply the same values via a YAML file and point to it with --config <PATH>. Fields supplied on the CLI override values from the file; trailing ARGS... from the CLI are appended after any args listed in the file.

Sample config.yaml:

remote: "10.0.0.1:8080"
replica_port: 8081
local_port: 8082
username: "testuser"
password: "testpassword"
datadir: "~/.test/redis-read-replica"
mountpoint: "~/test"
args:
  - "-o"
  - "allow_other"
  - "--map-id"
  - "1000:2000"
  - "--map-id"
  - "1500:2500"

Run with the config file:

juicefs-mounter --config config.yaml

Behavior

  • Checks TCP connectivity to the remote Redis before starting anything.
  • Starts redis-server (replica), waits for readiness, then redis-rwproxy, then juicefs mount.
  • Logs child stdout/stderr with a <name>| prefix.
  • On SIGINT/SIGTERM or if any child exits, sends SIGTERM in reverse order (juicefs → redis-rwproxy → redis-server), waiting for each to stop before moving on.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published