网2112 发表于 2016-10-8 09:30:33

CentOS 6.5上安装并配置FastDFS

一、下载并安装libfastcommon

1
2
3
4
5
cd /opt/tools
git clone https://github.com/happyfish100/libfastcommon.git
cd libfastcommon/
./make.sh
./make.sh install




二、下载并安装fastdfs

1
2
3
4
5
6
cd ../
wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
tar -zxf V5.05.tar.gz
cd fastdfs-5.05/
./make.sh
./make.sh install




三、配置fastdfs
1、配置fastdfs启动脚本

fastdfs安装完成后,会在/etc/init.d/下生成fdfs的启动脚本,但是脚本中fastdfs的安装路径不对(脚本中默认是/usr/local/bin,但实际安装路径是/usr/bin),所以需要对脚本进行如下处理:

1
2
sed -i 's#/usr/local/bin/#/usr/bin/#g' /etc/init.d/fdfs_storaged
sed -i 's#/usr/local/bin/#/usr/bin/#g' /etc/init.d/fdfs_trackerd




2、编辑fastdfs的tracker配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
cd /etc/fdfs/
cp tracker.conf.sample tracker.conf
vim tracker.conf
# diff tracker.conf.sample tracker.conf
22c22
< base_path=/home/yuqing/fastdfs
---
> base_path=/data/fdfs_tracker
# scp tracker.conf 192.168.100.182:/etc/fdfs/
root@192.168.100.182's password:
tracker.conf                                  100% 7100   6.9KB/s   00:00   
# mkdir -p /data/fdfs_tracker
# mkdir -p /data/fdfs_storage




3、编辑fastdfs的storage配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cp storage.conf.sample storage.conf
vi storage.conf
# diff storage.conf.sample storage.conf
41c41
< base_path=/home/yuqing/fastdfs
---
> base_path=/data/fdfs_storage/base
109c109
< store_path0=/home/yuqing/fastdfs
---
> store_path0=/data/fdfs_storage/store
118c118,119
< tracker_server=192.168.209.121:22122
---
> tracker_server=192.168.100.181:22122
> tracker_server=192.168.100.182:22122
# scp storage.conf 192.168.100.182:/etc/fdfs/
root@192.168.100.182's password:
storage.conf                                  100% 7873   7.7KB/s   00:00   
# mkdir -p /data/fdfs_storage/{base,store}




4、启动fastdfs_tracker


1
2
3
4
5
6
7
8
9
10
# /etc/init.d/fdfs_trackerd start
Starting FastDFS tracker server:
# lsof -i :22122
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
fdfs_trac 2590 root    5uIPv438392      0t0TCP *:22122 (LISTEN)
# netstat -lnt|grep 22122
tcp      0      0 0.0.0.0:22122               0.0.0.0:*                   LISTEN      
# ps -ef|grep fdfs_trackerd
root       2590      10 01:29 ?      00:00:03 /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
root       2646   18040 01:42 pts/0    00:00:00 grep fdfs_trackerd




5、启动fastdfs_storage

1
2
3
4
5
6
7
8
9
10
11
12
# /etc/init.d/fdfs_storaged start
Starting FastDFS storage server:
# lsof -i :23000
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
fdfs_stor 2607 root    5uIPv4 104300      0t0TCP *:inovaport1 (LISTEN)
fdfs_stor 2607 root   19uIPv4 105824      0t0TCP 192.168.100.181:inovaport1->192.168.100.182:36456 (ESTABLISHED)
fdfs_stor 2607 root   23uIPv4 105842      0t0TCP 192.168.100.181:47300->192.168.100.182:inovaport1 (ESTABLISHED)
# netstat -lnt|grep 23000
tcp      0      0 0.0.0.0:23000               0.0.0.0:*                   LISTEN      
# ps -ef|grep fdfs_storage
root       2607      10 01:30 ?      00:00:01 /usr/bin/fdfs_storaged /etc/fdfs/storage.conf
root       2653   18040 01:43 pts/0    00:00:00 grep fdfs_storage




