1. 程式人生 > >FastDFs 開源的輕量級分布式文件系統部署

FastDFs 開源的輕量級分布式文件系統部署

tst rms 部署 meta dfa 安裝 cor tree crc

1.技術背景介紹;

FastDFS是一個開源的輕量級分布式文件系統,它對文件進行管理,功能包括:文件存儲、文件同步、文件訪問(文件上傳、文件下載)等,解決了大容量存儲和負載均衡的問題。特別適合以文件為載體的在線服務,如相冊網站、視頻網站等等。
FastDFS為互聯網量身定制,充分考慮了冗余備份、負載均衡、線性擴容等機制,並註重高可用、高性能等指標,使用FastDFS很容易搭建一套高性能的文件服務器集群提供文件上傳、下載等服務。

2.基礎環境介紹;

主機名 IP地址規劃 相關軟件源碼包匯總 服務器角色

Nginx_fastdfs1
192.168.1.190 Nginx.1.8.0.tar.gz

fastdfs .v5.05.tar.gz
libfastcommon-master.zip
fastdfs-nginx-module_v1.16.tar.gz Storage/tracker

Nginx_fastdfs2
192.168.1.200 Storage/tracker

3.軟件功能介紹;
(1) libfastcommon 源碼包介紹;

libfastcommon是從開源軟件FastDFS和FastDHT中提取出來的公共C函數庫。
它提供了字符串處理、鏈表、哈希表、日誌記錄、配置文件讀取、socket操作、base64編碼、url編碼、md5等常用函數庫。還包括http的一個簡單的client,可以獲取url內容(目前僅支持GET方式)。

這些代碼已經在FastDFS和FastDHT中使用,比較簡潔、穩定。FastDFS已經在Linux、FreeBSD、AIX下進行了編譯並通過了測試.

(2)fastdfs-nginx-module_v1 介紹;
我們在使用FastDFS部署一個分布式文件系統的時候,通過FastDFS的客戶端API來進行文件的上傳、下載、刪除等操作。同時通過FastDFS 的HTTP服務器來提供HTTP服務。但是FastDFS的HTTP服務較為簡單,無法提供負載均衡等高性能的服務,所以FastDFS的開發者——淘寶 的架構師余慶同學,為我們提供了Nginx上使用的FastDFS模塊。其使用非常簡單。

(3) fastdfs 介紹;

FastDFS是一個開源的輕量級分布式文件系統,它對文件進行管理,功能包括:文件存儲、文件同步、文件訪問(文件上傳、文件下載)等,解決了大容量存儲和負載均衡的問題。特別適合以文件為載體的在線服務,如相冊網站、視頻網站等等。
stDFS服務端有兩個角色:跟蹤器(tracker)和存儲節點(storage)。跟蹤器主要做調度工作,在訪問上起負載均衡的作用。
存儲節點存儲文件,完成文件管理的所有功能:存儲、同步和提供存取接 口,FastDFS同時對文件的metadata進行管理。所謂文件的meta data就是文件的相關屬性,以鍵值對(key valuepair)方式表示,如:width=1024,其中的key為width,value為1024。文件metadata是文件屬性列表,可以包含多個鍵值對。
跟蹤器和存儲節點都可以由一臺或多臺服務器構成。跟蹤器和存儲節點中的服務器均可以隨時增加或下線而不會影響線上服務。其中跟蹤器中的所有服務器都是對等的,可以根據服務器的壓力情況隨時增加或減少。
為了支持大容量,存儲節點(服務器)采用了分卷(或分組)的組織方式。存儲系統由一個或多個卷組成,卷與卷之間的文件是相互獨立的,所有卷的文件容量累加就是整個存儲系統中的文件容量。一個卷可以由一臺或多臺存儲服務器組成,一個卷下的存儲服務器中的文件都是相同的,卷中的多臺存儲服務器起到了冗余備份和負載均衡的作用。
在卷中增加服務器時,同步已有的文件由系統自動完成,同步完成後,系統自動將新增服務器切換到線上提供服務。
當存儲空間不足或即將耗盡時,可以動態添加卷。只需要增加一臺或多臺服務器,並將它們配置為一個新的卷,這樣就擴大了存儲系統的容量。
FastDFS中的文件標識分為兩個部分:卷名和文件名,二者缺一不可。

