Damaged library

Hello, yesterday I think my server crashed during a big upload of files using cloud file browser.
When the server went up again the library was showing “server error” message. So i run seaf-fsck.sh (without arguments) to check libraries and this is the output referred to the damaged library.

[11/12/18 19:01:27] fsck.c(593): Running fsck for repo cc02ffff-8611-47e0-b953-6fdf60759d22.
[11/12/18 19:01:27] Empty input for zlib, invalid.
[11/12/18 19:01:27] ../../common/fs-mgr.c(2874): Failed to decompress fs object ada92ed4476651e84178ac4c2ec4a63826116b52.
[11/12/18 19:01:27] fsck.c(638): Repo cc02ffff HEAD commit is damaged, need to restore to an old version.
[11/12/18 19:01:27] fsck.c(498): Scanning available commits...
[11/12/18 19:03:12] Empty input for zlib, invalid.
[11/12/18 19:03:12] ../../common/fs-mgr.c(2874): Failed to decompress fs object ada92ed4476651e84178ac4c2ec4a63826116b52.
[11/12/18 19:03:12] Empty input for zlib, invalid.
[11/12/18 19:03:12] ../../common/fs-mgr.c(2874): Failed to decompress fs object 2d1c9ad047e7a94508000c2abeadf8171249084d.
[11/12/18 19:03:12] Empty input for zlib, invalid.
[11/12/18 19:03:12] ../../common/fs-mgr.c(2874): Failed to decompress fs object b7ef168453bcacc2ac99d207cdd79c82cbf90c8f.
[11/12/18 19:03:12] Empty input for zlib, invalid.
[11/12/18 19:03:12] ../../common/fs-mgr.c(2874): Failed to decompress fs object a43518cfa7a7e21da3ea7d2496a6640c4556adb6.
[11/12/18 19:03:12] Empty input for zlib, invalid.
[11/12/18 19:03:12] ../../common/fs-mgr.c(2874): Failed to decompress fs object 920b5f4788c4a80bfc1985173126f7d10052ce84.
[11/12/18 19:03:13] Empty input for zlib, invalid.
[11/12/18 19:03:13] ../../common/fs-mgr.c(2874): Failed to decompress fs object 7a6db5bc2bab29d5f7cfa7be3e9977dd30dffd7c.
[11/12/18 19:03:13] Empty input for zlib, invalid.
[11/12/18 19:03:13] ../../common/fs-mgr.c(2874): Failed to decompress fs object 6007e5d2630f535930949f0c219d0275899b304f.
[11/12/18 19:03:13] Empty input for zlib, invalid.
[11/12/18 19:03:13] ../../common/fs-mgr.c(2874): Failed to decompress fs object 48f14195a289bc7a43a1dbf25cbcdf42e4b407f0.
[11/12/18 19:03:13] Empty input for zlib, invalid.
[11/12/18 19:03:13] ../../common/fs-mgr.c(2874): Failed to decompress fs object 2323e2b96776af0a544a8bf10a47b6f2db421b49.
[11/12/18 19:03:13] fsck.c(558): Find available commit 403d71af(created at 2018-11-11 19:57:25) for repo cc02ffff.
[11/12/18 19:03:13] fsck.c(413): Checking file system integrity of repo Foto&Video(cc02ffff)...
[11/12/18 19:28:56] fsck.c(657): Fsck finished for repo cc02ffff.

I searched the forum and the manual but can’t find the specific case.

Server is 6.3.2 ce on raspberry, client is windows 6.1.8. Data uploaded was about 15 GB of photos and videos. The library was about 50GB before the upgrade.

Let me know if I can provide more info.
Thanks

I would start by checking dmesg for errors from the disk (i/o errors or something), and smartctl for disk errors. Then fsck that disk. I haven’t ever seen that error, but I am guessing that “Empty input for zlib” means it got no data from whatever file it opened, which makes me think file system or disk error.

Well no error shown, disk is ok. Something went wrong during massive upload. Now the library keeps trying to sync but it seems empty when browsing it.

I can’t desync on clients. If I delete the library on the client, seafile keeps creating it but can’t fill it with files.

Ugly way i fixed: even if I have seafile-data and db backed up, I didn’t want to restore all seafile so I just deleted the library on the server (web interface). I opened a client that still has all files from the library and recreate the library from this.

Maybe not the right way to fix this corruption problem, but worked…

Solution would have been to run fsck with repair option on the library.

1 Like

@shoeper but fsck without option didn’t show anything damaged… should’t it show that something is worng?

Yes, it did…

2 Likes

Well, I must be blind. Thanks, next time I’ll try the right way =)

So only solution for this situation is have backup of Seafile repository or delete library ? Thanks

No, if it’s possible for Seafile to repair the library, there may be the loss of some files but in general it would work again.

I had the same problem yesterday…

sh-4.4$ ./seaf-fsck.sh 0cfca53d-35ca-4aa0-863d-982e3b3d32bc 

Starting seaf-fsck, please wait ...