6、注意事项
1)group2同组的Storage2和Storage3 FastDFS服务端口必须一致: port=23000。
2)一台服务器可以装多个组(group)但不能装同组的多个Storage,日志会报错误,日志报错原因是"注意1"
3)Version 4.05之前fastdfs内部绑定了libevent作为http服务器.Version 4.05之后的版本删除了内置的web http服务,内置的web http服务是个累赘,不用也罢!
4)启动storage server时,一直处于僵死状态.启动storage server,storage将连接tracker server,如果连不上,将一直重试。直到连接成功,启动才算真正完成!如果集群中有2台tracker server,而其中一台tracker没有启动,可能会导致storage server一直处于僵死状态
四、配置fastdfs客户端

1
2
3
4
5
6
7
8
9
10
11
12
13
cd /etc/fdfs/
cp client.conf.sample client.conf
vim client.conf
# diff client.conf.sample client.conf
10c10
< base_path=/home/yuqing/fastdfs
---
> base_path=/tmp
14c14,15
< tracker_server=192.168.0.197:22122
---
> tracker_server=192.168.100.181:22122
> tracker_server=192.168.100.182:22122




五、fdfs常用命令

1、文件上传命令fdfs_upload_file
用法:
# fdfs_upload_file --help
Usage: fdfs_upload_file <config_file> <local_filename>
下面上传一个文件测试:
# echo 'Hello,world.' >>/root/a.txt
# fdfs_upload_file /etc/fdfs/client.conf /root/a.txt
group1/M00/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
上传成功后,返回一串带有组和路径标识的字符串,这是文件的id,我们通过这个id在服务器上查找文件:
# cd /data/fdfs_storage/store/data/
# ls
000D1A2734414E5B6875828F9CA9B6C3D0DDEAF7
010E1B2835424F5C697683909DAAB7C4D1DEEBF8
020F1C293643505D6A7784919EABB8C5D2DFECF9
03101D2A3744515E6B7885929FACB9C6D3E0EDFA
04111E2B3845525F6C798693A0ADBAC7D4E1EEFB
05121F2C394653606D7A8794A1AEBBC8D5E2EFFC
0613202D3A4754616E7B8895A2AFBCC9D6E3F0FD
0714212E3B4855626F7C8996A3B0BDCAD7E4F1FE
0815222F3C495663707D8A97A4B1BECBD8E5F2FF
091623303D4A5764717E8B98A5B2BFCCD9E6F3
0A1724313E4B5865727F8C99A6B3C0CDDAE7F4
0B1825323F4C596673808D9AA7B4C1CEDBE8F5
0C192633404D5A6774818E9BA8B5C2CFDCE9F6
# cd 00/
# ls
000D1A2734414E5B6875828F9CA9B6C3D0DDEAF7
010E1B2835424F5C697683909DAAB7C4D1DEEBF8
020F1C293643505D6A7784919EABB8C5D2DFECF9
03101D2A3744515E6B7885929FACB9C6D3E0EDFA
04111E2B3845525F6C798693A0ADBAC7D4E1EEFB
05121F2C394653606D7A8794A1AEBBC8D5E2EFFC
0613202D3A4754616E7B8895A2AFBCC9D6E3F0FD
0714212E3B4855626F7C8996A3B0BDCAD7E4F1FE
0815222F3C495663707D8A97A4B1BECBD8E5F2FF
091623303D4A5764717E8B98A5B2BFCCD9E6F3
0A1724313E4B5865727F8C99A6B3C0CDDAE7F4
0B1825323F4C596673808D9AA7B4C1CEDBE8F5
0C192633404D5A6774818E9BA8B5C2CFDCE9F6
# cd 00/
# ll
total 4
-rw-r--r-- 1 root root 13 Oct5 13:50 wKhktVf0lLOAMikbAAAADUwC04E360.txt
# pwd
/data/fdfs_storage/store/data/00/00
# cat wKhktVf0lLOAMikbAAAADUwC04E360.txt
Hello,world.
再来看一下文件在存储服务器上的位置:
# ll /data/fdfs_storage/store/data/00/00/
total 4
-rw-r--r-- 1 root root 13 Oct5 13:50 wKhktVf0lLOAMikbAAAADUwC04E360.txt
# cat /data/fdfs_storage/store/data/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
Hello,world.
# 对文件进行校验,以便于后面进行比对
# md5sum wKhktVf0lLOAMikbAAAADUwC04E360.txt
55517e093aa73dee11e6c57a5e980acewKhktVf0lLOAMikbAAAADUwC04E360.txt
2、下载文件fdfs_download_file
用法:
# fdfs_download_file --help
Usage: fdfs_download_file <config_file> <file_id> [<download_offset> <download_bytes>]
这里下载一下刚刚上传的文件:
# fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt /tmp/a.txt
对下载后的文件进行校验:
# md5sum /tmp/a.txt
55517e093aa73dee11e6c57a5e980ace/tmp/a.txt
在mylinux4上对服务器上的文件也进行校验,可以看到所有的校验码都是一样的。
# md5sum /data/fdfs_storage/store/data/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
55517e093aa73dee11e6c57a5e980ace/data/fdfs_storage/store/data/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
3、查看文件信息fdfs_file_info
用法:
# fdfs_file_info --help
^[[6~Usage: fdfs_file_info <config_file> <file_id>
使用示例:
# fdfs_file_info /etc/fdfs/client.conf group1/M00/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
source storage id: 0
source ip address: 192.168.100.181
file create timestamp: 2016-10-05 13:50:43
file size: 13
file crc32: 1275253633 (0x4C02D381)
4、删除文件fdfs_delete_file
用法:
# fdfs_delete_file --help
Usage: fdfs_delete_file <config_file> <file_id>
使用示例:
# fdfs_delete_file /etc/fdfs/client.conf group1/M00/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
删除之后没有信息提示,我们再进行下载和查找,结果如下:
# fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/wKhktVf0lLOAMikbAAAADUwC04E360.txt
ERROR - file: tracker_proto.c, line: 48, server: 192.168.100.182:23000, response status 2 != 0
download file fail, error no: 2, error info: No such file or directory
# ll /data/fdfs_storage/store/data/00/00
total 0
# ll /data/fdfs_storage/store/data/00/00
total 0
5、追加文件内容fdfs_upload_appender和fdfs_upload_appender
用法:
# fdfs_upload_appender --help
Usage: fdfs_upload_appender <config_file> <local_filename>
使用示例:
# echo "Hello" >/tmp/test1.txt
# fdfs_upload_appender /etc/fdfs/client.conf /tmp/test1.txt group1/M00/00/00/wKhktlf0mimEdYdtAAAAAI-wJ-k984.txt
# echo "World" >>/tmp/test2.txt
用法:
# fdfs_append_file --help
Usage: fdfs_append_file <config_file> <appender_file_id> <local_filename>
使用示例:
# fdfs_append_file /etc/fdfs/client.conf group1/M00/00/00/wKhktlf0mimEdYdtAAAAAI-wJ-k984.txt /tmp/test2.txt
下载文件并查看文件内容:
# fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/wKhktlf0mimEdYdtAAAAAI-wJ-k984.txt /tmp/test3.txt
# cat /tmp/test3.txt
Hello
World
6、监控服务器状态fdfs_monitor
用法:
# fdfs_monitor
Usage: fdfs_monitor <config_file> [-h <tracker_server>] ]
使用示例:
# fdfs_monitor /etc/fdfs/client.conf
DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=60, tracker_server_count=2, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

server_count=2, server_index=1

tracker server is 192.168.100.182:22122

group count: 1

Group 1:
group name = group1
disk total space = 17944 MB
disk free space = 12998 MB
trunk free space = 0 MB
storage server count = 2
active server count = 2
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 0
current trunk file id = 0

        Storage 1:
                id = 192.168.100.181
                ip_addr = 192.168.100.181ACTIVE
                http domain =
                version = 5.05
                join time = 2016-10-05 01:29:55
                up time = 2016-10-05 13:43:44
                total storage = 17944 MB
                free storage = 12998 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id =
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 1
                connection.max_count = 2
                total_upload_count = 1
                success_upload_count = 1
                total_append_count = 0
                success_append_count = 0
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 1
                success_delete_count = 1
                total_download_count = 2
                success_download_count = 2
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 13
                success_upload_bytes = 13
                total_append_bytes = 0
                success_append_bytes = 0
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 26
                success_download_bytes = 26
                total_sync_in_bytes = 12
                success_sync_in_bytes = 12
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 5
                success_file_open_count = 5
                total_file_read_count = 2
                success_file_read_count = 2
                total_file_write_count = 3
                success_file_write_count = 3
                last_heart_beat_time = 2016-10-05 14:18:45
                last_source_update = 2016-10-05 14:07:56
                last_sync_update = 2016-10-05 14:15:17
                last_synced_timestamp = 2016-10-05 14:15:14 (0s delay)
        Storage 2:
                id = 192.168.100.182
                ip_addr = 192.168.100.182ACTIVE
                http domain =
                version = 5.05
                join time = 2016-10-05 01:31:26
                up time = 2016-10-05 13:43:46
                total storage = 18717 MB
                free storage = 15808 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id = 192.168.100.181
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 1
                connection.max_count = 2
                total_upload_count = 1
                success_upload_count = 1
                total_append_count = 1
                success_append_count = 1
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 0
                success_delete_count = 0
                total_download_count = 2
                success_download_count = 2
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 6
                success_upload_bytes = 6
                total_append_bytes = 6
                success_append_bytes = 6
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 25
                success_download_bytes = 25
                total_sync_in_bytes = 13
                success_sync_in_bytes = 13
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 5
                success_file_open_count = 5
                total_file_read_count = 2
                success_file_read_count = 2
                total_file_write_count = 3
                success_file_write_count = 3
                last_heart_beat_time = 2016-10-05 14:18:48
                last_source_update = 2016-10-05 14:15:14
                last_sync_update = 2016-10-05 14:08:05
                last_synced_timestamp = 2016-10-05 14:07:56 (0s delay)
7、移除故障节点示例
假如节点2(mylinux4)上的fastdfs出了问题,我们需要将它从组中移除,可根据下面的命令操作:
1)停掉fastdfs上的storage服务
# /etc/init.d/fdfs_storaged stop
stopping fdfs_storaged ...
.
# lsof -i :23000
2)将问题节点(mylinux4)从组中移除
# fdfs_monitor /etc/fdfs/client.conf delete group1 192.168.100.182
DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=60, tracker_server_count=2, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

