JuiceFS provides many commands to help you manage your filesystem. This page provides a detailed reference for these commands.
If you run
juicefs by itself, it will print all the available subcommands. In addition, you can add
-h/--help flag after each subcommand to get help information of that subcommand.
juicefs COMMAND [options]
COMMAND could be:
auth authorize a filesystem
mount mount a filesystem
umount umount a filesystem
info show information of file or directory
lsof list recent opened files
import import files from existing object storage
rmr remove all files/directories recursively
snapshot create or remove snapshots
grep parallelized file pattern searcher
profile analyze log (Experimental)
benchmark run benchmark
doctor collect diagnose information
warmup build cache for target directories/files
version show the version
juicefs [COMMAND] [options]
--help after all commands, getting arguments list and help information.
juicefs is not placed in your
$PATH, you should run the script with the path to the script. For example, if
juicefs is placed in current directory, you should use
./juicefs. It is recommended to place
juicefs in your
$PATH for the convenience.
The documentation below gives you detailed information about each subcommand.
Set up the authentication information configuration file of the file system locally and stored in the
$HOME/.juicefs directory of the current user. The name of the configuration file is in the format of
This command is useful when you need to deploy JuiceFS via script, or use self-built object storage for private deployment.
juicefs auth <name> [options]
|The name of your filesystem.|
|The JuiceFS token of your filesystem, you can find this token in the web console.|
|The access key of your bucket, you can read our guide on how to get access key and secret from your service provider.|
|The secret key of your bucket, you can read our guide on how to get access key and secret from your service provider.|
|The access key of your secondary bucket.|
|The secret key of your secondary bucket.|
- The authentication information is stored in
- You will be prompted to enter the access key and secret if you didn\'t provide it through the
- If your object storage provider allows accessing without key pairs (e.g. IAM), you can leave blank when you are asked for access and secret keys, or you can simply pass an empty string to the
- Enable the JuiceFS replication in the setting panel of the Web Console, and mount with the
Mount the filesystem. When mounting, you must provide the token of the file system (check the "File System Settings" in the website console), and the key pair to access the object storage API (refer to the document "How to Get Object Storage Access Key and Secret Key").
If the configuration file is not generated by the
auth subcommand before mounting the file system, the client will ask you to provide the file system token and the key pair to access the object storage API separately through command line interaction.
juicefs mount <name> <mountpoint> [-f] [-b] [-v]
[--external | --internal] [--max-uploads=<max_uploads>]
|The name of your filesystem.|
|The mountpoint of your filesystem.|
|Run in the foreground mode.|
|Run in the background mode.|
|mount a sub-directory|
|(default: 30) number of retries for network failure|
|The bind address to serve files using HTTP, for example, |
|Disallow list a directory in WebDAV|
|use local config only|
Object Storage Options
|Prefer to use the external entrypoint of the object storage service. This means the traffic of JuiceFS will go through the public network instead of the internal network.|
|Prefer to use the internal entrypoint of the object storage service. This means the traffic of JuiceFS will go through the internal network instead of the public network. (Applicable to some object storages that separate internal and external network domain names, e.g. Aliyun OSS, UCloud UFile, etc.)|
|(default: 50) The maximum number of concurrent uploading connections.|
|(default: 3) number of concurrent prefetching|
|(default: unlimited) The maximum bandwidth for upload (Mbps).|
|(default: unlimited) The maximum bandwidth for download (Mbps).|
|(default: unlimited) The maximum invoke rate for object delete (QPS).|
|The maximum time for getting a single object (seconds).|
|The maximum time for upload a single object (seconds).|
|cleanup unused chunks after mounting immediately|
|do not delete chunks during GC|
|flip the two replicated bucket (prefer secondary bucket)|
|Path to RSA private key (PEM). Passphrase will be asked or provided with |
|(default: 100G) The maximum size of the cache. The default unit is MiB. Will be evenly distributed to each directory in multiple directories mode.|
|(default: 0.2) The minimum size of the cache directory (ratio).|
|(default: 300) The maximum memory size of read and write data buffer (MiB).|
|(default: 0600) Permission mode of cache files.|
|(default: no sharing) the name of group to join and provide remote cache|
|(default: 0) the number of sub-groups in a cache group|
|IP address for group cache|
|(default: false) do not share cached blocks to others|
|(default: false) data will be written to local disk first, and be uploaded to object storage asynchronously in the background.|
|(default: false) If only cache the blocks for small reads|
|build remote cache for new written blocks|
|Enable metadata caching in local memory.|
|(default: 300) Expiration of the meta cache (seconds).|
|(default: 5000000) the max number of cached inodes|
|Open a file based on cached metadata.|
|(default: 1) Duration for the attributes of file and directory cached in the kernel (seconds) .|
|(default: 1) Duration for the file entry cached in the kernel (seconds).|
|(default: 1) Duration for the directory entry cached in the kernel (seconds).|
|Allow accesses from other users. This option is enabled by default when you are running as root user. You need to enable this feature explicitly otherwise.|
|Enable extended attributes (xattr) support.|
|Enable POSIX ACL support.|
|Disable POSIX lock support.|
|Disable BSD lock support.|
|(default: 1) number of seconds to block interruption|
|Other FUSE options. For example, enabling FUSE write cache through |
See how to mount a filesystem in the document Getting Started.
|When the inodes difference between the current zone and the zone with the least inodes exceeds this value, the metadata will be automatically balanced.|
|When the number of directories in the current path exceeds this value, the metadata is automatically balanced.|
|limit the total space in GiB (default: no limit)|
|Use JuiceFS as cache for a directory|
|checking for update (seconds)|
|propagate all changes to source|
The following are the options that have been deprecated by JuiceFS!
|Use HTTPS to access object store (always enabled)|
|allow root to access (use |
|do not sync the replicated object store|
|number of seconds to wait to combine multiple small files as single object|
|keep FUSE session alive|
Umount a JuiceFS file system.
juicefs umount <mountpoint> [options]
|Umount it forcibly.|
Show information about the file or directory stored in JuiceFS.
juicefs info <path> [-n | --plain]
|The path to the file you are querying.|
|Show sizes in bytes.|
Show information of a directory.
# juicefs info /jfs/logs
inodes: 4 # inode total
directories: 2 # directory total
files: 2 # file total
chunks: 44 # chunk total of all files
length: 2.91G # real size of all files
size: 2.91G # billable size, every file and directory is aligned to 4KB as minimum billable size
Show information of a file.
# juicefs info --plain /jfs/daily-log.tar
inode: 2955 # inode ID of the file
length: 3128903680 # real size of the file
size: 3128950784 # billable size, minimum is 4KB
chunks: 47 # chunk total and detail, maximum 64MB for each chunk
0: 58597 67108864 0 67108864 # location in the file, chunk ID, length of chunk, real start location, length
1: 58598 67108864 0 67108864
45: 58661 67108864 0 67108864
46: 58662 41895936 0 41895936
List recently (within 10 minutes) opened files in JuiceFS.
juicefs lsof <path>
Import files already existing in the object storage without reuploading.
juicefs import <uri> <dst> [-v] [--name=<name>] [--mode=<mode>]
|The URI of the file you are importing. It should be in the format of |
|The destination of the imported file.|
|The name of the filesystem. This is required in systems other than Linux.|
|Mode (Unix permissions) of imported files.|
- The imported file will be read-only. However, you can still modify other attributes (e.g. filename, permissions) of the files and directories.
- If you delete the imported file in JuiceFS, the data stored in your object storage will NOT be deleted.
Remove all the files and subdirectories, similar to
rm -rf, but much faster.
It will try to remove them using current uid/gid, ignore those that can\'t be removed, return the number of removed files/directories, the number of left ones.
If trash is enabled, the removed files are removed into trash.
juicefs rmr <dir> [-h]
Manage JuiceFS snapshots.
Snapshots are snapshots of your data at a certain time. It is a common technology used in data backup. JuiceFS will not create a copy of your data when you create a snapshot. It will only create a copy when there are some changes made to the original data (i.e. copy-on-write).
juicefs snapshot <src> <dst> [-f | --force] [-c | --copy] # create a snapshot
juicefs snapshot -d <dst> [-f | --force] # delete a snapshot
|The path to the file you are creating the snapshot from.|
|The locate where you want to store your snapshot.|
|Remove the snapshot.|
|Overwrite existing snapshot, or remove the snapshot arbitrarily.|
|Use current user\'s uid, gid and umask to create the snapshot. Otherwise it will use permission information of the file you are creating snapshot.|
Parallelized file pattern searcher.
juicefs grep [PATTERN] PATH ... [options]
|Support simple pattern and basic regular expression.|
|Search path and files.|
|Number of parallel jobs (default is number of CPU cores).|
|This option is most useful when multiple |
|Interpret pattern as an extended regular expression.|
|Always print filename headers with output lines.|
|Each output line is preceded by its relative line number in the file, starting at line 1.|
|Perform case insensitive matching. By default, it is case sensitive.|
|Selected lines are those not matching any of the specified patterns.|
Collect and analyze the file system's oplog (operation log).
juicefs profile [options]
|The path of log, default path is |
|The filename of log, default filename is |
|Group the output by a specific attribute (default by |
|Sort the output by a specific column (default by |
|Filter the output by one or multiple keywords on the UID column, please separate multi keywords by comma (,).|
|Filter the output by one or multiple keywords on the PID column, please separate multi keywords by comma (,).|
|The window size of collect oplog, accept float value, 60 seconds by default.|
|The interval of flush output, accept float value, 2 seconds by default.|
Run benchmark, including read/write/stat big/small files.
juicefs benchmark [options] path-to-test
|(default: 1MiB) block size in MiB|
|(default: 1024MiB) size of big file in MiB|
|(default: 0.1MiB) size of small file in MiB|
|(default: 100) number of small files|
Collect information for debug
juicefs doctor MOUNTPOINT
Warm-up cache for the files
juicefs warmup [PATH] [options]
|file containing a list of paths (one path per line)|
|(default: 50) number of concurrent workers|
|run in background|
Show the JuiceFS version information. The update details of each version can be viewed on the "Release Notes".
juicefs version [options]
|Upgrade the JuiceFS client to latest version.|