1. # 该配置文件是否生效
  2. # false:生效
  3. # true:无效
  4. disabled=false
  5. # 本storage server所属组名
  6. group_name=group1
  7. # 绑定IP
  8. # 后面为绑定的IP地址 (常用于服务器有多个IP但只希望一个IP提供服务)。
  9. # 如果不填则表示所有的(一般不填就OK),相信较熟练的SA都常用到类似功能,
  10. # 很多系统和应用都有
  11. bind_addr=
  12. # bind_addr通常是针对server的。当指定bind_addr时,本参数才有效。
  13. # 本storage server作为client连接其他服务器(如tracker server、其他storage server),是否绑定bind_addr。
  14. # if bind an address of this host when connect to other servers
  15. # (this storage server as a client)
  16. # true for binding the address configed by above parameter: "bind_addr"
  17. # false for binding any address of this host
  18. client_bind=true
  19. # storage server服务端口
  20. port=23000
  21. # 连接超时(秒)
  22. # 默认值 30s
  23. connect_timeout=30
  24. # 网络超时(秒)
  25. # 默认值 30s
  26. network_timeout=60
  27. # 心跳间隔时间,单位为秒 (这里是指主动向tracker server 发送心跳)
  28. heart_beat_interval=30
  29. # storage server向tracker server报告磁盘剩余空间的时间间隔,单位为秒。
  30. stat_report_interval=60
  31. # base_path目录地址,根目录必须存在子目录会自动生成
  32. # 注 :这里不是上传的文件存放的地址,之前是的,在某个版本后更改了
  33. base_path=/home/yuqing/fastdfs
  34. # 最大连接数
  35. # default value is 256
  36. # more max_connections means more memory will be used
  37. max_connections=256
  38. # the buff size to recv / send data
  39. # 该参数必须大于8KB
  40. # 默认值是64KB
  41. # since V2.00
  42. buff_size = 256KB
  43. # w线程数,通常设置CPU数,值 <= 最大连接数
  44. # 默认值 4
  45. # since V2.00
  46. work_threads=4
  47. # V2.09引入本参数。设置为true,表示不使用操作系统的文件内容缓冲特性。
  48. # 如果文件数量很多,且访问很分散,可以考虑将本参数设置为true
  49. # if read / write file directly
  50. # if set to true, open file will add the O_DIRECT flag to avoid file caching
  51. # by the file system. be careful to set this parameter.
  52. # default value is false
  53. disk_rw_direct = false
  54. # 磁盘IO读写是否分离,缺省是分离的。
  55. # if disk read / write separated
  56. ## false for mixed read and write
  57. ## true for separated read and write
  58. # default value is true
  59. # since V2.00
  60. disk_rw_separated = true
  61. # 针对单个存储路径的读线程数,缺省值为1。
  62. # 读写分离时,系统中的读线程数 = disk_reader_threads * store_path_count
  63. # 读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) * store_path_count
  64. # disk reader thread count per store base path
  65. # for mixed read / write, this parameter can be 0
  66. # default value is 1
  67. # since V2.00
  68. disk_reader_threads = 1
  69. # 针对单个存储路径的写线程数,缺省值为1。
  70. # 读写分离时,系统中的写线程数 = disk_writer_threads * store_path_count
  71. # 读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) * store_path_count
  72. # disk writer thread count per store base path
  73. # for mixed read / write, this parameter can be 0
  74. # default value is 1
  75. # since V2.00
  76. disk_writer_threads = 1
  77. # 同步文件时,如果从binlog中没有读到要同步的文件,休眠N毫秒后重新读取。0表示不休眠,立即再次尝试读取。
  78. # 出于CPU消耗考虑,不建议设置为0。如何希望同步尽可能快一些,可以将本参数设置得小一些,比如设置为10ms
  79. # when no entry to sync, try read binlog again after X milliseconds
  80. # must > 0, default value is 200ms
  81. sync_wait_msec=50
  82. # 同步上一个文件后,再同步下一个文件的时间间隔,单位为毫秒,0表示不休眠,直接同步下一个文件
  83. # after sync a file, usleep milliseconds
  84. # 0 for sync successively (never call usleep)
  85. sync_interval=0
  86. # 允许系统同步的时间开始时间段 (默认是全天) 一般用于避免高峰同步产生一些问题而设定
  87. # storage sync start time of a day, time format: Hour:Minute
  88. # Hour from 0 to 23, Minute from 0 to 59
  89. sync_start_time=00:00
  90. # 允许系统同步的时间结束时间段 (默认是全天) 一般用于避免高峰同步产生一些问题而设定
  91. # storage sync end time of a day, time format: Hour:Minute
  92. # Hour from 0 to 23, Minute from 0 to 59
  93. sync_end_time=23:59
  94. # 同步完N个文件后,把storage的mark文件同步到磁盘
  95. # 注:如果mark文件内容没有变化,则不会同步
  96. # write to the mark file after sync N files
  97. # default value is 500
  98. write_mark_file_freq=500
  99. # 存放文件时storage server支持多个路径(例如磁盘)。这里配置存放文件的基路径数目,通常只配一个目录
  100. # path(disk or mount point) count, default value is 1
  101. store_path_count=1
  102. # 逐一配置store_path个路径,索引号基于0。注意配置方法后面有0,1,2 ......,需要配置0到store_path - 1。
  103. # 如果不配置base_path0,那边它就和base_path对应的路径一样。
  104. # store_path#, based 0, if store_path0 not exists, it's value is base_path
  105. # the paths must be exist
  106. store_path0=/home/yuqing/fastdfs
  107. #store_path1=/home/yuqing/fastdfs2
  108. # FastDFS存储文件时,采用了两级目录。这里配置存放文件的目录个数 (系统的存储机制,大家看看文件存储的目录就知道了)
  109. # 如果本参数只为N(如:256),那么storage server在初次运行时,会自动创建 N * N 个存放文件的子目录
  110. # subdir_count * subdir_count directories will be auto created under each
  111. # store_path (disk), value can be 1 to 256, default value is 256
  112. subdir_count_per_path=256
  113. # tracker_server 的列表 要写端口的哦 (再次提醒是主动连接tracker_server )
  114. # 有多个tracker server时,每个tracker server写一行
  115. # tracker_server can ocur more than once, and tracker_server format is
  116. # "host:port", host can be hostname or ip address
  117. tracker_server=10.0.14.145:22122
  118. #tracker_server=10.0.14.93:22122
  119. # 日志级别
  120. #standard log level as syslog, case insensitive, value list:
  121. ### emerg for emergency
  122. ### alert
  123. ### crit for critical
  124. ### error
  125. ### warn for warning
  126. ### notice
  127. ### info
  128. ### debug
  129. log_level=info
  130. # 指定运行该程序的用户组(不填 就是当前用户组,哪个启动进程就是哪个)
  131. run_by_group=
  132. # 操作系统运行FastDFS的用户 (不填 就是当前用户,哪个启动进程就是哪个)
  133. run_by_user=
  134. # 可以连接到此 tracker server 的ip范围(对所有类型的连接都有影响,包括客户端,storage server)
  135. # "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
  136. # host[01-08,20-25].domain.com, for example:
  137. # allow_hosts=10.0.1.[1-15,20]
  138. # allow_hosts=host[01-08,20-25].domain.com
  139. allow_hosts=*
  140. # 0: 轮流存放,在一个目录下存储设置的文件数后(参数file_distribute_rotate_count中设置文件数),使用下一个目录进行存储。
  141. # 1: 随机存储,根据文件名对应的hash code来分散存储。
  142. # the mode of the files distributed to the data path
  143. # 0: round robin(default)
  144. # 1: random, distributted by hash code
  145. file_distribute_path_mode=0
  146. # 当上面的参数file_distribute_path_mode配置为0(轮流存放方式)时,本参数有效。
  147. # 当一个目录下的文件存放的文件数达到本参数值时,后续上传的文件存储到下一个目录中。
  148. # default value is 100
  149. file_distribute_rotate_count=100
  150. # 当写入大文件时,每写入N个字节,调用一次系统函数fsync将内容强行同步到硬盘。0表示从不调用fsync
  151. # call fsync to disk when write big file
  152. # 0: never call fsync
  153. # other: call fsync when written bytes >= this bytes
  154. # default value is 0 (never call fsync)
  155. fsync_after_written_bytes=0
  156. # 同步或刷新日志信息到硬盘的时间间隔,单位为秒
  157. # 注意:storage server 的日志信息不是时时写硬盘的,而是先写内存。
  158. # must > 0, default value is 10 seconds
  159. sync_log_buff_interval=10
  160. # 同步binglog(更新操作日志)到硬盘的时间间隔,单位为秒
  161. # 本参数会影响新上传文件同步延迟时间
  162. # sync binlog buff / cache to disk every interval seconds
  163. # default value is 60 seconds
  164. sync_binlog_buff_interval=10
  165. # 把storage的stat文件同步到磁盘的时间间隔,单位为秒。
  166. # 注:如果stat文件内容没有变化,不会进行同步
  167. # sync storage stat info to disk every interval seconds
  168. # default value is 300 seconds
  169. sync_stat_file_interval=300
  170. # 线程栈的大小。FastDFS server端采用了线程方式。
  171. # 对于V1.x,storage server线程栈不应小于512KB;对于V2.0,线程栈大于等于128KB即可。
  172. # 线程栈越大,一个线程占用的系统资源就越多。
  173. # 对于V1.x,如果要启动更多的线程(max_connections),可以适当降低本参数值。
  174. # thread stack size, should >= 512KB
  175. # default value is 512KB
  176. thread_stack_size=512KB
  177. # 本storage server作为源服务器,上传文件的优先级,可以为负数。值越小,优先级越高。
  178. # 这里就和 tracker.conf 中store_server= 2时的配置相对应了
  179. # the priority as a source server for uploading file.
  180. # the lower this value, the higher its uploading priority.
  181. # default value is 10
  182. upload_priority=10
  183. # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
  184. # multi aliases split by comma. empty value means auto set by OS type
  185. # default values is empty
  186. if_alias_prefix=
  187. # 是否检测上传文件已经存在。如果已经存在,则不存文件内容,建立一个符号链接以节省磁盘空间。
  188. # 这个应用要配合FastDHT 使用,所以打开前要先安装FastDHT
  189. # 1或yes 是检测,0或no 是不检测
  190. # if check file duplicate, when set to true, use FastDHT to store file indexes
  191. # 1 or yes: need check
  192. # 0 or no: do not check
  193. # default value is 0
  194. check_file_duplicate=0
  195. # 文件去重时,文件内容的签名方式:
  196. ## hash: 4个hash code
  197. ## md5:MD5
  198. # file signature method for check file duplicate
  199. ## hash: four 32 bits hash code
  200. ## md5: MD5 signature
  201. # default value is hash
  202. # since V4.01
  203. file_signature_method=hash
  204. # 当参数check_file_duplicate设定为1 或 yes时 (true/on也是可以的) , 在FastDHT中的命名空间。
  205. # namespace for storing file indexes (key-value pairs)
  206. # this item must be set when check_file_duplicate is true / on
  207. key_namespace=FastDFS
  208. # 与FastDHT servers 的连接方式 (是否为持久连接) ,默认是0(短连接方式)。
  209. # 可以考虑使用长连接,这要看FastDHT server的连接数是否够用。
  210. # set keep_alive to 1 to enable persistent connection with FastDHT servers
  211. # default value is 0 (short connection)
  212. keep_alive=0
  213. # 可以通过 #include filename 方式来加载 FastDHT servers 的配置,装上FastDHT就知道该如何配置啦。
  214. # 同样要求 check_file_duplicate=1 时才有用,不然系统会忽略
  215. # fdht_servers.conf 记载的是 FastDHT servers 列表
  216. # you can use "#include filename" (not include double quotes) directive to
  217. # load FastDHT server list, when the filename is a relative path such as
  218. # pure filename, the base path is the base path of current/this config file.
  219. # must set FastDHT server list when check_file_duplicate is true / on
  220. # please see INSTALL of FastDHT for detail
  221. ##include /home/yuqing/fastdht/conf/fdht_servers.conf
  222. # 是否将文件操作记录到access log
  223. # if log to access log
  224. # default value is false
  225. # since V4.00
  226. use_access_log = false
  227. # 是否定期轮转access log,目前仅支持一天轮转一次
  228. # if rotate the access log every day
  229. # default value is false
  230. # since V4.00
  231. rotate_access_log = false
  232. # access log定期轮转的时间点,只有当rotate_access_log设置为true时有效
  233. # rotate access log time base, time format: Hour:Minute
  234. # Hour from 0 to 23, Minute from 0 to 59
  235. # default value is 00:00
  236. # since V4.00
  237. access_log_rotate_time=00:00
  238. # 是否定期轮转error log,目前仅支持一天轮转一次
  239. # if rotate the error log every day
  240. # default value is false
  241. # since V4.02
  242. rotate_error_log = false
  243. # error log定期轮转的时间点,只有当rotate_error_log设置为true时有效
  244. # rotate error log time base, time format: Hour:Minute
  245. # Hour from 0 to 23, Minute from 0 to 59
  246. # default value is 00:00
  247. # since V4.02
  248. error_log_rotate_time=00:00
  249. # access log按文件大小轮转
  250. # 设置为0表示不按文件大小轮转,否则当access log达到该大小,就会轮转到新文件中
  251. # rotate access log when the log file exceeds this size
  252. # 0 means never rotates log file by log file size
  253. # default value is 0
  254. # since V4.02
  255. rotate_access_log_size = 0
  256. # error log按文件大小轮转
  257. # 设置为0表示不按文件大小轮转,否则当error log达到该大小,就会轮转到新文件中
  258. # rotate error log when the log file exceeds this size
  259. # 0 means never rotates log file by log file size
  260. # default value is 0
  261. # since V4.02
  262. rotate_error_log_size = 0
  263. # 文件同步的时候,是否忽略无效的binlog记录
  264. # if skip the invalid record when sync file
  265. # default value is false
  266. # since V4.02
  267. file_sync_skip_invalid_record=false
  268. # 是否使用连接池
  269. # default value is false
  270. # since V4.05
  271. use_connection_pool = false
  272. # 连接的空闲时间超过这个时间将被关闭,单位:秒
  273. # default value is 3600
  274. # since V4.05
  275. connection_pool_max_idle_time = 3600
  276. # 下面是http的配置了。如果系统较大,这个服务有可能支持不了,可以自行换一个webserver,我喜欢lighttpd,当然ng也很好了。
  277. # HTTP是否生效
  278. # true 失效
  279. # false 生效
  280. http.disabled=false
  281. # Web服务器的这个存储服务器上的端口
  282. # the port of the web server on this storage server
  283. http.server_port=8888
  284. # http.trunk_size表示读取文件内容的buffer大小(一次读取的文件内容大小),也就是回复给HTTP client的块大小。
  285. http.trunk_size=256KB
  286. # storage server上web server域名,通常仅针对单独部署的web server。这样URL中就可以通过域名方式来访问storage server上的文件了,
  287. # 这个参数为空就是IP地址的方式。
  288. # use the ip address of this storage server if domain_name is empty,
  289. # else this domain name will ocur in the url redirected by the tracker server
  290. http.domain_name=
  291. # HTTP服务的其他配置文件
  292. #include http.conf