server_count=2, server_index=0

tracker server is 192.168.100.181:22122

delete storage server group1::192.168.100.182 success
3)移除成功,使用fdfs_monitor命令进行监控
# fdfs_monitor /etc/fdfs/client.conf
DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=60, tracker_server_count=2, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

server_count=2, server_index=1

tracker server is 192.168.100.182:22122

group count: 1

Group 1:
group name = group1
disk total space = 17944 MB
disk free space = 12998 MB
trunk free space = 0 MB
storage server count = 2
active server count = 1
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 0
current trunk file id = 0

        Storage 1:
                id = 192.168.100.181
                ip_addr = 192.168.100.181ACTIVE
                http domain =
                version = 5.05
                join time = 2016-10-05 01:29:55
                up time = 2016-10-05 13:43:44
                total storage = 17944 MB
                free storage = 12998 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id =
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 0
                connection.max_count = 2
                total_upload_count = 1
                success_upload_count = 1
                total_append_count = 0
                success_append_count = 0
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 1
                success_delete_count = 1
                total_download_count = 2
                success_download_count = 2
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 13
                success_upload_bytes = 13
                total_append_bytes = 0
                success_append_bytes = 0
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 26
                success_download_bytes = 26
                total_sync_in_bytes = 12
                success_sync_in_bytes = 12
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 5
                success_file_open_count = 5
                total_file_read_count = 2
                success_file_read_count = 2
                total_file_write_count = 3
                success_file_write_count = 3
                last_heart_beat_time = 2016-10-05 14:24:16
                last_source_update = 2016-10-05 14:07:56
                last_sync_update = 2016-10-05 14:15:17
                last_synced_timestamp = 2016-10-05 14:15:14
        Storage 2:
                id = 192.168.100.182
                ip_addr = 192.168.100.182DELETED
                http domain =
                version = 5.05
                join time = 2016-10-05 01:31:26
                up time =
                total storage = 0 MB
                free storage = 0 MB
                upload priority = 0
                store_path_count = 0
                subdir_count_per_path = 0
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id =
                if_trunk_server = 0
                connection.alloc_count = 0
                connection.current_count = 0
                connection.max_count = 0
                total_upload_count = 0
                success_upload_count = 0
                total_append_count = 0
                success_append_count = 0
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 0
                success_delete_count = 0
                total_download_count = 0
                success_download_count = 0
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 0
                success_upload_bytes = 0
                total_append_bytes = 0
                success_append_bytes = 0
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 0
                success_download_bytes = 0
                total_sync_in_bytes = 0
                success_sync_in_bytes = 0
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 0
                success_file_open_count = 0
                total_file_read_count = 0
                success_file_read_count = 0
                total_file_write_count = 0
                success_file_write_count = 0
                last_heart_beat_time = 1970-01-01 07:00:00
                last_source_update = 1970-01-01 07:00:00
                last_sync_update = 1970-01-01 07:00:00
                last_synced_timestamp = 1970-01-01 07:00:00 (never synced)