(4).上傳交互過程;

  1. client詢問tracker上傳到的storage,不需要附加參數;
  2. tracker返回一臺可用的storage;
  3. client直接和storage通訊完成文件上傳。
    FastDFS file download

(5).下載交互過程

  1. client詢問tracker下載文件的storage,參數為文件標識(卷名和文件名);
  2. tracker返回一臺可用的storage;
  3. client直接和storage通訊完成文件下載。
    需要說明的是,client為使用FastDFS服務的調用方,client也應該是一臺服務器,它對tracker和storage的調用均為服務器間的調用

3.部署環境準備;

註意:(兩臺機器同樣執行以下操作)

(1).安裝環境依賴包

yum install -y zlib zlib-devel pcre pcre-devel gcc gcc-c++ openssl openssl-devel libevent libevent-devel perl unzip

(2).創建fastdfs 運行用戶;

useradd -s /sbin/nologin fastdfs

(3).創建數據存儲目錄;

mkdir -p /export/fastdfs/{storage,tracker}
[root@nginx_Fastdfs1 ~]# ll /export/fastdfs/
total 8
drwxr-xr-x 4 fastdfs fastdfs 4096 Jun 6 22:09 storage
drwxr-xr-x 4 fastdfs fastdfs 4096 Jun 6 21:12 tracker

[root@nginx_Fastdfs2 ~]# ll /export/fastdfs/
total 8
drwxr-xr-x 4 fastdfs fastdfs 4096 Jun 6 21:59 storage
drwxr-xr-x 4 fastdfs fastdfs 4096 Jun 6 21:03 tracker

4.Fastdfs部署詳情;

註意:(2臺服務器需要同樣執行如下操作)

(1).部署libfastcommon;
mkdir /usr/local/fastdfs_packages
cd /usr/local/fastdfs_packages
wget https://github.com/happyfish100/libfastcommon/archive/master.zip
unzip master.zip
cd libfastcommon-master/
./make.sh
./make.sh install

(2)部署fastdfs
cd /usr/local/fastdfs_packages
wget http://sourceforge.net/projects/fastdfs/files/FastDFS%20Server%20Source
%20Code/FastDFS%20Server%20with%20PHP%20Extension%20Source%20Code%20V5.05/
FastDFS_v5.05.tar.gz
tar zxf FastDFS_v5.05.tar.gz && cd FastDFS
./make.sh && ./make.sh install
\cp pa conf/.conf /etc/fdfs/
cd /etc/fdfs/
mv
.sample /opt/ #備份模板文件;
chown -R fastdfs: /export/fastdfs

註意:配置tracker 和 storage
Nginx_fastdfs1 和Nginx_fastdfs2分別配置;

(3) Nginx_fastdfs1機器(配置tracker 和 storage 配置文件;)

[root@nginx_Fastdfs1 fdfs]# tree /etc/fdfs/
/etc/fdfs/
├── client.conf
├── mod_fastdfs.conf
├── storage.conf
└── tracker.conf
0 directories, 4 files

storage 配置

[root@nginx_Fastdfs1 /]# cat /etc/fdfs/storage.conf
group_name=group1
base_path=/export/fastdfs/storage
store_path0=/export/fastdfs/storage
tracker_server=192.168.1.190:22122
tracker_server=192.168.1.200:22122
http.server_port=80
disabled=false
bind_addr=192.168.1.190
client_bind=true
port=23000
connect_timeout=30
network_timeout=60
heart_beat_interval=30
stat_report_interval=60
max_connections=256
buff_size = 256KB
work_threads=2
disk_rw_separated = true
disk_rw_direct = false
disk_reader_threads = 1
disk_writer_threads = 1
sync_wait_msec=50
sync_interval=0
sync_start_time=00:00
sync_end_time=23:59
write_mark_file_freq=500
store_path_count=1
subdir_count_per_path=256
log_level=info
run_by_group=
run_by_user=
allow_hosts=*
file_distribute_path_mode=0
file_distribute_rotate_count=100
fsync_after_written_bytes=0
sync_log_buff_interval=10
sync_binlog_buff_interval=10
sync_stat_file_interval=300
thread_stack_size=512KB
upload_priority=10
if_alias_prefix=
check_file_duplicate=0
key_namespace=FastDFS
keep_alive=0
http.disabled=false
httphttp.domain_name=
http.trunk_size=256KB
http.need_find_content_type=true

tracker.conf 配置;

[root@nginx_Fastdfs1 fdfs]# cat /etc/fdfs/tracker.conf
base_path=/export/fastdfs/tracker
disabled=false
bind_addr=192.168.1.190
port=22122
connect_timeout=30
network_timeout=60
max_connections=256
work_threads=2
store_lookup=2
store_group=group2
store_server=0
store_path=0
download_server=0
reserved_storage_space = 4GB
log_level=info
run_by_group=
run_by_user=
allow_hosts=*
sync_log_buff_interval = 10
check_active_interval = 120
thread_stack_size = 64KB
storage_ip_changed_auto_adjust = true
storage_sync_file_max_delay = 86400
storage_sync_file_max_time = 300
use_trunk_file = false
slot_min_size = 256
slot_max_size = 16MB
trunk_file_size = 64MB
http.disabled=false
http.server_port=8080
http.check_alive_interval=30
http.check_alive_type=tcp
http.check_alive_uri=/status.html
http.need_find_content_type=true

mod_fastdfs.conf 配置

[root@nginx_Fastdfs1 /]# cat /etc/fdfs/mod_fastdfs.conf
group_name=group1
base_path=/export/fastdfs/storage
store_path0=/export/fastdfs/storage
tracker_server=192.168.1.190:22122
tracker_server=192.168.1.200:22122
url_have_group_name = true

client.conf 配置

[root@nginx_Fastdfs1 fdfs]# cat client.conf
tracker_server=192.168.1.190:22122
tracker_server=192.168.1.200:22122

(3) Nginx_fastdfs2機器(配置tracker 和 storage 配置文件;)

[root@nginx_Fastdfs2 ~]# tree /etc/fdfs/
/etc/fdfs/
├── client.conf
├── mod_fastdfs.conf
├── storage.conf
└── tracker.conf
0 directories, 4 files

storage.conf 配置;

[root@nginx_Fastdfs2 ~]# cat /etc/fdfs/storage.conf
base_path=/export/fastdfs/storage
store_path0=/export/fastdfs/storage
tracker_server=192.168.1.200:22122
tracker_server=192.168.1.190:22122
http.server_port=80
disabled=false
group_name=group1
bind_addr=192.168.1.200
client_bind=true
port=23000
connect_timeout=30
network_timeout=60
heart_beat_interval=30
stat_report_interval=60
max_connections=256
buff_size = 256KB
work_threads=2
disk_rw_separated = true
disk_rw_direct = false
disk_reader_threads = 1
disk_writer_threads = 1
sync_wait_msec=50
sync_interval=0
sync_start_time=00:00
sync_end_time=23:59
write_mark_file_freq=500
store_path_count=1
subdir_count_per_path=256
log_level=info
run_by_group=
run_by_user=
allow_hosts=*
file_distribute_path_mode=0
file_distribute_rotate_count=100
fsync_after_written_bytes=0
sync_log_buff_interval=10
sync_binlog_buff_interval=10
sync_stat_file_interval=300
thread_stack_size=512KB
upload_priority=10
if_alias_prefix=
check_file_duplicate=0
key_namespace=FastDFS
keep_alive=0
http.disabled=false
httphttp.domain_name=
http.trunk_size=256KB
http.need_find_content_type=true

tracker.conf 配置

[root@nginx_Fastdfs2 ~]# cat /etc/fdfs/tracker.conf
base_path=/export/fastdfs/tracker
disabled=false
bind_addr=192.168.1.200
port=22122
connect_timeout=30
network_timeout=60
max_connections=256
work_threads=2
store_lookup=2
store_group=group2
store_server=0
store_path=0
download_server=0
reserved_storage_space = 4GB
log_level=info
run_by_group=
run_by_user=
allow_hosts=*
sync_log_buff_interval = 10
check_active_interval = 120
thread_stack_size = 64KB
storage_ip_changed_auto_adjust = true
storage_sync_file_max_delay = 86400
storage_sync_file_max_time = 300
use_trunk_file = false
slot_min_size = 256
slot_max_size = 16MB
trunk_file_size = 64MB
http.disabled=false
http.server_port=8080
http.check_alive_interval=30
http.check_alive_type=tcp
http.check_alive_uri=/status.html
http.need_find_content_type=true