[11/16/18 20:10:11] fsck.c(593): Running fsck for repo 0cfca53d-35ca-4aa0-863d-982e3b3d32bc.
[11/16/18 20:10:11] Empty input for zlib, invalid.
[11/16/18 20:10:11] ../../common/fs-mgr.c(2874): Failed to decompress fs object 74951a537845769745507e93c970ebbf9d43b15a.
[11/16/18 20:10:11] fsck.c(638): Repo 0cfca53d HEAD commit is damaged, need to restore to an old version.
[11/16/18 20:10:11] fsck.c(498): Scanning available commits...
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object 74951a537845769745507e93c970ebbf9d43b15a.
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object f97ac0f915d7bfe9b32f141c02e0203ac07fa9e8.
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object 2abf66f6266bcc14ab289419abb6fcf03583e34e.
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object 117c876cc65c8453e446fd6b64d7d0196f2f41ed.
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object ec52a961877365e344c263ba9ae2df641b84c6f8.
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object 86d1ba584d09e14da546b594d09b742b8f38ae1d.
[11/16/18 20:11:09] Empty input for zlib, invalid.
[11/16/18 20:11:09] ../../common/fs-mgr.c(2874): Failed to decompress fs object dd4388f02b466ed8de4e642460277ddf225b3965.
[11/16/18 20:11:09] fsck.c(558): Find available commit 05a8f1d5(created at 2018-11-10 21:39:56) for repo 0cfca53d.
[11/16/18 20:11:09] fsck.c(413): Checking file system integrity of repo FOLDERNAME (0cfca53d)...
[11/17/18 02:13:15] fsck.c(657): Fsck finished for repo 0cfca53d.

seaf-fsck run done

Done.

I fixed it with -- repair as well. But I had to resync the folder on the client side.

sh-4.4$ ./seaf-fsck.sh --repair 0cfca53d-35ca-4aa0-863d-982e3b3d32bc

Starting seaf-fsck, please wait ...

[11/17/18 08:43:43] fsck.c(593): Running fsck for repo 0cfca53d-35ca-4aa0-863d-982e3b3d32bc.
[11/17/18 08:43:43] Empty input for zlib, invalid.
[11/17/18 08:43:43] ../../common/fs-mgr.c(2874): Failed to decompress fs object 74951a537845769745507e93c970ebbf9d43b15a.
[11/17/18 08:43:43] fsck.c(56): Dir 74951a537845769745507e93c970ebbf9d43b15a is damaged, remove it.
[11/17/18 08:43:43] fsck.c(638): Repo 0cfca53d HEAD commit is damaged, need to restore to an old version.
[11/17/18 08:43:43] fsck.c(498): Scanning available commits...
[11/17/18 08:44:31] fsck.c(40): Dir 74951a537845769745507e93c970ebbf9d43b15a is missing.
[11/17/18 08:44:31] Empty input for zlib, invalid.
[11/17/18 08:44:31] ../../common/fs-mgr.c(2874): Failed to decompress fs object f97ac0f915d7bfe9b32f141c02e0203ac07fa9e8.
[11/17/18 08:44:31] fsck.c(56): Dir f97ac0f915d7bfe9b32f141c02e0203ac07fa9e8 is damaged, remove it.
[11/17/18 08:44:31] Empty input for zlib, invalid.
[11/17/18 08:44:31] ../../common/fs-mgr.c(2874): Failed to decompress fs object 2abf66f6266bcc14ab289419abb6fcf03583e34e.
[11/17/18 08:44:31] fsck.c(56): Dir 2abf66f6266bcc14ab289419abb6fcf03583e34e is damaged, remove it.
[11/17/18 08:44:31] Empty input for zlib, invalid.
[11/17/18 08:44:31] ../../common/fs-mgr.c(2874): Failed to decompress fs object 117c876cc65c8453e446fd6b64d7d0196f2f41ed.
[11/17/18 08:44:31] fsck.c(56): Dir 117c876cc65c8453e446fd6b64d7d0196f2f41ed is damaged, remove it.
[11/17/18 08:44:31] Empty input for zlib, invalid.
[11/17/18 08:44:31] ../../common/fs-mgr.c(2874): Failed to decompress fs object ec52a961877365e344c263ba9ae2df641b84c6f8.
[11/17/18 08:44:31] fsck.c(56): Dir ec52a961877365e344c263ba9ae2df641b84c6f8 is damaged, remove it.
[11/17/18 08:44:32] Empty input for zlib, invalid.
[11/17/18 08:44:32] ../../common/fs-mgr.c(2874): Failed to decompress fs object 86d1ba584d09e14da546b594d09b742b8f38ae1d.
[11/17/18 08:44:32] fsck.c(56): Dir 86d1ba584d09e14da546b594d09b742b8f38ae1d is damaged, remove it.
[11/17/18 08:44:32] Empty input for zlib, invalid.
[11/17/18 08:44:32] ../../common/fs-mgr.c(2874): Failed to decompress fs object dd4388f02b466ed8de4e642460277ddf225b3965.
[11/17/18 08:44:32] fsck.c(56): Dir dd4388f02b466ed8de4e642460277ddf225b3965 is damaged, remove it.
[11/17/18 08:44:32] fsck.c(558): Find available commit 05a8f1d5(created at 2018-11-10 21:39:56) for repo 0cfca53d.
[11/17/18 08:44:32] fsck.c(413): Checking file system integrity of repo FOLDERNAME(0cfca53d)...
[11/17/18 15:00:56] fsck.c(391): Update repo 0cfca53d status to commit 439bfac2.
[11/17/18 15:00:56] fsck.c(657): Fsck finished for repo 0cfca53d.

seaf-fsck run done

Done.

Is this a good solution? I’m just not really sure about it how safe the way is without any data loss.

I can’t check the whole folder because it is 380GB big.

Actually, it seems to be fine. I checked the number of files after and before resync. But I’m not really sure.

And by the way. I’m using Arch on my Raspberry Pi. What about you? Might be a same problem!? Because my last sync was around your date. Only one day before. Might be an update for zlib at this time?

Edit:
No zlib update at this time. Something else …

It is a hardware or system failure. A raspberry pi isn’t the most reliable thing.

And yes, when using repair the library is getting unsynced.

2 Likes

I had no problems for 3 years. Maybe it’s time.
I’ll keep an eye on it.

Thanks for the info.