1# is this config file disabled
2# false for enabled
3# true for disabled
4disabled = false
5
6# the name of the group this storage server belongs to
7#
8# comment or remove this item for fetching from tracker server,
9# in this case, use_storage_id must set to true in tracker.conf,
10# and storage_ids.conf must be configured correctly.
11group_name = group1
12
13# bind an address of this host
14# empty for bind all addresses of this host
15bind_addr =
16
17# if bind an address of this host when connect to other servers
18# (this storage server as a client)
19# true for binding the address configured by the above parameter: "bind_addr"
20# false for binding any address of this host
21client_bind = true
22
23# the storage server port
24port = 23000
25
26# connect timeout in seconds
27# default value is 30
28# Note: in the intranet network (LAN), 2 seconds is enough.
29connect_timeout = 5
30
31# network timeout in seconds for send and recv
32# default value is 30
33network_timeout = 60
34
35# the heart beat interval in seconds
36# the storage server send heartbeat to tracker server periodically
37# default value is 30
38heart_beat_interval = 30
39
40# disk usage report interval in seconds
41# the storage server send disk usage report to tracker server periodically
42# default value is 300
43stat_report_interval = 60
44
45# the base path to store data and log files
46# NOTE: the binlog files maybe are large, make sure
47#       the base path has enough disk space,
48#       eg. the disk free space should > 50GB
49base_path = /var/db/fastdfs/storage
50
51# max concurrent connections the server supported,
52# you should set this parameter larger, eg. 10240
53# default value is 256
54max_connections = 1024
55
56# the buff size to recv / send data from/to network
57# this parameter must more than 8KB
58# 256KB or 512KB is recommended
59# default value is 64KB
60# since V2.00
61buff_size = 256KB
62
63# accept thread count
64# default value is 1 which is recommended
65# since V4.07
66accept_threads = 1
67
68# work thread count
69# work threads to deal network io
70# default value is 4
71# since V2.00
72work_threads = 4
73
74# if disk read / write separated
75##  false for mixed read and write
76##  true for separated read and write
77# default value is true
78# since V2.00
79disk_rw_separated = true
80
81# disk reader thread count per store path
82# for mixed read / write, this parameter can be 0
83# default value is 1
84# since V2.00
85disk_reader_threads = 1
86
87# disk writer thread count per store path
88# for mixed read / write, this parameter can be 0
89# default value is 1
90# since V2.00
91disk_writer_threads = 1
92
93# when no entry to sync, try read binlog again after X milliseconds
94# must > 0, default value is 200ms
95sync_wait_msec = 50
96
97# after sync a file, usleep milliseconds
98# 0 for sync successively (never call usleep)
99sync_interval = 0
100
101# storage sync start time of a day, time format: Hour:Minute
102# Hour from 0 to 23, Minute from 0 to 59
103sync_start_time = 00:00
104
105# storage sync end time of a day, time format: Hour:Minute
106# Hour from 0 to 23, Minute from 0 to 59
107sync_end_time = 23:59
108
109# write to the mark file after sync N files
110# default value is 500
111write_mark_file_freq = 500
112
113# disk recovery thread count
114# default value is 1
115# since V6.04
116disk_recovery_threads = 3
117
118# store path (disk or mount point) count, default value is 1
119store_path_count = 1
120
121# store_path#, based on 0, to configure the store paths to store files
122# if store_path0 not exists, it's value is base_path (NOT recommended)
123# the paths must be exist.
124#
125# IMPORTANT NOTE:
126#       the store paths' order is very important, don't mess up!!!
127#       the base_path should be independent (different) of the store paths
128
129store_path0 = /var/db/fastdfs/storage
130#store_path1 = /var/db/fastdfs/storage2
131
132# subdir_count  * subdir_count directories will be auto created under each
133# store_path (disk), value can be 1 to 256, default value is 256
134subdir_count_per_path = 256
135
136# tracker_server can ocur more than once for multi tracker servers.
137# the value format of tracker_server is "HOST:PORT",
138#   the HOST can be hostname or ip address,
139#   and the HOST can be dual IPs or hostnames seperated by comma,
140#   the dual IPS must be an inner (intranet) IP and an outer (extranet) IP,
141#   or two different types of inner (intranet) IPs.
142#   for example: 192.168.2.100,122.244.141.46:22122
143#   another eg.: 192.168.1.10,172.17.4.21:22122
144
145tracker_server = 192.168.209.121:22122
146tracker_server = 192.168.209.122:22122
147
148#standard log level as syslog, case insensitive, value list:
149### emerg for emergency
150### alert
151### crit for critical
152### error
153### warn for warning
154### notice
155### info
156### debug
157log_level = info
158
159#unix group name to run this program,
160#not set (empty) means run by the group of current user
161run_by_group = _fastdfs
162
163#unix username to run this program,
164#not set (empty) means run by current user
165run_by_user = _fastdfs
166
167# allow_hosts can ocur more than once, host can be hostname or ip address,
168# "*" (only one asterisk) means match all ip addresses
169# we can use CIDR ips like 192.168.5.64/26
170# and also use range like these: 10.0.1.[0-254] and host[01-08,20-25].domain.com
171# for example:
172# allow_hosts=10.0.1.[1-15,20]
173# allow_hosts=host[01-08,20-25].domain.com
174# allow_hosts=192.168.5.64/26
175allow_hosts = *
176
177# the mode of the files distributed to the data path
178# 0: round robin(default)
179# 1: random, distributted by hash code
180file_distribute_path_mode = 0
181
182# valid when file_distribute_to_path is set to 0 (round robin).
183# when the written file count reaches this number, then rotate to next path.
184# rotate to the first path (00/00) after the last path (such as FF/FF).
185# default value is 100
186file_distribute_rotate_count = 100
187
188# call fsync to disk when write big file
189# 0: never call fsync
190# other: call fsync when written bytes >= this bytes
191# default value is 0 (never call fsync)
192fsync_after_written_bytes = 0
193
194# sync log buff to disk every interval seconds
195# must > 0, default value is 10 seconds
196sync_log_buff_interval = 1
197
198# sync binlog buff / cache to disk every interval seconds
199# default value is 60 seconds
200sync_binlog_buff_interval = 1
201
202# sync storage stat info to disk every interval seconds
203# default value is 300 seconds
204sync_stat_file_interval = 300
205
206# thread stack size, should >= 512KB
207# default value is 512KB
208thread_stack_size = 512KB
209
210# the priority as a source server for uploading file.
211# the lower this value, the higher its uploading priority.
212# default value is 10
213upload_priority = 10
214
215# the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
216# multi aliases split by comma. empty value means auto set by OS type
217# default values is empty
218if_alias_prefix =
219
220# if check file duplicate, when set to true, use FastDHT to store file indexes
221# 1 or yes: need check
222# 0 or no: do not check
223# default value is 0
224check_file_duplicate = 0
225
226# file signature method for check file duplicate
227## hash: four 32 bits hash code
228## md5: MD5 signature
229# default value is hash
230# since V4.01
231file_signature_method = hash
232
233# namespace for storing file indexes (key-value pairs)
234# this item must be set when check_file_duplicate is true / on
235key_namespace = FastDFS
236
237# set keep_alive to 1 to enable persistent connection with FastDHT servers
238# default value is 0 (short connection)
239keep_alive = 0
240
241# you can use "#include filename" (not include double quotes) directive to
242# load FastDHT server list, when the filename is a relative path such as
243# pure filename, the base path is the base path of current/this config file.
244# must set FastDHT server list when check_file_duplicate is true / on
245# please see INSTALL of FastDHT for detail
246##include /home/yuqing/fastdht/conf/fdht_servers.conf
247
248# if log to access log
249# default value is false
250# since V4.00
251use_access_log = false
252
253# if rotate the access log every day
254# default value is false
255# since V4.00
256rotate_access_log = false
257
258# rotate access log time base, time format: Hour:Minute
259# Hour from 0 to 23, Minute from 0 to 59
260# default value is 00:00
261# since V4.00
262access_log_rotate_time = 00:00
263
264# if compress the old access log by gzip
265# default value is false
266# since V6.04
267compress_old_access_log = false
268
269# compress the access log days before
270# default value is 1
271# since V6.04
272compress_access_log_days_before = 7
273
274# if rotate the error log every day
275# default value is false
276# since V4.02
277rotate_error_log = false
278
279# rotate error log time base, time format: Hour:Minute
280# Hour from 0 to 23, Minute from 0 to 59
281# default value is 00:00
282# since V4.02
283error_log_rotate_time = 00:00
284
285# if compress the old error log by gzip
286# default value is false
287# since V6.04
288compress_old_error_log = false
289
290# compress the error log days before
291# default value is 1
292# since V6.04
293compress_error_log_days_before = 7
294
295# rotate access log when the log file exceeds this size
296# 0 means never rotates log file by log file size
297# default value is 0
298# since V4.02
299rotate_access_log_size = 0
300
301# rotate error log when the log file exceeds this size
302# 0 means never rotates log file by log file size
303# default value is 0
304# since V4.02
305rotate_error_log_size = 0
306
307# keep days of the log files
308# 0 means do not delete old log files
309# default value is 0
310log_file_keep_days = 0
311
312# if skip the invalid record when sync file
313# default value is false
314# since V4.02
315file_sync_skip_invalid_record = false
316
317# if use connection pool
318# default value is false
319# since V4.05
320use_connection_pool = true
321
322# connections whose the idle time exceeds this time will be closed
323# unit: second
324# default value is 3600
325# since V4.05
326connection_pool_max_idle_time = 3600
327
328# if compress the binlog files by gzip
329# default value is false
330# since V6.01
331compress_binlog = true
332
333# try to compress binlog time, time format: Hour:Minute
334# Hour from 0 to 23, Minute from 0 to 59
335# default value is 01:30
336# since V6.01
337compress_binlog_time = 01:30
338
339# if check the mark of store path to prevent confusion
340# recommend to set this parameter to true
341# if two storage servers (instances) MUST use a same store path for
342# some specific purposes, you should set this parameter to false
343# default value is true
344# since V6.03
345check_store_path_mark = true
346
347# use the ip address of this storage server if domain_name is empty,
348# else this domain name will ocur in the url redirected by the tracker server
349http.domain_name =
350
351# the port of the web server on this storage server
352http.server_port = 8888
353
354