没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
首先是 tracker.conf
# is this config file disabled
# false for enabled
# true for disabled
disabled=false
# 这个配置文件是否不生效,呵呵(改成是否生效是不是会让人感觉好点呢?) false 为生效(否
则不生效) true 反之
# bind an address of this host
# empty for bind all addresses of this host
bind_addr=
# 是否绑定 IP,
# bind_addr= 后面为绑定的 IP 地址 (常用于服务器有多个 IP 但只希望一个 IP 提供服务)。如
果不填则表示所有的(一般不填就 OK),相信较熟练的 SA 都常用到类似功能,很多系统和应用
都有
# the tracker server port
port=22122
# 提供服务的端口,不作过多解释了
# connect timeout in seconds
# default value is 30s
connect_timeout=30
#连接超时时间,针对 socket 套接字函数 connect
# network timeout in seconds
network_timeout=60
# tracker server 的网络超时,单位为秒。发送或接收数据时,如果在超时时间后还不能发
送或接收数据,则本次网络通信失败。
# the base path to store data and log files
base_path=/home/yuqing/fastdfs
# base_path 目录地址(根目录必须存在,子目录会自动创建)
# 附目录说明:
tracker server 目录及文件结构:
${base_path}
|__data
| |__storage_groups.dat:存储分组信息
| |__storage_servers.dat:存储服务器列表
|__logs
|__trackerd.log:tracker server 日志文件
数据文件 storage_groups.dat 和 storage_servers.dat 中的记录之间以换行符(\n)分隔,字段
之间以西文逗号(,)分隔。
storage_groups.dat 中的字段依次为:
1. group_name:组名
2. storage_port:storage server 端口号
storage_servers.dat 中记录 storage server 相关信息,字段依次为:
1. group_name:所属组名
2. ip_addr:ip 地址
3. status:状态
4. sync_src_ip_addr:向该 storage server 同步已有数据文件的源服务器
5. sync_until_timestamp:同步已有数据文件的截至时间(UNIX 时间戳)
6. stat.total_upload_count:上传文件次数
7. stat.success_upload_count:成功上传文件次数
8. stat.total_set_meta_count:更改 meta data 次数
9. stat.success_set_meta_count:成功更改 meta data 次数
10. stat.total_delete_count:删除文件次数
11. stat.success_delete_count:成功删除文件次数
12. stat.total_download_count:下载文件次数
13. stat.success_download_count:成功下载文件次数
14. stat.total_get_meta_count:获取 meta data 次数
15. stat.success_get_meta_count:成功获取 meta data 次数
16. stat.last_source_update:最近一次源头更新时间(更新操作来自客户端)
17. stat.last_sync_update:最近一次同步更新时间(更新操作来自其他 storage server 的同
步)
# max concurrent connections this server supported
# max_connections worker threads start when this service startup
max_connections=256
# 系统提供服务时的最大连接数。对于 V1.x,因一个连接由一个线程服务,也就是工作线程
数。
# 对于 V2.x,最大连接数和工作线程数没有任何关系
# work thread count, should <= max_connections
# default value is 4
# since V2.00
# V2.0 引入的这个参数,工作线程数,通常设置为 CPU 数
work_threads=4
# the method of selecting group to upload files
# 0: round robin
# 1: specify group
# 2: load balance, select the max free space group to upload file
store_lookup=2
# 上传组(卷) 的方式 0:轮询方式 1: 指定组 2: 平衡负载(选择最大剩余空间的组(卷)上传)
# 这里如果在应用层指定了上传到一个固定组,那么这个参数被绕过
# which group to upload file
# when store_lookup set to 1, must set store_group to the group name
store_group=group2
# 当上一个参数设定为 1 时 (store_lookup=1,即指定组名时),必须设置本参数为系统中存
在的一个组名。如果选择其他的上传方式,这个参数就没有效了。
# which storage server to upload file
# 0: round robin (default)
# 1: the first server order by ip address
# 2: the first server order by priority (the minimal)
store_server=0
# 选择哪个 storage server 进行上传操作(一个文件被上传后,这个 storage server 就相当于
这个文件的 storage server 源,会对同组的 storage server 推送这个文件达到同步效果)
# 0: 轮询方式
# 1: 根据 ip 地址进行排序选择第一个服务器(IP 地址最小者)
# 2: 根据优先级进行排序(上传优先级由 storage server 来设置,参数名为 upload_priority)
# which path(means disk or mount point) of the storage server to upload file
# 0: round robin
# 2: load balance, select the max free space path to upload file
store_path=0
# 选择 storage server 中的哪个目录进行上传。storage server 可以有多个存放文件的 base
path(可以理解为多个磁盘)。
# 0: 轮流方式,多个目录依次存放文件
# 2: 选择剩余空间最大的目录存放文件(注意:剩余磁盘空间是动态的,因此存储到的目录
或磁盘可能也是变化的)
# which storage server to download file
# 0: round robin (default)
# 1: the source storage server which the current file uploaded to
download_server=0
# 选择哪个 storage server 作为下载服务器
# 0: 轮询方式,可以下载当前文件的任一 storage server
# 1: 哪个为源 storage server 就用哪一个 (前面说过了这个 storage server 源是怎样产生的)
就是之前上传到哪个 storage server 服务器就是哪个了
# reserved storage space for system or other applications.
# if the free(available) space of any stoarge server in
# a group <= reserved_storage_space,
# no file can be uploaded to this group.
# bytes unit can be one of follows:
### G or g for gigabyte(GB)
### M or m for megabyte(MB)
### K or k for kilobyte(KB)
### no unit for byte(B)
### XX.XX% as ratio such as reserved_storage_space = 10%
reserved_storage_space = 10%
# storage server 上保留的空间,保证系统或其他应用需求空间。可以用绝对值或者百分比
(V4 开始支持百分比方式)。
#(指出如果同组的服务器的硬盘大小一样,以最小的为准,也就是只要同组中有一台服务器达
到这个标准了,这个标准就生效,原因就是因为他们进行备份)
#standard log level as syslog, case insensitive, value list:
### emerg for emergency
### alert
### crit for critical
### error
### warn for warning
### notice
### info
### debug
log_level=info
# 选择日志级别(日志写在哪?看前面的说明了,有目录介绍哦呵呵)
#unix group name to run this program,
#not set (empty) means run by the group of current user
run_by_group=
# 操作系统运行 FastDFS 的用户组 (不填就是当前用户组,哪个启动进程就是哪个)
#unix username to run this program,
#not set (empty) means run by current user
run_by_user=
# 操作系统运行 FastDFS 的用户 (不填就是当前用户,哪个启动进程就是哪个)
# allow_hosts can ocur more than once, host can be hostname or ip address,
# "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
# host[01-08,20-25].domain.com, for example:
# allow_hosts=10.0.1.[1-15,20]
# allow_hosts=host[01-08,20-25].domain.com
allow_hosts=*
# 可以连接到此 tracker server 的 ip 范围(对所有类型的连接都有影响,包括客户端,storage
server)
# sync log buff to disk every interval seconds
# default value is 10 seconds
剩余17页未读,继续阅读
资源评论
小小哭包
- 粉丝: 1900
- 资源: 3864
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功