移除之后,mylinux4的状态为DELETED。
当mylinux4上的fastdfs修复后,可以再把它加入到fastdfs组中,加入的操作只需要把mylinux4上的fastdfs服务正常启动就好,因为配置文件已经做了配置,如果服务正常的话,修复后的节点可以自动加入到fastdfs组中。
启动fastdfs_storaged服务
# /etc/init.d/fdfs_storaged start
Starting FastDFS storage server:
检查监听端口状态:
# lsof -i :23000
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
fdfs_stor 1222 root    5uIPv410873      0t0TCP *:inovaport1 (LISTEN)
fdfs_stor 1222 root   22uIPv410885      0t0TCP www.mylinux4.com:41728->192.168.100.181:inovaport1 (ESTABLISHED)
再次使用监控命令查看服务器状态:
# fdfs_monitor /etc/fdfs/client.conf
DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=60, tracker_server_count=2, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

server_count=2, server_index=0

tracker server is 192.168.100.181:22122

group count: 1

Group 1:
group name = group1
disk total space = 17944 MB
disk free space = 12998 MB
trunk free space = 0 MB
storage server count = 2
active server count = 2
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 0
current trunk file id = 0

        Storage 1:
                id = 192.168.100.181
                ip_addr = 192.168.100.181ACTIVE
                http domain =
                version = 5.05
                join time = 2016-10-05 01:29:55
                up time = 2016-10-05 13:43:44
                total storage = 17944 MB
                free storage = 12998 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id =
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 1
                connection.max_count = 2
                total_upload_count = 1
                success_upload_count = 1
                total_append_count = 0
                success_append_count = 0
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 1
                success_delete_count = 1
                total_download_count = 2
                success_download_count = 2
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 13
                success_upload_bytes = 13
                total_append_bytes = 0
                success_append_bytes = 0
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 26
                success_download_bytes = 26
                total_sync_in_bytes = 12
                success_sync_in_bytes = 12
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 5
                success_file_open_count = 5
                total_file_read_count = 2
                success_file_read_count = 2
                total_file_write_count = 3
                success_file_write_count = 3
                last_heart_beat_time = 2016-10-05 14:25:14
                last_source_update = 2016-10-05 14:07:56
                last_sync_update = 2016-10-05 14:15:17
                last_synced_timestamp = 2016-10-05 14:15:14 (0s delay)
        Storage 2:
                id = 192.168.100.182
                ip_addr = 192.168.100.182ACTIVE
                http domain =
                version = 5.05
                join time = 2016-10-05 01:31:26
                up time = 2016-10-05 14:24:52
                total storage = 18717 MB
                free storage = 15808 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id = 192.168.100.181
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 0
                connection.max_count = 0
                total_upload_count = 1
                success_upload_count = 1
                total_append_count = 1
                success_append_count = 1
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 0
                success_delete_count = 0
                total_download_count = 2
                success_download_count = 2
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 6
                success_upload_bytes = 6
                total_append_bytes = 6
                success_append_bytes = 6
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 25
                success_download_bytes = 25
                total_sync_in_bytes = 13
                success_sync_in_bytes = 13
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 5
                success_file_open_count = 5
                total_file_read_count = 2
                success_file_read_count = 2
                total_file_write_count = 3
                success_file_write_count = 3
                last_heart_beat_time = 2016-10-05 14:25:22
                last_source_update = 2016-10-05 14:15:14
                last_sync_update = 2016-10-05 14:08:05
                last_synced_timestamp = 1970-01-01 07:00:00 (never synced)
可以看到,此时mylinux4已经变为ACTIVE状态了。

页: [1]
查看完整版本: CentOS 6.5上安装并配置FastDFS