Seafile reports 500GB usage but Diskusage over 1.1TB

In Seaqfile Sysadmin page the total usage of Seafile are 500GB. However df command on the server shows a usage of 1.1TB. I have no libraries in trash…
How do I free up the space?

Server are only used for Seafile.

Read the Seafile GC sektion.

It will help you with your issue.
Run the script manually one time first to clean up the seafile system.

try running seaf-gc.sh after stopping the server. See if that cleans up space.
The garbage collector removes blocks which are no longer used in libraries.

If that does not help are you using btrfs?
Try running btrfs filesystem df
You might need to rebalance it

Ok, thanks, It did shrink a little bit. But 1.1TB are reported used by “DF - h”. And Seafile reports: 0.688TB in sys-admin.
It’s a Ubuntu server LVM disk, so no fancy ZFS or similar…

How shall I do to find the 0.5TB (Systme excluded…)…

//Sam

Take a look at your history and trash settings if you have it set to 30 days for a example the seafile gc script will not delete anything until after 30 days.

You can read my guide @github To se how to change it, you have a link to it in this thread.

Ah, thats maybe will get me some bytes… But not 0.5TB… But I’ll try and report back!.. Thanks! :slight_smile:

Well every time you change a file it’s a “history” every time you delete a file it’s history + trash.

So I don’t know how big files your having but 500gb can go fast.

Have you located which folder that are the one that have all of the data?
Are you sure it’s seafile?

Hmm… Just a quick question… Does the Seafile Web UI under sys-admin skip the trash and history?.. Seems like a bad idea…

After setting this in seafile.config:

[history]

How many days that users can keep there history

keep_days = 0
[library_trash]

How often trashed libraries are scanned for removal, default 1 day.

scan_days = 0

How many days to keep trashed libraries, default 30 days.

expire_days = 0

“df - h” - command gives me: 718GB used. And Seafile sys-admin gives me 688GB used. Thats reasonable… :slight_smile: But I need to check the history settings of the libraries…

Hi Calby,

Thank you! Your solution worked for me as well. I was able to delete garbage manually. I wrote the script as you described and set crontab entry. unfortunately, it hasn’t worked for me.

What do you mean with that it don’t work?
Do you get a error message?

It’s the script that we are talking about right?

Edit:
I did find the issue, this is a working script, the -r in the end did not work anymore it should look like this:
(Ofc change the path to your own path.)

#!/bin/bash

stop the server

echo Stopping the Seafile-Server…
systemctl stop seafile.service
systemctl stop seahub.service

echo Giving the server some time to shut down properly…
sleep 20

run the cleanup

echo Seafile cleanup started…
sudo -u seafile /opt/nohatech/seafile-server-latest/seaf-gc.sh

echo Giving the server some time…
sleep 10

start the server again

echo Starting the Seafile-Server…
systemctl start seafile.service
systemctl start seahub.service

echo Seafile cleanup done!

Hi Calby,

I guess -r didn’t work for me. I also had this problem while I was running GC manually. I correct it now. Just to let you know that the file permission is 755 & root user, in our script we are using seafile user… does it makes any trouble to run? I guess it’s not a problem as I set the permission.
sudo -u seafile /opt/nohatech/seafile-server-latest/seaf-gc.sh

I guess it will solve my problem. As its working, I am not that much stressed about it now.

It would be helpful if you could help me to configure my email settings. I followed your installation link to configure email settings…

unfortunately, it’s not working for me. can you please help me ?

You need to setup ssmtp also.

follow this:
https://github.com/NohaTech/Seafile-best-practices-for-Ubuntu/blob/master/NohaTech-Ubuntu-Ssmtp-English.md

Hi Calby

I made the setup… its working now… i changed some setup…

many thanks buddy!!

1 Like

Hi Calby,

sorry to bother you again!

e-mail is working, but I would like to modify some settings. hope you can help me as you know better than me about this software.

how to send share file email using user account rather than seafile account?
how to get server status notification or daily health notification (cpu storage and health) and warning messages?
how to modify email body and ending lines? I would like to change those lines.

Many Thanks!
Aman

I don’t have much time over right now, but if you want CPU etc. then take a look at Logwatch it’s installed right on your server and it 'll send you logs trough email once a day at 06:20 I think it is.
I’m using it my self.

How to modify the email take a look at the manual I think it’s some CSS/HTML scripting to get it to work.