There are three ways to view usage or data distribution in JuiceFS:
- Use Linux native command line tools;
- Use the JuiceFS command line tool;
- View in the console of JuiceFS website.
Let's take a look at their usage.
Use Linux native command line tools
df -h to view the total volume capacity and usage. If you want to view the data volume of each directory, you can use
ls -lh to directly inspect the file and directory size. The size of the directory contents is directly listed in JuiceFS, which is more convenient than the local file system, and handy for space management.
JuiceFS is not compatible with the
du command. Please do not use it to calculate the size. Just use
ls -lh and it's faster.
Use the JuiceFS command line tool
JuiceFS provides a command
juicefs info to inspect file and directory details, such as displaying statistics for a directory:
$ juicefs info /jfs/logs
inodes: 4 # the total number of inodes in the current directory
directories: 2 # the number of directories
files: 2 # the number of files
chunks: 44 # the number of chunks contained in all files
length: 2.91G # the total actual sizes of all files
size: 2.91G # billing size, all files and directories will be aligned to 4KB, which is the minimum billing unit
For more detailed usage, please refer to Command Reference。
View in the console of JuiceFS website
The file, directory, size and number of inodes can also be viewed in the JuiceFS Console . It display file and directory list by default, you can click the column title (inodes, size, etc.) for display by corresponding order.
If you want to see the usage of the multi-level directory, you can switch to the chart to view the distribution of the entire file system by clicking the icon at the top right of the file list.
A total of 4 layers of paths are counted, and it can be seen at a glance which path has the largest capacity and which path has the most inodes.