This is actually prompted by this use within Hashicorp Nomad.
This is for the Linux platform.
Calling "Partitions" reads /proc/1/mountinfo and then correlates the filesystem type to what is returned from /proc/filesystem. Things that are marked as "nodev" in that file are not considered.
This is not what df is doing though.
My test environment here is a docker image. df shows:
This is actually prompted by this use within Hashicorp Nomad.
This is for the Linux platform.
Calling "Partitions" reads /proc/1/mountinfo and then correlates the filesystem type to what is returned from /proc/filesystem. Things that are marked as "nodev" in that file are not considered.
This is not what df is doing though.
My test environment here is a docker image. df shows:
This is what I would class as the expected behaviour
Output from calling "partitions(false)" (printing filesystem and mountpoint):
This is what I would class as the current behaviour
The contents of /proc/filesystems shows:
So whatever filtering df does by default is different to what gopsutil does.
This isn't just in docker environment, I've also got test environments in WSL and standard Linux VM and I equally get different results.