mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-08 23:02:40 -05:00
NFS mounts are ignored in Disks stats #403
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kiler129 on GitHub (Jun 1, 2025).
Problem
Periphery seems to ignore NFS mounts when displaying disk stats:
I found that
get_disks()in stats.rs is responsible for listing disks in periphery's source code. However, the mount is neitheroverlayfsnor I defined eitherPERIPHERY_INCLUDE_DISK_MOUNTSorPERIPHERY_EXCLUDE_DISK_MOUNTS.From the container side this is how the userland sees it:
The NFS mount is created on the host (via standard
/etc/fstab) and bound to the container like so:Source of the issue
I did dig deeper and found that the issue stems from the upstream library. The NFS was deliberately disabled by default, as it could hang on errors. However, the
sysinfolibrary added an option to re-enable all networked mounts about a year later.Possible fix
Since I have zero experience in Rust, I didn't even attempt a PR. However, testing with this simple code:
I can indeed see that enablind
linux-netdevsviacargo run -F sysinfo/linux-netdevsindeed brings NFS back. Due to potential hangs, I think Periphery should be compiled withlinux-netdevsbut introduce a default filter similar tosysinfothat filters-out networked filesystems. Such filter could be be controlled withPERIPHERY_INCLUDE_DISK_NETthat defaults tofalse.However, I'm not sure if the refresh is asynchronous-enough to prevent hangs on the
sysinfoside anyway?@mbecker20 commented on GitHub (Jun 1, 2025):
Interesting, thanks for looking into it.
@kiler129 commented on GitHub (Jun 17, 2025):
@mbecker20 Did you maybe have a chance to look at it, or would you like me to try to explore adding this option?
@mbecker20 commented on GitHub (Jun 19, 2025):
I don't use any NFS mounts so not really in a position to verify if changes work. Additionally, it may be better to contribute any fix to the sysinfo library itself, if they support nfs then Komodo will by extension.
@kiler129 commented on GitHub (Jun 23, 2025):
@mbecker20 To clear things up a bit, I was initially planning to bring changes to
sysinfodirectly. However, it seems that they back-tracked on their decision to filter-out any network mounts and it does work as long aslinux-netdevsfeature flag is enabled during compile time.In other words, to make it work in Komodo no changes are needed on the
sysinfoside, but Komodo needs to be compiled withlinux-netdevsenabled.@mbecker20 commented on GitHub (Jun 26, 2025):
Understood, although my comment still applies. My worry is if there is some issue with enabling the flag, I don't use NFS to test the stability of things myself. You also mentioned a periphery flag to control whether to filter out nfs, but if there is a hang under the hood I'm not sure disabling this would fix the issue, since it would still be fetching the nfs stats under the hood with the flag enabled. So I am a bit unsure about whether this could introduce unresolvable issues re hanging, which I cannot verify before release.