Seaf-gc does not free disk space

Hi @ all,

i am using seafile since v3 and until now, i solved all my problems by myself - but now i need your help :slight_smile:

My seafile folder on the server occupies about 1.1TB disk space - need to free some space.
I deleted all unnecessary libraries and deleted the trash bin as well.
I disabled the versioning of files, to delete all of the history files.
On the administration interface, the used disk space is 314GB.

If i run it takes about 2h to complete the task and at the end, there is no disk space freed. I ran it serval times, but with no success. There are no errors logged, during cleanup.

Any ideas ?

Server config: Ubuntu Server 16.04 LTS, Seafile 6.0.9 community


It seems to be that i am the only one who have this issue. Where i can find information about the syncing algorithm?
I would try to write my own gc script for tidying up.

How do you run the cleanup task?
I wrote a script that does the cleanup once a week Sunday night. I am still using 5.1.3 though.

Data model information:

Garbage collector implementation:

1 Like

Thx for the links but that’s not what i’m looking for. There are too many deps and i thought there is an API which i can talk to within a small script. I need to solve issue by myself i think…

@Derdanilo: seaf-gc doesnt work in my case, so your script is useless to me

Just FYI - tried the pro version and dont know why, but it is working as expected. Freed about 600GB disk space :slight_smile:

@daniel.pan What is different here? Does the GC in CE not work properly?

The two versions use the same algorithm and share the same code.

1 Like

Did you stop the Seafile Server properly in the CE before running gc?

Sure… it scanned every lib but did not find any blocks to remove.

So what was different then?

Nothing… it’s confusing me too. After install and start of the pro trial of seafile server 6.0.11 i ran a

./ -t 5

and it started to scan the libraries like the CE version, but this time it found serval blocks to delete. While it was running, i connected with another shell and could see much IO on the disks. Running a df -h shows, the fres space was growing.

Before the GC, a du -sh showed 1.1TB of used disk space of the installation directory. After GC was finished, it was just ~340GB.

On both versions, CE and Pro, there was never shown any errors - the CE version, just did not found any blocks which could be deleted.

I’d like to know what was different, this is totall weird. It may be that you did not execute the command with the right permission or that a service was not stopped properly, but what?

Or you configured

keep_days = days of history to keep

and the day limit was reached at the time you did run the gc again.

I did that a while ago, but in some repos one does not want version history because of huge files (videos e.g.) and in other just 30 days. Some may even be good to keep like 1 years, but the option was removed from the gui as far as I see right?

Currently you can only set this global setting in seafile.conf (see manual:

Users could modify these settings individual for each library, if not disabled in with ENABLE_REPO_HISTORY_SETTING = False. Of course it’s possible to modify it via Database too.

I would like to have the possibility that only the admin can configure this setting for each library. @daniel.pan

1 Like

So with this command

It’s no more histories?

No, it just disables the possibility for the user to change these settings in the webinterface

I also have this issue I’m running the gc but it don’t free up the space.
Do I need to run the gc with sudo command?