背景:最近fastdfs服务器突然无法上传文件了,打开服务器后发现storaged服务挂掉了。
执行启动storaged的命令后,发现执行成功,但是进程仍然不存在,查看storaged日志发现提示以下报错:
[2021-09-14 09:20:24] CRIT - file: storage_func.c, line: 933, the store path #1: /home/dfs/data/soft maybe used by other storage server. fields in the mark file: { ip_addr: ***.***.***.***(另外一个ip), port: 23000, store_path_index: 1, create_time: 2021-05-18 09:42:37 }, if you confirm that it is NOT used by other storage server, you can delete the mark file /home/dfs/data/soft/data/.fastdfs_vars then try again. if you DON'T really need to check store path mark to prevent confusion, you can set the parameter check_store_path_mark to false in storage.conf
[2021-09-14 09:20:24] CRIT - file: storage_func.c, line: 2273, storage_check_and_make_data_dirs fail, program exit!
[2021-09-14 09:20:24] CRIT - exit abnormally!
解决方案:把/home/dfs/data/下所有目录下data的.fastdfs_vars全部删除,然后再启动storaged,最后成功了。