Skip to content

quota: User hard links need to consume user quota capacity space. #6736

@YunhuiChen

Description

@YunhuiChen

What happened:

root@chaos-k8s-001:~/chenyunhui/juicefs# su - user1
$ dd if=/dev/zero of=/juicefs1/test bs=1G count=1
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.97406 s, 216 MB/s
$ ln /juicefs1/test /juicefs1/hardlink
$
root@chaos-k8s-001:~/chenyunhui/juicefs# ./juicefs quota list redis://127.0.0.1:6379/1
2026/03/12 10:25:12.536740 juicefs[264381] <INFO>: Meta address: redis://127.0.0.1:6379/1 [NewClient@interface.go:627]
2026/03/12 10:25:12.537204 juicefs[264381] <WARNING>: AOF is not enabled, you may lose data if Redis is not shutdown properly. [checkRedisInfo@info.go:84]
2026/03/12 10:25:12.537274 juicefs[264381] <INFO>: Ping redis latency: 30.921µs [checkServerConfig@redis.go:4304]
+----------+--------+---------+------+--------+-------+-------+
|   Path   |  Size  |   Used  | Use% | Inodes | IUsed | IUse% |
+----------+--------+---------+------+--------+-------+-------+
| UID:1000 | 10 GiB | 1.0 GiB |  10% |     10 |     2 |   20% |
+----------+--------+---------+------+--------+-------+-------+

It should display 2G

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version:
  • Cloud provider or hardware configuration running JuiceFS:
  • OS (e.g cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Object storage (cloud provider and region, or self maintained):
  • Metadata engine info (version, cloud provider managed or self maintained):
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage):
  • Others:

Metadata

Metadata

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions