zfs mounts used size not always correctly reported
- Dominant language
- Rust
- Stars
- 2.9k
- Forks
- 59
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
I've notices that the reporting on zfs pools is not accurate. The used value for each is not correct as can be seen here:
```
|system/logs |zfs | |301Mi| 9% -----|3.1Gi| 3.4Gi|/var/log
|system/audit |zfs | |301Mi| 9% -----|3.1Gi| 3.4Gi|/var/log/audit
|system/home |zfs | |170Mi| 5% -----|3.1Gi| 3.3Gi|/home
```
`zfs list` show the used as:
```
NAME USED AVAIL REFER MOUNTPOINT
system/audit 25.2M 3.14G 25.2M /var/log/audit
system/home 170M 3.14G 170M /home
system/logs 301M 3.14G 301M /var/log
```
It seems to catch the 301M for `/var/log` and apply it to `/var/log/audit` too.
Contributor guide
Research direction
Start by reproducing the discrepancy with the issue's `zfs list` output and compare it with dysk's filesystem rows for `/var/log`, `/var/log/audit`, and `/home`. Trace the filesystem reporting path that gathers ZFS mount values; done means each dataset row reports its own used value rather than reusing the parent mount's value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100