Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"df" shows used space is not accurate #5203

Open
frostwind opened this issue Sep 29, 2024 · 1 comment · Fixed by #5221
Open

"df" shows used space is not accurate #5203

frostwind opened this issue Sep 29, 2024 · 1 comment · Fixed by #5221
Assignees

Comments

@frostwind
Copy link

frostwind commented Sep 29, 2024

What happened:
We use Ceph 16.2.x RADOS as backend storage and use PostgreSQL 17 as metadata storage. After many operation of rsync/juicefs sync, "df" is showing much larger space usage(263GB) than its real use in both RADOS pool(29GB) and "du -sh " on juicefs. Seems "df" used space is reported from jfs_counter.usedSpace. I've tried all the command available in juicefs, eg gc/fsck/compact but none of them help to fix it. Seems there is not providing a function to recalculate jfs_counter.usedSpace from underlying metadata , if there is any available function to do so , please let me know. Thanks

[root@vbakjob05 jfs]# df -h
Filesystem Size Used Avail Use% Mounted on
JuiceFS:myjfs 2.0P 263G 2.0P 1% /jfs

[root@ceph1 ~]# ceph df|grep jfs
--- POOLS ---
POOL ID PGS STORED OBJECTS USED %USED MAX AVAIL
jfs 59 32 29 GiB 57.34k 85 GiB 0.02 119 TiB

[root@vbakjob05 jfs]# du -sh
29G .

postgresql metadata

jfs=# select * from jfs_counter;
name | value
---------------------+--------------
nextTrash | 7
nextSession | 32
nextInode | 507906
lastCleanupFiles | 1727581443
nextCleanupSlices | 1727581457
lastCleanupSessions | 1727581492
nextChunk | 475137
lastCleanupTrash | 1727578016
usedSpace | 281507139584
totalInodes | 251264
(10 rows)

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version: juicefs version 1.2.1+2024-08-30.cd871d19ba57 (compiled with juicefs.ceph)
  • Cloud provider or hardware configuration running JuiceFS: --self hosted
  • OS (e.g cat /etc/os-release):Rocky Linux release 8.8 (Green Obsidian)
  • Kernel (e.g. uname -a): 4.18.0-477.27.1.el8_8.x86_64 #1 SMP Wed Sep 20 15:55:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Object storage (cloud provider and region, or self maintained): self hosted ceph 16.2.7 RADOS
  • Metadata engine info (version, cloud provider managed or self maintained): postgresql 17
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage): on-prem DC internal traffic
  • Others:
@frostwind frostwind added the kind/bug Something isn't working label Sep 29, 2024
@davies
Copy link
Contributor

davies commented Oct 8, 2024

We should provide a way to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants