fastdfs 挂载数据盘扩容的坑。。。
来源:互联网 发布:windows phone版qq下载 编辑:程序博客网 时间:2024/06/06 05:40
背景:文件服务器已经上线三个月,使用fastdfs做文件服务器的中间件,一台tracker服务器,两台storage互相备份(小公司你懂得,白手起家,资源有限,想怎么搞怎么搞),
从阿里云40G的存储快用的差不多了,是时候挂载一个数据盘进行扩容了。内心OS:扩容还不简单,挂载个硬盘,修改个storage配置文件不就行了,然而我就这样入坑了。
首先修改storage配置文件,vim /etc/fdfs/storage.conf
修改如下两点
# path(disk or mount point) count, default value is 1 store_path_count=2 # store_path#, based 0, if store_path0 not exists, it's value is base_path# the paths must be existstore_path0=/home/ubuntu/fastdfs/storage/storage0store_path1=/mnt/data1
(1)store_path_count 文件路径数数:存储文件的硬盘数或挂载点数
(2)文件路径分别是什么
OK,重启storage
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
这个时候查看fdfs的运行情况
/usr/bin/fdfs_monitor /etc/fdfs/clint.conf
问题来了,
重启的这台storage,处于offline状态,另外一台正常active。。。
奔溃,分析日志找原因,
vim /home/ubuntu/fastdfs/tracker/logs/trackerd.log
[2017-12-11 15:20:15] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:16] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:17] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:18] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:19] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:20] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:21] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:22] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:23] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:24] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:25] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:26] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:27] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:28] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:29] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
[2017-12-11 15:20:30] ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
报了一堆错:ERROR - file: tracker_service.c, line: 3550, cmd=84, client ip: 106.15.137.142, package size 32 is not correct, expect length: 16
tracker报错了。。。
网上各种搜索,看源码,意思大概是数据包大小超了,但是如何解决,没有下文
各种尝试,最终试出来来了
两台storage的store_path_count 必须一致,吐血,想想也应该这样呀,不然存在M01的数据同步不到另外一台storage上
所以两台一起修改配置文件重启后,就OK了,
监控运行结果,两台storage均为active状态了
配合nginx使用需要修改mod_fastdfs.conf,修改和storage.conf一致,即可,OK,大功告成!
阅读全文
0 0
- fastdfs 挂载数据盘扩容的坑。。。
- 分布式文件存储系统fastDFS的扩容问题
- aliyun添加数据盘parted方式分区格式化和lvm挂载及数据盘的扩容
- 扩容数据盘(Linux)
- 夸张的扩容盘!
- fastdfs group通过添加硬盘扩容
- Linux 本地文件系统挂载的目录扩容
- 虚拟机磁盘挂载扩容
- 在阿里云盘扩容过程中遇到的坑
- 还原扩容的缩水U盘真实容量方法,让数据免受损失
- xp超极本扩容C盘后分区不见的数据如何恢复
- fastdfs中的数据迁移
- Fastdfs数据迁移
- greenplum的扩容(2)-迁移数据节点
- greenplum的扩容(3)-增加数据节点
- greenplum的扩容(4)-删除数据节点
- Redshift扩容及踩到的坑
- 修复奸商扩容过的U盘
- 合格程序员的思维与能力
- spring boot 集成myBatis的session
- 【Android开发】如何实现android和服务器长连接呢?推送消息的原理
- 字符串反转问题
- 程序员的100条座右铭
- fastdfs 挂载数据盘扩容的坑。。。
- 学习3
- 男子按时还款征信竟出现逾期!买房成泡影!
- 方向倒数和梯度
- 浅谈Mybatis中的零散点
- Double-Checked Locking is Fixed In C++11
- JavaDoc文档注释使用规范
- QtADB
- Webpack中hash与chunkhash的区别,以及js与css的hash指纹解耦方案