mod_fastdfs.conf 配置

[root@nginx_Fastdfs2 ~]# cat /etc/fdfs/mod_fastdfs.conf
group_name=group1
base_path=/export/fastdfs/storage
store_path0=/export/fastdfs/storage
tracker_server=192.168.1.200:22122
tracker_server=192.168.1.190:22122
url_have_group_name = true
client.conf 配置

[root@nginx_Fastdfs2 ~]# cat /etc/fdfs/client.conf
tracker_server=192.168.1.200:22122
tracker_server=192.168.1.190:22122

5.Fastdfs結合nginx;

(1).軟件部署以及配置調整;
cd /usr/local/fastdfs_packages
wget http://nginx.org/download/nginx-1.8.0.tar.gz
http://sourceforge.net/projects/fastdfs/files/FastDFS%20Nginx%20Module%20Source%20Code/fastdfs-nginx-module_v1.16.tar.gz/download
tar zxf fastdfs-nginx-module_v1.16.tar.gz

註意:修改模塊中對應的路徑,否則模塊不能正確安裝加載;
cd fastdfs-nginx-module/src
vi conf #更改如下,去掉local,並指定lib64(64系統)
CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/
CORE_LIBS="$CORE_LIBS -L/usr/lib64 -lfastcommon -lfdfsclient"

(2).nginx 添加fastdfs-nginx-module模塊;
ulimit -SHn 102400
useradd -s /sbin/nologin nginx
tar zxf nginx-1.8.0.tar.gz
cd nginx-1.8.0
./configure --user=nginx --group=nginx --add-module=../fastdfs-nginx-module/src/ --prefix=/usr/local/nginx --with-http_stub_status_module--with-http_ssl_module --with-http_realip_module
make && make install

(3).nginx 配置fastdfs;

nginx_Fastdfs1 配置;

[root@nginx_Fastdfs1 nginx-1.8.0]# cat /usr/local/nginx/conf/nginx.conf
user nginx;
worker_processes 1;
events {
worker_connections 1024;
}
http{
server {
listen 80;
server_name 192.168.1.190;
root /webdata/fastdfs.com;
index index.html index.htm;
location / {
if (!-e $request_filename) {
rewrite ^(.)$ /index.html last;
}
location /group1/M00 {
root /export/fastdfs/storage/data/;
ngx_fastdfs_module;
}
location ~ .
.(gif|jpg|jpeg|png|bmp|swf|js)$ {

fastcgi_cache cache_one; #nginx.conf 開啟cache才行,否則然啟動報錯

   fastcgi_cache_valid 200 10m;
   fastcgi_cache_valid 304 3m;
   fastcgi_cache_valid 301 302 1h;
   fastcgi_cache_valid any 1m;
   fastcgi_cache_min_uses 1;
   fastcgi_cache_use_stale error timeout invalid_header http_500;
   fastcgi_cache_key $host$request_uri;
   access_log off;
   }
   }
access_log off;

}
}

nginx_Fastdfs2 配置;

[root@nginx_Fastdfs2]# cat /usr/local/nginx/conf/nginx.conf
events {
worker_connections 1024;
}
http{
server {
listen 80;
server_name 192.168.1.200;
root /webdata/fastdfs.com;
index index.html index.htm;
location / {
if (!-e $request_filename) {
rewrite ^(.)$ /index.html last;
}
location /group1/M00 {
root /export/fastdfs/storage/data/;
ngx_fastdfs_module;
}
location ~ .
.(gif|jpg|jpeg|png|bmp|swf|js)$ {
#fastcgi_cache cache_one; #nginx.conf 開啟cache,否則啟動報錯
fastcgi_cache_valid 200 10m;
fastcgi_cache_valid 304 3m;
fastcgi_cache_valid 301 302 1h;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_cache_key $host$request_uri;
access_log off;
}
}
access_log off;
}
}

6.fastdfs服務管理;
(1)編寫啟動腳本;
[root@nginx_Fastdfs1]# cat /etc/init.d/fdfs_storaged
#!/bin/bash

fdfs_storaged Starts fdfs_storaged

chkconfig: 2345 99 01

description: FastDFS storage server

BEGIN INIT INFO

Provides: $fdfs_storaged

