Seafile reports 307GB usage but Ubuntu reports 276G

Hi,
This is really strange, when I’m looking at my webGUI it says under System Admin tab it says:

Storage Used
307.4 GB

But when I’m looking in my Ubuntu terminal it say less:

seafile@Seafile:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Seafile–vg-root 1.5T 276G 1.1T 20% /

only 276GB is used of my harddrive according to Ubuntu.

This is really strange, OK if it was the other way around but this is just not right.
How can I fix this issue?
If you are looking at your setup is this how you see it also?

@daniel.pan @DerDanilo @holantomas

Edit

The DataBase looks alright:

seafile@Seafile:~/nohatech/seafile-server-latest$ sudo mysqlcheck -c -u root -p --all-databases
Enter password:
ccnet-db.Binding OK
ccnet-db.EmailUser OK
ccnet-db.Group OK
ccnet-db.GroupDNPair OK
ccnet-db.GroupUser OK
ccnet-db.LDAPConfig OK
ccnet-db.LDAPUsers OK
ccnet-db.OrgGroup OK
ccnet-db.OrgUser OK
ccnet-db.Organization OK
ccnet-db.UserRole OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.roles_mapping OK
mysql.servers OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
seafile-db.Branch OK
seafile-db.GarbageRepos OK
seafile-db.InnerPubRepo OK
seafile-db.OrgQuota OK
seafile-db.OrgUserQuota OK
seafile-db.Repo OK
seafile-db.RepoFileCount OK
seafile-db.RepoGroup OK
seafile-db.RepoHead OK
seafile-db.RepoHistoryLimit OK
seafile-db.RepoInfo OK
seafile-db.RepoOwner OK
seafile-db.RepoSize OK
seafile-db.RepoTokenPeerInfo OK
seafile-db.RepoTrash OK
seafile-db.RepoUserToken OK
seafile-db.RepoValidSince OK
seafile-db.SeafileConf OK
seafile-db.SharedRepo OK
seafile-db.SystemInfo OK
seafile-db.UserQuota OK
seafile-db.UserShareQuota OK
seafile-db.VirtualRepo OK
seafile-db.WebAP OK
seahub-db.admin_log_adminlog OK
seahub-db.api2_token OK
seahub-db.api2_tokenv2 OK
seahub-db.avatar_avatar OK
seahub-db.avatar_groupavatar OK
seahub-db.base_clientlogintoken OK
seahub-db.base_commandslastcheck OK
seahub-db.base_devicetoken OK
seahub-db.base_filecomment OK
seahub-db.base_filediscuss OK
seahub-db.base_groupenabledmodule OK
seahub-db.base_innerpubmsg OK
seahub-db.base_innerpubmsgreply OK
seahub-db.base_userenabledmodule OK
seahub-db.base_userlastlogin OK
seahub-db.base_userstarredfiles OK
seahub-db.captcha_captchastore OK
seahub-db.constance_config OK
seahub-db.contacts_contact OK
seahub-db.django_content_type OK
seahub-db.django_migrations OK
seahub-db.django_session OK
seahub-db.group_groupmessage OK
seahub-db.group_messageattachment OK
seahub-db.group_messagereply OK
seahub-db.group_publicgroup OK
seahub-db.institutions_institution OK
seahub-db.institutions_institutionadmin OK
seahub-db.institutions_institutionquota OK
seahub-db.invitations_invitation OK
seahub-db.notifications_notification OK
seahub-db.notifications_usernotification OK
seahub-db.options_useroptions OK
seahub-db.organizations_orgmemberquota OK
seahub-db.post_office_attachment OK
seahub-db.post_office_attachment_emails OK
seahub-db.post_office_email OK
seahub-db.post_office_emailtemplate OK
seahub-db.post_office_log OK
seahub-db.profile_detailedprofile OK
seahub-db.profile_profile OK
seahub-db.registration_registrationprofile OK
seahub-db.revision_tag_revisiontags OK
seahub-db.revision_tag_tags OK
seahub-db.role_permissions_adminrole OK
seahub-db.share_anonymousshare OK
seahub-db.share_extragroupssharepermission OK
seahub-db.share_extrasharepermission OK
seahub-db.share_fileshare OK
seahub-db.share_orgfileshare OK
seahub-db.share_privatefiledirshare OK
seahub-db.share_uploadlinkshare OK
seahub-db.sysadmin_extra_userloginlog OK
seahub-db.tags_filetag OK
seahub-db.tags_fileuuidmap OK
seahub-db.tags_tags OK
seahub-db.termsandconditions_termsandconditions OK
seahub-db.termsandconditions_usertermsandconditions OK
seahub-db.trusted_ip_trustedip OK
seahub-db.two_factor_phonedevice OK
seahub-db.two_factor_staticdevice OK
seahub-db.two_factor_statictoken OK
seahub-db.two_factor_totpdevice OK
seahub-db.wiki_groupwiki OK
seahub-db.wiki_personalwiki OK

