weed-fs没有详细的帮助文档,为了方便阅读,特意把有用的参数帮助罗列出来。
未列出的两个命令为version(版本查询) 及shell(这个命令在0.45版本只有回显功能)
nerc@Ubuntu:~/data1$ weed -h
WeedFS is a software to store billions of files and serve them fast! Usage: weed command [arguments] The commands are: compact run weed tool compact on volume file if corrupted
fix run weed tool fix on index file if corrupted
master start a master server
upload upload one or a list of files
download download files by file id
shell run interactive commands, now just echo
version print Weed File System version
volume start a volume server
export list or export files from one volume data file Use "weed help [command]" for more information about a command.
 
nerc@Ubuntu:~/data1$ weed master -h
Example: weed master -port=9333
Default Usage:
-conf="/etc/weedfs/weedfs.conf": xml configuration file
-debug=false: enable debug mode
-defaultReplicationType="000": Default replication type if not specified.
-garbageThreshold="0.3": threshold to vacuum and reclaim spaces
-maxCpu=0: maximum number of CPUs. 0 means all available CPUs
-mdir="/tmp": data directory to store mappings
-port=9333: http listen port (监听端口,IP地址默认为localhost,但远程时可直接访问外网地址+端口号发起上传申请)
-pulseSeconds=5: number of seconds between heartbeats (心跳监控间隔时长)
-readTimeout=3: connection read timeout in seconds (上传文件大小受网络带宽及此参数限制)
-volumeSizeLimitMB=32768: Default Volume Size in MegaBytes (限制每个volume的大小,一般采用默认值,无需设置此参数)
-whiteList="": comma separated Ip addresses having write permission. No limit if empty.(可以通过此参数限定准许上传的机器,保证服务器安全)
Description:
start a master server to provide volume=>location mapping service
and sequence number of file ids
 
nerc@Ubuntu:~/data1$ weed volume -h
Example: weed volume -port=8080 -dir=/tmp -max=5 -ip=server_name -mserver=localhost:9333
Default Usage:
-dataCenter="": current volume server's data center name
-debug=false: enable debug mode
-dir="/tmp": directories to store data files. dir[,dir]...
-ip="localhost": ip or server name
-max="7": maximum numbers of volumes, count[,count]...
-maxCpu=0: maximum number of CPUs. 0 means all available CPUs
-mserver="localhost:9333": master server location
-port=8080: http listen port
-publicUrl="": Publicly accessible <ip|server_name>:<port>
-pulseSeconds=5: number of seconds between heartbeats, must be smaller than the master's setting
-rack="": current volume server's rack name
-readTimeout=3: connection read timeout in seconds. Increase this if uploading large files.
-whiteList="": comma separated Ip addresses having write permission. No limit if empty.
Description:
start a volume server to provide storage spaces
 
nerc@Ubuntu:~/data1$ weed fix -h
Example: weed fix -dir=/tmp -volumeId=234
Default Usage:
-collection="": the volume collection name
-debug=false: enable debug mode
-dir="/tmp": data directory to store files
-volumeId=-1: a volume id. The volume should already exist in the dir. The volume index file should not exist.
Description:
Fix runs the WeedFS fix command to re-create the index .idx file.
 
nerc@Ubuntu:~/data1$ weed compact -h
Example: weed compact -dir=/tmp -volumeId=234
Default Usage:
-collection="": volume collection name
-debug=false: enable debug mode
-dir="/tmp": data directory to store files
-volumeId=-1: a volume id. The volume should already exist in the dir.
Description:
Force an compaction to remove deleted files from volume files.
The compacted .dat file is stored as .cpd file.
The compacted .idx file is stored as .cpx file.
 