END INIT INFO

Source function library.

. /etc/init.d/functions
PRG=/usr/local/fastdfs_packages/FastDFS/storage/fdfs_storaged
CONF=/etc/fdfs/storage.conf
if [ ! -f $PRG ]; then
echo "file $PRG does not exist!"
exit 2
fi
if [ ! -f /usr/local/fastdfs_packages/FastDFS/stop.sh ]; then
echo "file /usr/local/fastdfs_packages/FastDFS/stop.sh does not exist!"
exit 2
fi
if [ ! -f /usr/local/fastdfs_packages/FastDFS/restart.sh ]; then
echo "file /usr/local/fastdfs_packages/FastDFS/restart.sh does not exist!"
exit 2
fi
if [ ! -f $CONF ]; then
echo "file $CONF does not exist!"
exit 2
fi

CMD="$PRG $CONF"
RETVAL=0

start() {
echo -n $"Starting FastDFS storage server: "
$CMD &
RETVAL=$?
echo
return $RETVAL
}
stop() {
/usr/local/fastdfs_packages/FastDFS/stop.sh $CMD
RETVAL=$?
return $RETVAL
}
rhstatus() {
status fdfs_storaged
}
restart() {
/usr/local/fastdfs_packages/FastDFS/restart.sh $CMD &
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
rhstatus
;;
restart|reload)
restart
;;
condrestart)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
exit 1
esac
exit $?
[root@nginx_Fastdfs1]# cat /etc/init.d/fdfs_trackerd
#!/bin/bash

fdfs_trackerd Starts fdfs_trackerd

chkconfig: 2345 99 01

description: FastDFS tracker server

BEGIN INIT INFO

Provides: $fdfs_trackerd

END INIT INFO

Source function library.

. /etc/init.d/functions
PRG=/usr/local/fastdfs_packages/FastDFS/tracker/fdfs_trackerd
CONF=/etc/fdfs/tracker.conf

if [ ! -f $PRG ]; then
echo "file $PRG does not exist!"
exit 2
fi

if [ ! -f /usr/local/fastdfs_packages/FastDFS/stop.sh ]; then
echo "file /usr/local/bin/stop.sh does not exist!"
exit 2
fi

if [ ! -f /usr/local/fastdfs_packages/FastDFS/restart.sh ]; then
echo "file /usr/local/bin/restart.sh does not exist!"
exit 2
fi

if [ ! -f $CONF ]; then
echo "file $CONF does not exist!"
exit 2
fi

CMD="$PRG $CONF"
RETVAL=0

start() {
echo -n $"Starting FastDFS tracker server: "
$CMD &
RETVAL=$?
echo
return $RETVAL
}
stop() {
/usr/local/fastdfs_packages/FastDFS/stop.sh $CMD
RETVAL=$?
return $RETVAL
}
rhstatus() {
status fdfs_trackerd
}
restart() {
/usr/local/fastdfs_packages/FastDFS/restart.sh $CMD &
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
rhstatus
;;
restart|reload)
restart
;;
condrestart)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
exit 1
esac
exit $?

(2).fastdfs相關服務啟動;
/etc/init.d/fdfs_trackerd start
/etc/init.d/fdfs_storaged start
/usr/local/nginx/sbin/nginx

(3)查看進程運行情況;
[root@nginx_Fastdfs1 /]# netstat -anplt |grep -E "nginx|fdfs"
tcp 0 0 192.168.1.200:23000 0.0.0.0: LISTEN 1945/fdfs_storaged
tcp 0 0 192.168.1.200:22122 0.0.0.0:
LISTEN 1937/fdfs_trackerd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1798/nginx
tcp 0 0 192.168.1.200:35036 192.168.1.200:22122 ESTABLISHED 1945/fdfs_storaged
tcp 0 0 192.168.1.200:22122 192.168.1.200:35036 ESTABLISHED 1937/fdfs_trackerd
tcp 0 0 192.168.1.200:43282 192.168.1.190:22122 ESTABLISHED 1945/fdfs_storaged
tcp 0 0 192.168.1.200:51407 192.168.1.190:23000 ESTABLISHED 1945/fdfs_storaged
tcp 0 0 192.168.1.200:22122 192.168.1.190:44927 ESTABLISHED 1937/fdfs_trackerd
tcp 0 0 192.168.1.200:22122 192.168.1.190:40724 ESTABLISHED 1937/fdfs_trackerd
tcp 0 0 192.168.1.200:23000 192.168.1.190:54332 ESTABLISHED 1945/fdfs_storaged

