storage.conf 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. # is this config file disabled
  2. # false for enabled
  3. # true for disabled
  4. disabled=false
  5. # the name of the group this storage server belongs to
  6. #
  7. # comment or remove this item for fetching from tracker server,
  8. # in this case, use_storage_id must set to true in tracker.conf,
  9. # and storage_ids.conf must be configed correctly.
  10. group_name=group1
  11. # bind an address of this host
  12. # empty for bind all addresses of this host
  13. 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. # the storage server port
  20. port=23000
  21. # connect timeout in seconds
  22. # default value is 30s
  23. connect_timeout=30
  24. # network timeout in seconds
  25. # default value is 30s
  26. network_timeout=60
  27. # heart beat interval in seconds
  28. heart_beat_interval=30
  29. # disk usage report interval in seconds
  30. stat_report_interval=60
  31. # the base path to store data and log files
  32. base_path=/var/fdfs
  33. # max concurrent connections the server supported
  34. # default value is 256
  35. # more max_connections means more memory will be used
  36. max_connections=256
  37. # the buff size to recv / send data
  38. # this parameter must more than 8KB
  39. # default value is 64KB
  40. # since V2.00
  41. buff_size = 256KB
  42. # accept thread count
  43. # default value is 1
  44. # since V4.07
  45. accept_threads=1
  46. # work thread count, should <= max_connections
  47. # work thread deal network io
  48. # default value is 4
  49. # since V2.00
  50. work_threads=4
  51. # if disk read / write separated
  52. ## false for mixed read and write
  53. ## true for separated read and write
  54. # default value is true
  55. # since V2.00
  56. disk_rw_separated = true
  57. # disk reader thread count per store base path
  58. # for mixed read / write, this parameter can be 0
  59. # default value is 1
  60. # since V2.00
  61. disk_reader_threads = 1
  62. # disk writer thread count per store base path
  63. # for mixed read / write, this parameter can be 0
  64. # default value is 1
  65. # since V2.00
  66. disk_writer_threads = 1
  67. # when no entry to sync, try read binlog again after X milliseconds
  68. # must > 0, default value is 200ms
  69. sync_wait_msec=50
  70. # after sync a file, usleep milliseconds
  71. # 0 for sync successively (never call usleep)
  72. sync_interval=0
  73. # storage sync start time of a day, time format: Hour:Minute
  74. # Hour from 0 to 23, Minute from 0 to 59
  75. sync_start_time=00:00
  76. # storage sync end time of a day, time format: Hour:Minute
  77. # Hour from 0 to 23, Minute from 0 to 59
  78. sync_end_time=23:59
  79. # write to the mark file after sync N files
  80. # default value is 500
  81. write_mark_file_freq=500
  82. # path(disk or mount point) count, default value is 1
  83. store_path_count=1
  84. # store_path#, based 0, if store_path0 not exists, it's value is base_path
  85. # the paths must be exist
  86. store_path0=/var/fdfs
  87. #store_path1=/var/fdfs2
  88. # subdir_count * subdir_count directories will be auto created under each
  89. # store_path (disk), value can be 1 to 256, default value is 256
  90. subdir_count_per_path=256
  91. # tracker_server can ocur more than once, and tracker_server format is
  92. # "host:port", host can be hostname or ip address
  93. tracker_server=192.168.209.121:22122
  94. #standard log level as syslog, case insensitive, value list:
  95. ### emerg for emergency
  96. ### alert
  97. ### crit for critical
  98. ### error
  99. ### warn for warning
  100. ### notice
  101. ### info
  102. ### debug
  103. log_level=info
  104. #unix group name to run this program,
  105. #not set (empty) means run by the group of current user
  106. run_by_group=
  107. #unix username to run this program,
  108. #not set (empty) means run by current user
  109. run_by_user=
  110. # allow_hosts can ocur more than once, host can be hostname or ip address,
  111. # "*" (only one asterisk) means match all ip addresses
  112. # we can use CIDR ips like 192.168.5.64/26
  113. # and also use range like these: 10.0.1.[0-254] and host[01-08,20-25].domain.com
  114. # for example:
  115. # allow_hosts=10.0.1.[1-15,20]
  116. # allow_hosts=host[01-08,20-25].domain.com
  117. # allow_hosts=192.168.5.64/26
  118. allow_hosts=*
  119. # the mode of the files distributed to the data path
  120. # 0: round robin(default)
  121. # 1: random, distributted by hash code
  122. file_distribute_path_mode=0
  123. # valid when file_distribute_to_path is set to 0 (round robin),
  124. # when the written file count reaches this number, then rotate to next path
  125. # default value is 100
  126. file_distribute_rotate_count=100
  127. # call fsync to disk when write big file
  128. # 0: never call fsync
  129. # other: call fsync when written bytes >= this bytes
  130. # default value is 0 (never call fsync)
  131. fsync_after_written_bytes=0
  132. # sync log buff to disk every interval seconds
  133. # must > 0, default value is 10 seconds
  134. sync_log_buff_interval=10
  135. # sync binlog buff / cache to disk every interval seconds
  136. # default value is 60 seconds
  137. sync_binlog_buff_interval=10
  138. # sync storage stat info to disk every interval seconds
  139. # default value is 300 seconds
  140. sync_stat_file_interval=300
  141. # thread stack size, should >= 512KB
  142. # default value is 512KB
  143. thread_stack_size=512KB
  144. # the priority as a source server for uploading file.
  145. # the lower this value, the higher its uploading priority.
  146. # default value is 10
  147. upload_priority=10
  148. # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
  149. # multi aliases split by comma. empty value means auto set by OS type
  150. # default values is empty
  151. if_alias_prefix=
  152. # if check file duplicate, when set to true, use FastDHT to store file indexes
  153. # 1 or yes: need check
  154. # 0 or no: do not check
  155. # default value is 0
  156. check_file_duplicate=0
  157. # file signature method for check file duplicate
  158. ## hash: four 32 bits hash code
  159. ## md5: MD5 signature
  160. # default value is hash
  161. # since V4.01
  162. file_signature_method=hash
  163. # namespace for storing file indexes (key-value pairs)
  164. # this item must be set when check_file_duplicate is true / on
  165. key_namespace=FastDFS
  166. # set keep_alive to 1 to enable persistent connection with FastDHT servers
  167. # default value is 0 (short connection)
  168. keep_alive=0
  169. # you can use "#include filename" (not include double quotes) directive to
  170. # load FastDHT server list, when the filename is a relative path such as
  171. # pure filename, the base path is the base path of current/this config file.
  172. # must set FastDHT server list when check_file_duplicate is true / on
  173. # please see INSTALL of FastDHT for detail
  174. ##include /home/yuqing/fastdht/conf/fdht_servers.conf
  175. # if log to access log
  176. # default value is false
  177. # since V4.00
  178. use_access_log = false
  179. # if rotate the access log every day
  180. # default value is false
  181. # since V4.00
  182. rotate_access_log = false
  183. # rotate access log time base, time format: Hour:Minute
  184. # Hour from 0 to 23, Minute from 0 to 59
  185. # default value is 00:00
  186. # since V4.00
  187. access_log_rotate_time=00:00
  188. # if rotate the error log every day
  189. # default value is false
  190. # since V4.02
  191. rotate_error_log = false
  192. # rotate error log time base, time format: Hour:Minute
  193. # Hour from 0 to 23, Minute from 0 to 59
  194. # default value is 00:00
  195. # since V4.02
  196. error_log_rotate_time=00:00
  197. # rotate access log when the log file exceeds this size
  198. # 0 means never rotates log file by log file size
  199. # default value is 0
  200. # since V4.02
  201. rotate_access_log_size = 0
  202. # rotate error log when the log file exceeds this size
  203. # 0 means never rotates log file by log file size
  204. # default value is 0
  205. # since V4.02
  206. rotate_error_log_size = 0
  207. # keep days of the log files
  208. # 0 means do not delete old log files
  209. # default value is 0
  210. log_file_keep_days = 0
  211. # if skip the invalid record when sync file
  212. # default value is false
  213. # since V4.02
  214. file_sync_skip_invalid_record=false
  215. # if use connection pool
  216. # default value is false
  217. # since V4.05
  218. use_connection_pool = false
  219. # connections whose the idle time exceeds this time will be closed
  220. # unit: second
  221. # default value is 3600
  222. # since V4.05
  223. connection_pool_max_idle_time = 3600
  224. # use the ip address of this storage server if domain_name is empty,
  225. # else this domain name will ocur in the url redirected by the tracker server
  226. http.domain_name=
  227. # the port of the web server on this storage server
  228. http.server_port=8888