seahub_cache 在哪里?怎么也找不到。断电后某个资料夹打不开。commit is damaged。


#1

如题,centos7.0 +seafile 6.3搭建的seafile ,某一个资料夹打不开了,一直转圈就是加载不出来,按f12打开浏览器调试发现报错:
Page unavailable

Sorry, but the requested page is unavailable due to a server hiccup.

Our engineers have been notified, so check back later.
有人说是 清空 seahub_cache,但是我找了我的机器 /tmp/ 目录下没有这个目录,\seafile-server\seahub_cache也没有这个目录,到底这个目录在哪里?希望大神能帮忙解答下,谢谢

补充,以下为两个log文件的报错日志:
[root@localhost logs]# cat seafile.log

[10/28/2020 03:10:40 PM] …/common/fs-mgr.c(1891): [fs mgr] Failed to read dir 55e3a8202648cfb7a9e80a2c5986372206c83684.
root@localhost logs]# cat seahub.log

2020-10-28 15:10:40,539 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /ajax/lib/447c8927-672a-472d-97f4-69d23de426b8/dir/
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.3.3/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/opt/seafile/seafile-server-6.3.3/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/opt/seafile/seafile-server-6.3.3/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/opt/seafile/seafile-server-6.3.3/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/seafile/seafile-server-6.3.3/seahub/seahub/auth/decorators.py”, line 70, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.3.3/seahub/seahub/views/ajax.py”, line 303, in list_lib_dir
username, -1, -1)
File “/opt/seafile/seafile-server-6.3.3/seafile/lib64/python2.7/site-packages/pysearpc/client.py”, line 112, in newfunc
return fret(ret_str)
File “/opt/seafile/seafile-server-6.3.3/seafile/lib64/python2.7/site-packages/pysearpc/client.py”, line 79, in _fret_objlist
raise SearpcError(dicts[‘err_msg’])
SearpcError: Bad dir id

另外如果是commit 被损坏的话,我直接找到/opt/seafile/seafile-data/storage/fs/目录下找到对应的资料库id的文件夹,能有办法恢复这个资料库的文件么?


#2

此问题已经解决,使用如下命令即可修复,200G内容时间较长,用了4个小时。 447开头的是资料库的id
cd /opt/seafile/seafile-server-latest

./seaf-fsck.sh --repair 447c8927-672a-472d-97f4-69d23de426b8