免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2659 | 回复: 0

[FastDFS] 急急!求助,FastDFS迁移数据,可以访问,不能上传 [复制链接]

论坛徽章:
0
发表于 2019-02-16 07:46 |显示全部楼层
您好,数据是换ip迁移,方法是拷数据,换ip,方法是
「如果是用IP地址作为服务器标识,那么需要修改tracker和storage的data目录下的几个数据文件,将旧IP调整为新IP。
注意storage的data目录下有一个.打头的隐藏文件也需要修改。
另外,需要将后缀为mark的IP地址和端口命名的同步位置记录文件名改名。
文件全部调整完成后才能启动集群服务。

tracker server上需要调整的文件列表:
data/storage_groups_new.dat
data/storage_servers_new.dat
data/storage_sync_timestamp.dat

storage server需要调整的文件列表:
data/.data_init_flag
data/sync/${ip_addr}_${port}.mark:此类文件,需要将文件名中的IP地址调整过来。」

迁移完,可以访问,但是上传失败:
/usr/local/bin/fdfs_upload_file /etc/fdfs/client.conf a.txt
upload file fail, error no: 17, error info: File exists

执行:/usr/local/bin/fdfs_monitor /etc/fdfs/client.conf


[2019-02-16 07:45:30] DEBUG - base_path=/fdfs/client, 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 172.30.11.45:22122

group count: 1

Group 1:
group name = g1
disk total space = 3363750 MB
disk free space = 2344458 MB
trunk free space = 177 MB
storage server count = 2
active server count = 2
storage server port = 23000
storage HTTP port = 8888
store path count = 3
subdir count per path = 256
current write server index = 0
current trunk file id = 4271

    Storage 1:
        id = 172.30.11.43
        ip_addr = 172.30.11.43  ACTIVE
        http domain =
        version = 4.06
        join time = 2014-04-22 10:59:30
        up time = 2019-02-15 17:47:48
        total storage = 3363750 MB
        free storage = 2348031 MB
        upload priority = 10
        store_path_count = 3
        subdir_count_per_path = 256
        storage_port = 23000
        storage_http_port = 8888
        current_write_path = 0
        source storage id=
        if_trunk_server= 1
        total_upload_count = 718046
        success_upload_count = 718046
        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 = 718042
        success_set_meta_count = 718042
        total_delete_count = 0
        success_delete_count = 0
        total_download_count = 1048901
        success_download_count = 1048901
        total_get_meta_count = 80
        success_get_meta_count = 80
        total_create_link_count = 0
        success_create_link_count = 0
        total_delete_link_count = 0
        success_delete_link_count = 0
        total_upload_bytes = 146518529179
        success_upload_bytes = 146518529179
        total_append_bytes = 0
        success_append_bytes = 0
        total_modify_bytes = 0
        success_modify_bytes = 0
        stotal_download_bytes = 227459139290
        success_download_bytes = 227459139290
        total_sync_in_bytes = 140032164477
        success_sync_in_bytes = 139961119721
        total_sync_out_bytes = 383203840939
        success_sync_out_bytes = 334351312612
        total_file_open_count = 3128602
        success_file_open_count = 3128521
        total_file_read_count = 1048982
        success_file_read_count = 1048982
        total_file_write_count = 2079531
        success_file_write_count = 2079531
        last_heart_beat_time = 2019-02-16 07:46:10
        last_source_update = 2019-02-15 15:05:20
        last_sync_update = 2019-02-16 00:46:39
        last_synced_timestamp = 2018-11-05 15:02:58 (0s delay)
    Storage 2:
        id = 172.30.11.45
        ip_addr = 172.30.11.45  ACTIVE
        http domain =
        version = 4.06
        join time = 2015-01-28 11:53:33
        up time = 2019-02-15 17:49:09
        total storage = 3363750 MB
        free storage = 2344458 MB
        upload priority = 10
        store_path_count = 3
        subdir_count_per_path = 256
        storage_port = 23000
        storage_http_port = 8888
        current_write_path = 0
        source storage id= 172.30.11.43
        if_trunk_server= 0
        total_upload_count = 331257
        success_upload_count = 331257
        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 = 331255
        success_set_meta_count = 331255
        total_delete_count = 0
        success_delete_count = 0
        total_download_count = 484488
        success_download_count = 484488
        total_get_meta_count = 41
        success_get_meta_count = 41
        total_create_link_count = 0
        success_create_link_count = 0
        total_delete_link_count = 0
        success_delete_link_count = 0
        total_upload_bytes = 68984848573
        success_upload_bytes = 68984848573
        total_append_bytes = 0
        success_append_bytes = 0
        total_modify_bytes = 0
        success_modify_bytes = 0
        stotal_download_bytes = 106021488994
        success_download_bytes = 106021488994
        total_sync_in_bytes = 215889131314
        success_sync_in_bytes = 215696336004
        total_sync_out_bytes = 69017360274
        success_sync_out_bytes = 69017204300
        total_file_open_count = 2928504
        success_file_open_count = 2928464
        total_file_read_count = 484529
        success_file_read_count = 484529
        total_file_write_count = 2443936
        success_file_write_count = 2443936
        last_heart_beat_time = 2019-02-16 07:46:11
        last_source_update = 2018-11-05 15:02:58
        last_sync_update = 2019-02-16 07:46:11
        last_synced_timestamp = 2014-12-09 14:31:28 (1529 days 00h:33m:52s delay)

找了两天,看网上也没找到类似的问题,
麻烦看看是什么问题呢?急着上线,谢谢


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

基于案例的 SQL 优化实战训练营

讲师:中电福富特级专家梁敬彬,参与本次课程培训,你将收获:
1. 能编写出较为高效的 SQL;
2. 能解决70%以上的数据库常见优化问题;
3. 能得到老师提供的高效的相关工具和解决方案;
4. 能举一反三,收获不仅仅是 SQL 优化。
现在购票享受8.8折优惠!
----------------------------------------
优惠时间:2019年3月20日前

大会官网>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP