juicefs安装

1、下载安装包

wget  分布式模式快速上手指南 | JuiceFS Document Center

cp juicefs /opt/.

2、安装

/usr/bin/install /opt/soft/juicefs /usr/local/bin/

which juicefs

/usr/local/bin/juicefs

juicefs --help

3、初始化juicefs,管理对象存储

juicefs format \

    --storage <对象存储类型> \

    --bucket http://<bucket_name>.<bucket地址> \

    --access-key <对应的access-key> \

    --secret-key <对应的secret-key> \

    redis://<redis地址,并指定根节点> \

    <目录名>

例如:

juicefs format \

    --storage eos \

    --bucket http://dw-test.192.168.1.200:10000 \

    --access-key 055FT*********QQI39JZG \

--secret-key af2NQZonr**********G6O22FrOjs4v \

redis://192.168.1.201:32628/1 \

    myjfs

4、挂载的服务器磁盘

 juicefs mount --metrics 0.0.0.0:9567 -d redis://192.168.1.201:32628/1  /data/jfs

如有密码:

META_PASSWORD='密码'  juicefs mount --metrics 0.0.0.0:9567 -d redis://192.168.1.201:32628/1  /data/jfs

或者(juicefs mount --metrics 0.0.0.0:9567 -d redis://:密码@192.168.1.201:32628/1  /data/jfs)   如果密码中有特殊字符,可用转义https://blog.csdn.net/jimojianghu/article/details/126391990

5、防止服务器重启,可以将以上命令放到/etc/rc.local中

6、卸载juicefs挂载

juicefs umount /data/jfs

如果umount失败,可以使用fusermount 解决

fusermount -zu /data/jfs

7、Prometheus 指标

##后台启动,并指定metrics绑定 IP

juicefs mount --metrics 0.0.0.0:9567 -d redis://192.168.1.201:32628/1  /data/jfs

http://10.192.1.203:9567/metrics

8、设置gateway服务

cat > /lib/systemd/system/juicefs-gateway.service<<EOF

[Unit]

Description=Juicefs S3 Gateway

Requires=network.target

After=multi-user.target

StartLimitIntervalSec=0

[Service]

Type=simple

User=root

Environment="MINIO_ROOT_USER=<用户名>"

Environment="MINIO_ROOT_PASSWORD=<密码>"

ExecStart=/usr/local/bin/juicefs gateway --cache-size 20480 redis://192.168.1.201:32628/1 0.0.0.0:9567

Restart=on-failure

RestartSec=60

[Install]

WantedBy=multi-user.target

EOF

sudo systemctl daemon-reload

sudo systemctl enable juicefs-gateway --now

sudo systemctl status juicefs-gateway

服务启动正常后,可以在web端使用minio访问juicefs里的存储内容。

http://ip:9567

9、 benchmark 压测

juicefs bench  <绑定的目录>  -p 4

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值