NIXStats / nixstatsagent

NIXStats monitoring agent
https://www.nixstats.com
Other
92 stars 38 forks source link

Server summary on servers with specific zfs setup reports larger than actual total Disk Space #33

Closed beejiujitsu closed 2 years ago

beejiujitsu commented 6 years ago

tl;dr: server summary shows 12.7 TB total Disk Space while the actual total disk space is 3.69 TB.

I run Debian 9 with OpenZFS. The ZFS setup has four volumes:

  1. data
  2. data/swap
  3. data/torrents
  4. data/torrents/unfinished

Each of the volumes below data are subsets; that is, they share the same space, essentially being a logical separation.

  allanon  mark  ~  sudo zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
data                      1.58T  3.69T  7.55G  /data
data/swap                 4.25G  3.69T  3.65G  -
data/torrents             1.56T  3.69T  1.28T  /data/torrents
data/torrents/unfinished   293G  3.69T   293G  /data/torrents/unfinished
  allanon  mark  ~ 

A more accurate approach might be to:

  1. detect if a mount point is zfs
  2. See if they share a common parent
  3. Discard any that share a common parent in favor of using only the common parent in the total
  4. Add other non-zfs mounts accordingly to total Disk Space with above

I'd be happy to work on making this available in diskusage.py. I don't have time to work on it right now so wanted to file the bug so others are aware.

beejiujitsu commented 2 years ago

stale/no one cares

ghost commented 2 years ago

stale/no one cares

Nixstats seens barely maintained to be honest. I wonder how things are going since the third-part acquisition...