美文网首页
seaweedfs使用总结

seaweedfs使用总结

作者: 时间道 | 来源:发表于2019-06-10 22:36 被阅读0次

优势:

存储小文件,占用空间小,性能比 fastDfs 好

在逻辑上Seaweedfs的几个概念:

  • Node 系统抽象的节点,抽象为DataCenter、Rack、DataNode
  • DataCenter 数据中心,对应现实中的不同机房
  • Rack 机架,对应现实中的机柜
  • Datanode 存储节点,用于管理、存储逻辑卷
  • Volume 逻辑卷,存储的逻辑结构,逻辑卷下存储Needle
  • Needle 逻辑卷中的Object,对应存储的文件
  • Collection 文件集,可以分布在多个逻辑卷上

安装:

yum info golang
wget https://github.com/chrislusf/seaweedfs/releases/download/0.96/linux_amd64.tar.gz
tar -zxf linux_amd64.tar.gz

启动

./weed -h  查看帮助
启动 master
nohup /home/dev/go/gopath/weed master -mdir=/home/dev/go/sea/data -port=9333 -defaultReplication="001" -ip="10.66.220.*" &>> /home/dev/go/sea/logs/master.log &

启动三个 volume
nohup /home/dev/go/gopath/weed volume -dir=/home/dev/go/sea/vol/vol1 -mserver="10.66.220.*:9333" -port=8081 -ip="10.66.220.*" &>>/home/dev/go/sea/logs/vol1.log &
nohup /home/dev/go/gopath/weed volume -dir=/home/dev/go/sea/vol/vol2 -mserver="10.66.220.*:9333" -port=8082 -ip="10.66.220.*" &>>/home/dev/go/sea/logs/vol2.log &
nohup /home/dev/go/gopath/weed volume -dir=/home/dev/go/sea/vol/vol3 -mserver="10.66.220.*:9333" -port=8083 -ip="10.66.220.*" &>>/home/dev/go/sea/logs/vol3.log &

上传文件:

 curl http://10.66.220.38:9333/dir/assign
 curl -F "file=/home/dev/mail.py" 10.66.220.38:8082/2,01f9865716

其他api

# specify a specific replication

curl "http://localhost:9333/vol/grow?replication=000&count=4"

{"count":4}

# specify a collection

curl "http://localhost:9333/vol/grow?collection=turbo&count=4"

# specify data center

curl "http://localhost:9333/vol/grow?dataCenter=dc1&count=4"

# specify ttl

curl "http://localhost:9333/vol/grow?ttl=5d&count=4"

* Check Volume Server Status

    curl "[http://localhost:8080/status?pretty=y](http://localhost:8080/status?pretty=y)”
  • Look up volume
curl "http://localhost:9333/dir/lookup?volumeId=3&pretty=y"

# Other usages:

# You can actually use the file id to lookup, if you are lazy to parse the file id.

curl "http://localhost:9333/dir/lookup?volumeId=3,01637037d6"

# If you know the collection, specify it since it will be a little faster

curl "http://localhost:9333/dir/lookup?volumeId=3&collection=turbo"

With "weed mount", the files can be operated as a local file.
Weed Mount Architecture

  • FUSE:用户空间文件系统(Filesystem in Userspace),是Linux 中用于挂载某些网络空间,如SSH,到本地文件系统的模块

SeaweedFS命令集:

benchmark
backup  
compact
filer
fix
server
master
filer
s3
upload
download
shell
version
volume
export
mount

相关文章

  • seaweedfs使用总结

    优势: 存储小文件,占用空间小,性能比 fastDfs 好 在逻辑上Seaweedfs的几个概念: Node 系...

  • Java操作SeaweedFS

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

  • seaweedfs使用说明

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

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

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

  • seaweedfs部署文档

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

  • SeaweedFS文件系统

    0 SeaweedFS的使用方式 以存放文件为例来讲述目前使用方式跟官网的区别 采用这种方式的原因是:可以自己来设...

  • SeaweedFS部署及使用指南

    软件版本: seaweedfs-1.33 压缩包包名:linux_amd64.tar.gz 想了解更多请查看官方文...

  • seaweedfs的filer使用说明

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

  • SeaweedFS Mount挂载本地文件目录

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

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

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

网友评论

      本文标题:seaweedfs使用总结

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