Skip to main content

JuiceFS Configuration

Flags

caution
  • macOS 需要 macFUSE - 安装会有点麻烦
flagenvfor
--access-key valueACCESS_KEY
--secret-key valueSECRET_KEY
flagfor
FUSE
--enable-xattr
--enable-ioctl
--root-squash UID:GID
--prefix-internal.jfs
-o allow_other
Metadata
--subdir=PATH挂载子目录
--backup-meta=3600
--backup-skip-trash
--heartbeat=12
--read-only
--no-bgjob
--atime-mode=noatimenoatime,relatime,strictatime
--skip-dir-nlink=20
Metadata cache
--attr-cache=1
--entry-cache=1
--dir-entry-cache=1
--open-cache=0
--open-cache-limit=10000
Data storage
--storage=file
--storage-class VALUE
--bucket=VALUE
--get-timeout=60
--put-timeout=60
--io-retries=10
--max-uploads=20
--max-deletes=10
--upload-limit=0BW in MiB/s
--download-limit=0BW in MiB/s
Data cache
--buffer-size=300read/write in MiB
--writeback异步上传
--prefetch=1预读
--upload-delay=0在上传前本地删除了则不上传
--cache-dir=$HOME/.juicefs/cache
--cache-mode=0600
--cache-size=102400MiB
--free-space-ratio=0.1
--cache-partial-only
--verify-cache-checksum VALUEnone,full,shrink,extend
--cache-eviction=2-random
--cache-scan-interval=3600
Metrics
--metrics=127.0.0.1:9567
--custom-labels key:val
--consul=127.0.0.1:8500
--no-usage-report
gateway
--no-banner
--multi-buckets将顶级目录作为 bucket
--keep-etag
--umask=022
--domain valuevirtual-host-style
webdav
--cert-file
--key-file
--gzip
--disallowList禁止目录
--log PATH
--access-log=path
--background, -d
# fuse
juicefs mount -o allow_other,writeback_cache sqlite3://myjfs.db ~/jfs --no-usage-report

export WEBDAV_USER=root
export WEBDAV_PASSWORD=1234
juicefs webda --gzip $JUICEFS_META_URL localhost:9007 --no-usage-report

Metadata

  • Redis
    • 300b 一个文件
  • META_PASSWORD
    • 数据库密码
juicefs format \
--storage sqlite3 \
--bucket data.db \
sqlite3://meta.db jfs

# 不支持 fsck, gc
# 不能多进程挂载
juicefs format \
--storage sqlite3 \
--bucket data.db \
badger://$PWD/meta jfs
  • REDIS_PASSWORD
  • META_PASSWORD
  • redis
    • maxmemory-policy noeviction
redis[s]://[<username>:<password>@]<host>[:<port>]/<db>
unix://[<username>:<password>@]<socket-file-path>?db=<db>

postgres://[username][:<password>]@<host>[:5432]/<database-name>[?parameters]
postgres://[username][:<password>]@/<database-name>?host=<socket-directories-path>[&parameters]

mysql://<username>[:<password>]@(<host>:3306)/<database-name>
mysql://<username>[:<password>]@unix(<socket-file-path>)/<database-name>

sqlite3://my-jfs.db?cache=shared&_busy_timeout=5000

badger://$HOME/badger-data myjfs

tikv://<pd_addr>[,<pd_addr>...]/<prefix>

etcd://[user:password@]<addr>[,<addr>...]/<prefix>

fdb://[config file address]?prefix=<prefix>

Storage

storageservice
s3Amazon S3
gsGoogle Cloud Storage
wasbAzure Blob Storage
b2Backblaze B2
ibmcosIBM Cloud Object Storage
s3Oracle Cloud Object Storage
scwScaleway Object Storage
spaceDigitalOcean Spaces
wasabiWasabi
s3Storj DCS
s3Vultr Object Storage
s3Cloudflare R2
ossAlibaba Cloud OSS
cosTencent Cloud COS
obsHuawei Cloud OBS
bosBaidu Object Storage
tosVolcano Engine TOS
ks3Kingsoft Cloud KS3
qingstorQingStor
qiniuQiniu
scsSina Cloud Storage
oosCTYun OOS
eosECloud Object Storage
s3JD Cloud OSS
ufileUCloud US3
cephCeph RADOS
s3Ceph RGW
glusterGluster
swiftSwift
minioMinIO
webdavWebDAV
hdfsHDFS
s3Apache Ozone
redisRedis
tikvTiKV
etcdetcd
sqlite3SQLite
mysqlMySQL
postgresPostgreSQL
fileLocal disk
sftpSFTP/SSH