FastDFS配置文件(storage.conf)的更多相关文章

  1. FastDFS 配置文件 storage.conf

    FastDFS 版本5.05 配置文件分为三部分   控制器:tracker.conf存储器:storage.conf 客户端:client.conf 文件位置:/etc/fdfsstorage.co ...

  2. FastDFS 配置文件 client.conf storage_ids.conf

    client.conf : # connect timeout in seconds # default value is 30s connect_timeout=30              连接 ...

  3. FastDFS 配置文件 tracker.conf

    FastDFS 版本5.05 配置文件分为三部分   控制器:tracker.conf存储器:storage.conf 客户端:client.conf 文件位置:/etc/fdfs 基本配置(基础配置 ...

  4. FastDFS配置文件(tracker.conf)

    # ===========================基本配置==================================== # 该配置文件是否生效 # false:生效 # true: ...

  5. fastDFS配置文件 fdfs_client.conf

    # connect timeout in seconds# default value is 30sconnect_timeout=30 # network timeout in seconds# d ...

  6. 配置nginx为FastDFS的storage server提供http访问接口

    1.拉取模块代码 # git clone https://github.com/happyfish100/fastdfs-nginx-module.git 2.编译安装nginx,添加支持fastdf ...

  7. 分布式文件存储FastDFS(七)FastDFS配置文件具体解释

    配置FastDFS时.改动配置文件是非常重要的一个步骤,理解配置文件里每一项的意义更加重要,所以我參考了大神的帖子,整理了配置文件的解释.原帖例如以下:http://bbs.chinaunix.net ...

  8. (转) 分布式文件存储FastDFS(七)FastDFS配置文件详解

    http://blog.csdn.net/xingjiarong/article/details/50752586 配置FastDFS时,修改配置文件是很重要的一个步骤,理解配置文件中每一项的意义更加 ...

  9. docker安装fastdfs碰到storage的IP地址映射宿主地址问题

    一.概述 最近公司准备全面实施docker部署,解决每次项目实施安装部署环境工作量大问题,mysql5.7.oracle12c很顺利,在安装fastdfs时碰到storage的IP地址映射问题.服务器 ...

随机推荐

  1. 软件工程 speedsnail 第二次冲刺8

    20150525 完成任务:障碍物整体设计,实现一页多次布局: 遇到问题: 问题1 与现有资源冲突 解决1 未解决 明日任务: 蜗牛碰到线后速度方向的调整:(做优化)

  2. iOS中UIKit——UIFont得到iOS设备上的系统字体

    for (NSString *fontFamily  in [UIFont familyNames]) { NSLog(@"字体家族是:%@",fontFamily); for(N ...

  3. [leetcode]_Remove Nth Node From End of List

    题目:移除linked-list从尾到头的第N个元素 自我思路:因为题目给出的N是从链表尾开始计算的,单链表不存在从子指向父亲的反向指针,因此我先计算链表的整个长度len,然后用len - N来表示正 ...

  4. 单个input框上传多个文件操作

    HTML页面: <div class="form-group thumb"> <label class="control-label col-xs-12 ...

  5. python 解析XML python模块xml.dom解析xml实例代码

    分享下python中使用模块xml.dom解析xml文件的实例代码,学习下python解析xml文件的方法. 原文转自:http://www.jbxue.com/article/16587.html ...

  6. PHP JS HTML ASP页面跳转代码 延时跳转代码

    1.PHP延时跳转代码 //跳转到浏览界面 header("Refresh:1;url=machine_list.php"); //不延时 <?php header(&quo ...

  7. 小课堂week13 Clean Code Part2

    Clean Code Part2 对象与数据结构 首先让我们进行一个严肃的思考,对象与数据结构的区别在哪里? 如下两段代码分别用数据结构和对象的方法来描述了一个Point. public class ...

  8. python 核心编程第二版 课后习题 第11章

    11-3 函数.在这个练习中,我们将实现 max()和 min()内建函数. (a) 写分别带两个元素返回一个较大和较小元素,简单的 max2()核 min2()函数.他们应该可以用任意的 pytho ...

  9. oracle 查看隐含参数脚本

    set linesize 132 column name format a30 column value format a25 select x.ksppinm name, y.ksppstvl va ...

  10. hdu 4324 Triangle LOVE

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4324 Triangle LOVE Description Recently, scientists f ...