nerc@Ubuntu:~/data1$ weed upload -h
Example: weed upload -server=localhost:9333 file1 [file2 file3]
upload -server=localhost:9333 -dir=one_directory -include=*.pdf
Default Usage:
-debug=false: verbose debug information
-dir="": Upload the whole folder recursively if specified.
-include="": pattens of files to upload, e.g., *.pdf, *.html, ab?d.txt, works together with -dir
-maxMB=0: split files larger than the limit
-replication="": replication type(000,001,010,100,110,200)
-server="localhost:9333": weedfs master location
Description:
upload one or a list of files, or batch upload one whole folder recursively. If uploading a list of files:
It uses consecutive file keys for the list of files.
e.g. If the file1 uses key k, file2 can be read via k_1 If uploading a whole folder recursively:
All files under the folder and subfolders will be uploaded, each with its own file key.
Optional parameter "-include" allows you to specify the file name patterns. If any file has a ".gz" extension, the content are considered gzipped already, and will be stored as is.
This can save volume server's gzipped processing and allow customizable gzip compression level.
The file name will strip out ".gz" and stored. For example, "jquery.js.gz" will be stored as "jquery.js". If "maxMB" is set to a positive number, files larger than it would be split into chunks and uploaded separatedly.
The list of file ids of those chunks would be stored in an additional chunk, and this additional chunk's file id would be returned.
 
nerc@Ubuntu:~/data1$ weed download -h
Example: weed download -server=localhost:9333 -dir=one_directory fid1 [fid2 fid3 ...]
Default Usage:
-debug=false: verbose debug information
-dir=".": Download the whole folder recursively if specified.
-server="localhost:9333": weedfs master location
Description:
download files by file id. Usually you just need to use curl to lookup the file's volume server, and then download them directly.
This download tool combine the two steps into one. What's more, if you use "weed upload -maxMB=..." option to upload a big file divided into chunks, you can
use this tool to download the chunks and merge them automatically.
 
nerc@Ubuntu:~/data1$ weed export -h
Example: weed export -dir=/tmp -volumeId=234 -o=/dir/name.tar -fileNameFormat={{.Name}}
Default Usage:
-collection="": the volume collection name
-debug=false: enable debug mode
-dir="/tmp": input data directory to store volume data files
-fileNameFormat="{{.Mime}}/{{.Id}}:{{.Name}}": filename format, default to {{.Mime}}/{{.Id}}:{{.Name}}
-o="": output tar file name, must ends with .tar, or just a "-" for stdout
-volumeId=-1: a volume id. The volume should already exist in the dir. The volume index file should not exist.
Description:
List all files in a volume, or Export all files in a volume to a tar file if the output is specified. The format of file name in the tar file can be customized. Default is {{.Mime}}/{{.Id}}:{{.Name}}. Also available is {{.Key}}.

