美文网首页
seaweedfs的filer使用说明

seaweedfs的filer使用说明

作者: wz998 | 来源:发表于2018-12-18 14:57 被阅读0次

搭建一个服务器

cd /home1/seaweeddir 
mkdir {mtmp,vtmp1,vtmp2,ftmp,mountdir} 
weed scaffold -config=filer -output=. 
vim filer.toml (修改leveldb的dir为"./ftmp")
weed master -ip=localhost -port=9333 -mdir=./mtmp
weed volume  -dataCenter=imgdatacenter1 -rack=imgrack1  -ip=localhost -port=9991 -dir=./vtmp1 -max=10 -mserver=localhost:9333
weed filer -ip=localhost -port=8888  -master=localhost:9333 -collection=test
sudo weed mount -filer=localhost:8888 -dir=/home1/seaweeddir/mountdir -filer.path=/   -collection=test
//关闭服务后执行 sudo umount -l /home1/seaweeddir/mountdir 取消挂载
//此时就可以使用filer通过web操作文件了,而且也可以通过/home1/seaweeddir/mountdir本地操作文件了。
//或者这么理解,sudo weed mount只能用sudo umount -l 取消挂载,而不是直接kill进程。

其中mount只是为了本地操作方便,不想本地操作,可以不使用mount

初始化

假设我这10个volume,我预分配1个给人员库 staff,6个预分配给摄像机camera,其他的保留通用数据。

curl "http://localhost:9333/vol/grow?collection=staff&count=1"
curl "http://localhost:9333/vol/grow?collection=camera&count=6"

上传文件

这里测试往staff文件集里面添加图片:

curl -F file=@1.jpeg "http://localhost:8888/staff/newimg_1.jpeg?collection=staff" //单个文件上传
weed filer.copy  -collection=staff /home1/image/staff http://localhost:8888/staff //并发批量上传

删除filer中的文件和文件夹

curl -X DELETE http://localhost:8888/path/to/file
curl -X DELETE http://localhost:8888/path/to/dir?recursive=true

删除collection

curl "http://localhost:9333/col/delete?collection=xxx&pretty=y"

清理空间,使删除立马生效

curl "http://localhost:9333/vol/vacuum"

查看状态

curl "http://localhost:9333/cluster/status?pretty=y"
curl "http://localhost:9333/dir/status?pretty=y"
curl "http://localhost:9991/status?pretty=y"
curl  -H "Accept: application/json" "http://localhost:8888/?pretty=y" 

相关文章

  • seaweedfs的filer使用说明

    搭建一个服务器 其中mount只是为了本地操作方便,不想本地操作,可以不使用mount 初始化 假设我这10个vo...

  • SeaweedFS Mount挂载本地文件目录

    seaweedfs可以依赖FUSE 文件系统,将Filer服务当成目录,挂载到指定的系统路径下,这样就可以使用基础...

  • seaweedfs使用说明

    基本概念 master 存储映射关系,文件和fid的映射关系 weed masterNode 系统抽象的结点,抽...

  • SeaweedFS:简单,高可用的分布式文件存储

    最近在调研文件的分布式存储及高可用,在GITHUB上面,发现了这个SeaweedFS项目不错。 SeaweedFS...

  • seaweedfs部署文档

    1.seaweedfs的概述seaweedfs是一个非常优秀的由golang开发的分布式存储开源项目。它是用来存储...

  • 法语点滴:filer

    发布者Alicia的第一行大意是:有没有人可以告知我几门课程的分数?画黄圈处的filer一词,可以理科为“donn...

  • Java操作SeaweedFS

    前置条件是seaweedfs服务已成功启动,具体部署可参考我上篇文章SeaweedFS部署及使用指南 首先导入po...

  • linearity and convolution

    1.To convolute a image with a filer ,a good way to cut do...

  • 分布式小文件服务器seaweedfs安装

    下载[https://github.com/chrislusf/seaweedfs/releases] 解压 安装...

  • seaweedfs实践

    测试weedfs的故障恢复时间测试,简便起见 上传文件 查看卷服务器中文件 此时,把起在8091端口的volume...

网友评论

      本文标题:seaweedfs的filer使用说明

      本文链接:https://www.haomeiwen.com/subject/edhlkqtx.html