Disk Percentage shows as 0% with ZFS
I love the new system-monitor (especially the new applet) in KDE, but currently it isn't doing the right thing with detecting my hard drive space. It seems to not recognize my drives. I use ZFS with several datasets. If I run df -h
I get output like this:
Filesystem 1K-blocks Used Available Use% Mounted on
none 8035548 3772 8031776 1% /run
udev 7888904 0 7888904 0% /dev
tmpfs 8035548 0 8035548 0% /dev/shm
tank/ROOT/default 144233984 47483776 96750208 33% /
tmpfs 4096 0 4096 0% /sys/fs/cgroup
tmpfs 8035552 16 8035536 1% /tmp
/dev/nvme0n1p1 1046512 787196 259316 76% /boot
tank/HOME 96750336 128 96750208 1% /home
tank/ROOT/default/docker 96771200 20992 96750208 1% /var/lib/docker
tank/ROOT/portage 120279808 23529600 96750208 20% /usr/portage
tank/HOME/myuser 162910336 66160128 96750208 41% /home/myuser
tank/HOME/myuser/Music 118337152 21586944 96750208 19% /home/myuser/Music
tank/HOME/myuser/books 97691008 940800 96750208 1% /home/myuser/books
tank/HOME/myuser/git 180934144 84183936 96750208 47% /home/myuser/git
tank/HOME/myuser/games 147790336 51040128 96750208 35% /home/myuser/steam
tank/HOME/myuser/Pictures 105789056 9038848 96750208 9% /home/myuser/Pictures
tmpfs 1607108 100 1607008 1% /run/user/1000
The actual partition layout looks like this:
$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 476.96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: KXG50ZNV512G NVMe TOSHIBA 512GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1129FC0A-76CB-1C43-9260-A33DE4F3C559
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 2099199 2097152 1G EFI System
/dev/nvme0n1p2 2099200 1000215182 998115983 476G Linux filesystem
I would love for it to report the results of this command zfs list -o available $tank
, but I would settle for the value returned by df -h /
.
When I get some time next month, I'd be happy to look at the code and try to offer a patch, but I don't even know where to get started.