mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 23:10:41 +02:00
FUSE Mount: what df reports, and -df.logical
1 parent
8ef1e9b77b
commit
4fb6057f52
1 file changed
+32
-2
+32
-2
@@ -405,6 +405,8 @@ weed mount \
|
||||
|
||||
Once usage reaches the limit, space-consuming operations — writes, file and directory creation, hard/symbolic links, and extended-attribute updates — fail with `ENOSPC`. Reads and deletes keep working, so an over-quota mount can be drained back under its limit. `df` inside the mount reports the quota as the filesystem size, with the collection's used size as "used".
|
||||
|
||||
The quota is measured against the space the collection occupies — replicas and EC shards included — the same figure [`df` reports](#what-does-df-output-means). Add [`-df.logical`](#reporting-data-sizes-instead--dflogical) to measure the data instead, so a 5 GiB quota on a `-replication=001` mount admits 5 GiB of files rather than 2.5 GiB.
|
||||
|
||||
Notes:
|
||||
* The quota is **collection-scoped**, not per-directory. Usage is summed across the whole collection, so multiple mounts (or other clients) writing to the same collection share a single budget.
|
||||
* Enforcement is **mount-side**, not an authoritative server-side limit. A client that writes to the collection without setting a quota is not restricted, and two writers on separate mounts can briefly exceed the limit before the next usage poll catches up.
|
||||
@@ -587,11 +589,39 @@ The issue is with samba.conf. If you see NT_STATUS_ACCESS_DENIED error, try to a
|
||||
|
||||
|
||||
### What does "df" output means? ###
|
||||
|
||||
`df` reports the space the cluster gives up to the data, not the size of the data itself.
|
||||
|
||||
```
|
||||
Size: total number of volumes * volume size limit
|
||||
Used: (Logical Total Size of files - Logical Deleted File Size) * replication = physical disk size taken
|
||||
Size: max volume count across all volume servers * volume size limit
|
||||
Used: regular volumes: (file bytes - deleted bytes) * number of replicas
|
||||
ec volumes: every shard on disk, parity included
|
||||
Available = Size - Used
|
||||
```
|
||||
|
||||
So a file written with `-replication=001` is counted twice, and a 10+4 EC volume is counted as its 14 shards — about 1.4x the data it holds. Encoding a replicated volume therefore lowers `Used`, because 14 shards take less room than 2 replicas.
|
||||
|
||||
`Size` is always cluster-wide. `Used` covers only the mount's collection when it was started with `-collection`, so on such a mount `Available` also counts what other collections have taken.
|
||||
|
||||
#### Reporting data sizes instead (`-df.logical`)
|
||||
|
||||
To have `df` answer "how much of my data is stored" rather than "how much room does it take", mount with `-df.logical`:
|
||||
|
||||
```bash
|
||||
weed mount -filer=localhost:8888 -dir=/mnt/seaweedfs -df.logical
|
||||
```
|
||||
|
||||
```
|
||||
Size: Used + Available
|
||||
Used: regular volumes: file bytes - deleted bytes, counted once
|
||||
ec volumes: data shards only, counted once
|
||||
Available = free space / number of copies the mount's replication makes
|
||||
```
|
||||
|
||||
`Available` is scaled because the free space holds that many copies fewer of whatever you write next: on a `-replication=001` mount, 100 GiB of free disk accepts 50 GiB of new data. The replication used is the mount's `-replication` if set, otherwise the filer's default, otherwise the master's. Unlike the default output, this `Available` is computed from cluster-wide usage, so a collection-scoped mount is not told that another collection's space is free.
|
||||
|
||||
The flag also switches `-collectionQuotaMB` to the same accounting, so a mount measures its usage one way.
|
||||
|
||||
### Can't mount as non-root user ###
|
||||
From https://github.com/seaweedfs/seaweedfs/issues/877
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user