landscape-sysinfo reports incorrect disk usage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
landscape-client (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hi,
The "landscape-sysinfo" tool from the "landscape-common" package reports incorrect disk usage percentile on both Ubuntu 20.04 :
```bash
$ lsb_release -sr
20.04
$ landscape-sysinfo --sysinfo-
Usage of /: 89.0% of 87.48GB
=> / is using 89.0% of 87.48GB
$ df -BG /
Filesystem 1G-blocks Used Available Use% Mounted on
/dev/mapper/
```
and 22.04 :
```bash
$ lsb_release -sr
22.04
~$ landscape-sysinfo --sysinfo-
Usage of /: 11.9% of 43.06GB
$ df -BG /
Filesystem 1G-blocks Used Available Use% Mounted on
/dev/mapper/
```
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: landscape-common 19.12-0ubuntu4.3
ProcVersionSign
Uname: Linux 5.4.0-124-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Mon Oct 24 17:14:04 2022
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: landscape-client
UpgradeStatus: No upgrade log present (probably fresh install)
The small discrepancy seems like it could be the facts that
- filesystems allow reserving blocks for root,
- df returns the unprivileged users free space
- and landscape returns the actual free space
Assuming you are using an EXT2/3/4 filesystem, could you check if you have some disk space reserved?
tune2fs -l /dev/mapper/ ubuntu- -vg-ubuntu- -lv | grep Reserved