weed-fs参数列表的更多相关文章

  1. 在Python中使用可变长参数列表

    函数定义 在函数定义中使用*args和**kwargs传递可变长参数. *args用作传递非命名键值可变长参数列表(位置参数); **kwargs用作传递键值可变长参数列表 函数调用 在调用函数时,使 ...

  2. 可变参数列表与printf()函数的实现

    问题 当我们刚开始学习C语言的时候,就接触到printf()函数,可是当时"道行"不深或许不够细心留意,又或者我们理所当然地认为库函数规定这样就是这样,没有发现这个函数与普通的函数 ...

  3. Qt中新建类构造函数的初始化参数列表

    使用Qt-creator自动生成一个窗体应用程序时会自动创建一个新的类,我的程序中名为MyDialog,类的定义为: #ifndef MYDIALOG_H #define MYDIALOG_H #in ...

  4. c#基础之长度可变类型相同的参数列表

    为了简化编码,c#提供了一个特殊的关键字params,允许在调用方法时提供数量可变的实参,而不是由方法实现固定好的形参数量.先看代码吧. using System; using System.Linq ...

  5. Java 可变参数列表

    1.可变参数列表的简单实现 当调用方法时,方法的参数个数或类型未知时,称其为可变参数列表.在以前的Java代码中,可以使用Object数组来实现这样的功能.因为,所有的类都是直接或间接继承于Objec ...

  6. java如何得到GET和POST请求URL和参数列表(转)

    在servlet中GET请求可以通过HttpServletRequest的getRequestURL方法和getQueryString()得到完整的请求路径和请求所有参数列表,POST的需要getPa ...

  7. arm上的参数列表传递的分析(以android为例)

    1. Linux中可变列表实现的源码分析 查看Linux0.11的内核源代码,对va_list, va_start, va_arg 的实现如下: va_list的实现没有差别,chartypedef ...

  8. SQL获取所有数据库名、表名、储存过程以及参数列表

    SQL获取所有数据库名.表名.储存过程以及参数列表 1.获取所有用户名:SELECT name FROM Sysusers where status='2' and islogin='1'islogi ...

  9. PHP函数可变参数列表的具体实现方法介绍

    PHP函数可变参数列表可以通过_get_args().func_num_args().func_get_arg()这三个函数来实现.我们下面就对此做了详细的介绍. AD:2014WOT全球软件技术峰会 ...

  10. 代码坏味道特别篇————Long parameter List 过长的参数列表

    刚开始学习编程时,老师说:讲方法所需要的东西都以参数的形式传入,那是我们好像还没学OO这个东东,要不就弄成全局变量,我擦,全局变量可牛逼了,刚开始学习的时候我们都在用全局变量,可是后来工作了,经理说不 ...

随机推荐

  1. 初试微信小程序

    2016年11月3日,微信小程序终于公测了,大家可以正式开发了.早在这之前,应公司要求,和同事就早早的试了一下微信小程序的开发,特此记录一下: 微信官方小程序文档:https://mp.weixin. ...

  2. import和from import陷阱二

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 #from os import path import os.path path='/home/vamei/doc/file.txt' ...

  3. C#与XML Schema的问题

    http://bbs.csdn.net/topics/50493564 weileily: 用XmlSchema.Read方法读取了一个xsd文件,请问如何遍历检索器中的ComplexType与Sim ...

  4. ubuntu14.04 安装 bcm43142无线网卡

    thinkpad e430c 在安装ubuntu14.04时无法识别无线网卡 用命令lspci 查看无线网卡类型 然后下载对应的无线网卡驱动. 之后,使用下列命令安装,即可搜索无线热点了: sudo ...

  5. H5版俄罗斯方块(1)---需求分析和目标创新

    前言: 俄罗斯方块和五子棋一样, 规则简单, 上手容易. 几乎每个开发者, 都会在其青春年华时, 签下"xx到此一游". 犹记得大一老师在布置大程作业的时候提过: "什么 ...

  6. SIFT特征提取分析(转载)

    转载自: http://blog.csdn.net/abcjennifer/article/details/7639681 SIFT(Scale-invariant feature transform ...

  7. Android Studio Lint 自动检查清除冗余资源

    (Android Lint) 辛苦的花了很长的周期 做完了项目. 但是打包完发现 APK 的大小让你瞠目结舌 是不是甚至连自己不知道哪里拷贝过来了代码 和 代码相关的布局文件 资源等, 哪些被使用 哪 ...

  8. 黑马程序员——JAVA基础之正则表达式,网络爬虫

    ------Java培训.Android培训.iOS培训..Net培训.期待与您交流! ------- 正则表达式: 概念:用于操作字符串的符合一定规则的表达式 特点:用于一些特定的符号来表示一些代码 ...

  9. zend guard6的使用

    1.生成key edit->preferences->license Keys->generate 2.新建product license文件 3.新建Zend Guard项目文件 ...

  10. 用Sublime Text搭建简易IDE编写Verilog代码

    前言 Verilog是一种硬件描述语言(HDL),该语言在Windows上有集成开发环境可以使用,如ModelSim,但ModelSim的编辑器不太好用因此笔者萌生了用Sublime Text3来编写 ...