I did upload a file and then delete the file etc.
And it did record it correctly as far as I could tell.

Upload Filesize 1,72GB according to Windows.

Before:
Seafile: 307,4GB
Ubuntu: 274G

After:
Seafile: 309.3 GB
Ubuntu: 275G

Thanks for report. Will try tomorrow.

What does du -hsl ~/nohatech/seafile-data/ report?

It say:
268G /home/seafile/nohatech/seafile-data/

and Seafile WebGUI say: 307,8GB

so that’s even more strange then Seafile WebGUI reports 39,8GB more then Ubuntu terminal.

du -hsl /home/seafile/nohatech/seafile-data/storage/blocks/*

This command should give you the size of all libraries which you can compare to the data shown in the GUI.

948K
111G
34G
28K
764K
24K
194M
4.3M
52K
56G
1.1G
14G
980K
2.0G
53G
25M
9.4M
304K

As far as I can see this is correct according to Ubuntu terminal but not according to the WebGUI this most be a bug or something.

Seafile supports sedublication within the same libraries. This might be a factor.

Hi @DerDanilo do you have the same issue at your server?
The strange thing is that Seafile WebGUI reports more GB used then Ubuntu terminal reports, and that don’t add up.

Currently I don’t have this issue.
What file system do you guys use for the Seafile-data?

Ok, we are using ext4.

Same here. Seahub saying 1.5TB, system (du -hsl) saying 1.1TB.

Ext4

Then I guess that we have found a bug as two people is having the same issue.

This is very hard think to define. I don’t closelly know what using du to check file size. Cause it can ignore metadata and counting only bytes string (binary file data). And Seahub can count it with all meta data. So there can be different in disk usage. Second think is that seafile split files to block and for reconstruct some versions can use one block from disk but counting usage per file version like there’s no same blocks.

Developers can say more about :slight_smile:

Well that’s one thing that I was thinking of also.
Well, @daniel.pan maybe can answer this quastion?

anyway now I know that you have the same “issue” so I don’t need to worry about it.

Please dry-run rsync on the seafile data folder and see what the stats report.

cd "/seafile-data"
rsync -avzh -n --stats . /tmp/

Example
If you combine the -n flag (dry run or simulate transfer, doesn’t actually copy any files) and --stats you should be able to find out the total amount of files to be copied.

Just to be clear, this command don’t copying any files right?
And either does it do anything else? Just showing how big the copy are?

rsync -avzh -n --stats . /tmp/

As said before… :wink:

Ok, I’m running the command now.
rsync -avzh -n --stats . /tmp/ in the seafile-data folder.

What version of seaflie are you running? I and @holantomas are running CE 6.2.3

Number of files: 114,676 (reg: 108,580, dir: 6,096)
Number of created files: 114,675 (reg: 108,580, dir: 6,095)
Number of deleted files: 0
Number of regular files transferred: 108,580
Total file size: 287.14G bytes
Total transferred file size: 287.14G bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 6.34M
Total bytes received: 351.38K

sent 6.34M bytes received 351.38K bytes 342.91K bytes/sec
total size is 287.14G speedup is 42,942.42 (DRY RUN)
seafile@Seafile:~/nohatech/seafile-data$

so this is not the right amount of data either according to Seafile WebGUI

Yes.
Debian Stretch (9), mariadb, CE 6.2.3, ext4, onlyoffice