gkrellmd filesystem monitoring incorrectly queries mount points of type "autofs", forcing all automounted filesystems to be mounted and stuffing up timed unmounts. A further bug (masked by the first) treats cifs filesystems as non-networked, preventing configuration which should allow auto-unmounting of cifs filesystems from working. Reproducible: Always
Created attachment 311895 [details, diff] patch Under linux, running gkrellmd in combination with autofs will force all auto-mounted filesystems to be mounted, and to stay mounted or repeatedly unmount and remount. Mount table entries of type "autofs" represent mount points under control of the automount daemon; if the mount point directory is accessed, then the daemon causes a real filesystem mount to occur. After such an auto-mount, there will be two entries in the mount table, one of type "autofs" and one for the newly mounted filesystem. gkrellmd periodically scans mount points to support the filesystem free-space monitoring. It treats mount points of type "autofs" as real filesystems and attempts to determine their free space. This access causes an automount to occur. If autofs has been configured to automatically unmount after a timeout, then the gkrellmd polling will either prevent the unmount occurring, or cause repeated mount, unmount cycles, depending on the exact configuration. The solution is trivial, simply ignore filesystems of type "autofs" during filesystem polling. Note that with this fix gkrellmd will still happily report on already auto-mounted filesystems through their real mount entries, it just won't cause the auto-mounts to occur. If the user wants to allow these filesystems to auto-unmount, they must be careful to configure gkrellmd's (n)fs-interval to be larger than twice the auto-unmount time. Also, gkrellmd knows that certain filesystem types are network filesystems; it supports different free-space polling frequencies (or disabling of polling) for network vs non-network filesystems via the configuration parameters fs-timeout and nfs-timeout. This separate configuration is handy when setting up gkrellmd to deal with auto-mounted network filesystems. Unfortunately it doesn't treat "cifs" as a network filesystem. The solution is trivial, just treat filesystems of type "cifs" identically to those of type "smb".
FYI, I've submitted the patch above to the gkrellm mailing list already, although as two separate patches. I combined them here as they go to fixing the same issue and one problem masks the other. Also this appears to be a duplicate of bug 286355; I submitted a new report as I felt the earlier one confused the autofs/network issues.
Thanks very much for the patch! I've rolled this into gkrellm-2.3.5-r1.
*** Bug 286355 has been marked as a duplicate of this bug. ***