Command Reference
Running juicefs by itself and it will print all available commands. In addition, you can add -h/--help flag after each command to get more information, e.g., juicefs mount -h.
NAME:
juicefs - A POSIX file system built on object storage.
USAGE:
juicefs [global options] command [command options] [arguments...]
VERSION:
5.1.1 (2024-09-20 1faf43b)
COMMANDS:
help, h Shows a list of commands or help for one command
ADMIN:
auth Authorize a volume
destroy Destroy an existing volume
gc Garbage collector of objects in data storage
fsck Check consistency of a volume
dump Dump metadata into a JSON file
load Load metadata from a previously dumped JSON file
version Show version
quota Manage directory quotas
heal Heal a replicated volume
INSPECTOR:
status Show status of a volume
stats Show real time performance statistics of JuiceFS
profile Show profiling of operations completed in JuiceFS
info Show internal information of a path or inode
summary Show data and files distribution of a directory
debug, doctor Collect and display system static and runtime information
lsof List open files
SERVICE:
mount Mount a volume
umount Unmount a volume
gateway Start an S3-compatible gateway
webdav Start a WebDAV server
TOOL:
bench, benchmark Run benchmarks on a path
objbench Run benchmarks on an object storage
warmup Build cache for target directories/files
clone, snapshot Clone a file/directory without copying data
rmr Remove directories recursively
sync Sync between two storages
import Import existing files from object storage
merge merge files together without copying.
grep parallelized file pattern searcher
compact Trigger compaction of chunks
GLOBAL OPTIONS:
--verbose, --debug, -v enable debug log (default: false)
--quiet, -q show warning and errors only (default: false)
--trace enable trace log (default: false)
--no-agent disable pprof (:6060) agent (default: false)
--pyroscope value pyroscope address
--no-color disable colors (default: false)
--help, -h show help
--version, -V print version only (default: false)
Global options
| Items | Description |
|---|---|
-v --verbose --debug | Enable debug logs. |
-q --quiet | Show only warning and error logs. |
--trace | Enable more detailed debug logs than the --debug option. |
--no-agent | Disable pprof agent. |
--pyroscope | Config Pyroscope address, e.g. http://localhost:4040. |
--no-color | Disable log color. |
Admin
juicefs auth
Authenticate the client against JuiceFS Console, and fetch or update configuration file for the JuiceFS Volume, and stored in $HOME/.juicefs/$VOL_NAME.conf. This command is useful in the following situations:
juicefs mountmay require interactive input, which is not convenient for automation. Runjuicefs authin advance to authenticate and fetch the client config file, see Automation for more.- If object storage bucket (or its access key, secret key) changed,
juicefs authis needed again to update the relevant information. For example, if object storage is migrated to another region, or switched to a different service provider, client config needs to be updated as well. - On-prem When Metadata node IP changes, run
juicefs authagain to reauthenticate and fetch the latest config. Most migration are executed without downtime, so you only need to update the config file, rather than restart the whole mount point (consult Juicedata engineer for specifics). - For CSI Driver, if Metadata node IP, object storage, or on-prem Web Console address changes, you must update the volume credentials to trigger an auto update, CSI Controller runs
juicefs authto refresh the client config cache.
Synopsis
juicefs auth NAME [options]
juicefs auth myjfs --token xxx --access-key xxx --secret-key xxx
Options
| Items | Description |
|---|---|
NAME | Name of your file system. |
--token=TOKEN | Token of your file system, obtain in JuiceFS Web Console. |
--bucket=BUCKET | When a file system is first created, object storage bucket is already specified in the web console. When in need, client can override this setting by specifying this option, in order to for example, connect to object storage in special network environments. Same as the file system bucket setting in the web console, you can either specify the bare bucket name string, or the full endpoint starting with https:// or http://. These two method have different implications:
|
--access-key=ACCESSKEY | Object storage access key, see How to get AK/SK. An interactive prompt will occur to collect this info if missing in the command line options. Leave empty if you have configured host to access object storage without credentials. |
--secret-key=SECRETKEY | Object storage secret key, see How to get AK/SK. An interactive prompt will occur to collect this info if missing in the command line options. Leave empty if host have been configured to access object storage without credentials. |
--session-token=SESSIONTOKEN | Optionally provide object storage session token. |
--shards=0 | Same as the Community Edition's --shards option. JuiceFS Enterprise Edition volumes are usually paired with scalable object storage services, and do not easily reach the single bucket performance (or capacity) limit. Hence, this option is provided to maintain compatibility, and should not be your first option because multi-bucket increases complexity. |
--storage-class=value | Storage class for the destination storage, if supported. Read relevant docs for more, e.g. S3. |
--bucket2=BUCKET2 | Optionally provide the name or endpoint for the secondary bucket For Data replication, same format and caveats as --bucket. |
--access-key2=ACCESSKEY2 | When data replication is enabled, use this parameter to specify the access key for the secondary bucket. Learn more at Cross-region data replication. |
--secret-key2=SECRETKEY2 | When data replication is enabled, use this parameter to specify the secret key for the secondary bucket. Learn more at Cross-region data replication. |
--session-token2=SESSION_TOKEN2 | the session token to access the bucket (optional) |
--shards2=0 | When data replication is enabled, --shards2 must equal --shards. |
--passphrase=PASSPHRASE | Passphrase for encrypted key, see Data Encryption for more. |
--encrypt-keys | Encrypt the object access and secret keys locally or not (default: false). |
--subdir=SUBDIR | Specify a sub-directory for mount, you can also create ACL to restrict client access to specific sub-directories, learn more at Client Access Control |
--conf-dir=CONFDIR | Directory to store configuration files, default to ~/.juicefs) |
--no-update | Client will by default obtain latest config from JuiceFS Web Console, set to true to disable this behavior, and then client will no longer talk to JuiceFS Console when mounting. |