[root@nginx_Fastdfs2 ~]# netstat -anplt |grep -E "nginx|fdfs"
tcp 0 0 192.168.1.190:22122 0.0.0.0: LISTEN 1603/fdfs_trackerd
tcp 0 0 0.0.0.0:80 0.0.0.0:
LISTEN 1573/nginx
tcp 0 0 192.168.1.190:23000 0.0.0.0:* LISTEN 1612/fdfs_storaged
tcp 0 0 192.168.1.190:22122 192.168.1.190:54669 ESTABLISHED 1603/fdfs_trackerd
tcp 0 0 192.168.1.190:23000 192.168.1.200:51407 ESTABLISHED 1612/fdfs_storaged
tcp 0 0 192.168.1.190:22122 192.168.1.200:43282 ESTABLISHED 1603/fdfs_trackerd
tcp 0 0 192.168.1.190:40724 192.168.1.200:22122 ESTABLISHED 1603/fdfs_trackerd
tcp 0 0 192.168.1.190:44927 192.168.1.200:22122 ESTABLISHED 1612/fdfs_storaged
tcp 0 0 192.168.1.190:54332 192.168.1.200:23000 ESTABLISHED 1612/fdfs_storaged
tcp 0 0 192.168.1.190:54669 192.168.1.190:22122 ESTABLISHED 1612/fdfs_storaged

7.fastdfs 功能測試;
nginx_Fastdfs1 機器測試;
[root@nginx_Fastdfs1]# fdfs_test /etc/fdfs/client.conf upload test.jsp
This is FastDFS client test program v5.05
Copyright (C) 2008, Happy Fish / YuQing
FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page http://www.csource.org/
for more detail.
[2016-06-07 03:04:04] DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=30, 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
tracker_query_storage_store_list_without_group:
server 1. group_name=, ip_addr=192.168.1.190, port=23000
server 2. group_name=, ip_addr=192.168.1.200, port=23000
group_name=group1, ip_addr=192.168.1.190, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/wKgBvldVySWAObaSAAAAAAAAAAA284.jsp
source ip address: 192.168.1.190
file timestamp=2016-06-07 03:04:05
file size=0
file crc32=0
example file url: http://192.168.1.190/group1/M00/00/00/wKgBvldVySWAObaSAAAAAAAAAAA284.jsp
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/wKgBvldVySWAObaSAAAAAAAAAAA284_big.jsp
source ip address: 192.168.1.190
file timestamp=2016-06-07 03:04:05
file size=0
file crc32=0
example file url: http://192.168.1.190/group1/M00/00/00/wKgBvldVySWAObaSAAAAAAAAAAA284_big.jsp

nginx_Fastdfs2 機器測試;
[root@nginx_Fastdfs2 ~]# fdfs_test /etc/fdfs/client.conf upload test.jsp
This is FastDFS client test program v5.05
Copyright (C) 2008, Happy Fish / YuQing
FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page http://www.csource.org/
for more detail.
[2016-06-07 03:06:33] DEBUG - base_path=/tmp, connect_timeout=30, network_timeout=30, 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
tracker_query_storage_store_list_without_group:
server 1. group_name=, ip_addr=192.168.1.190, port=23000
server 2. group_name=, ip_addr=192.168.1.200, port=23000
group_name=group1, ip_addr=192.168.1.200, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/wKgByFdVybiAcFDfAAAAAAAAAAA902.jsp
source ip address: 192.168.1.200
file timestamp=2016-06-07 03:06:32
file size=0
file crc32=0
example file url: http://192.168.1.200/group1/M00/00/00/wKgByFdVybiAcFDfAAAAAAAAAAA902.jsp
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/wKgByFdVybiAcFDfAAAAAAAAAAA902_big.jsp
source ip address: 192.168.1.200
file timestamp=2016-06-07 03:06:32
file size=0
file crc32=0
example file url: http://192.168.1.200/group1/M00/00/00/wKgByFdVybiAcFDfAAAAAAAAAAA902_big.jsp

FastDFs 開源的輕量級分布式文件系統部署