Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416141 - app-admin/gkrellm - fix autofs / cifs mounting / unmounting
Summary: app-admin/gkrellm - fix autofs / cifs mounting / unmounting
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jim Ramsay (lack) (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
: 286355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-15 19:25 UTC by Gerard Neil
Modified: 2012-06-27 17:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (gkrellmd.patch,859 bytes, patch)
2012-05-15 19:35 UTC, Gerard Neil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Neil 2012-05-15 19:25:36 UTC
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
Comment 1 Gerard Neil 2012-05-15 19:35:09 UTC
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".
Comment 2 Gerard Neil 2012-05-15 19:44:00 UTC
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.
Comment 3 Jim Ramsay (lack) (RETIRED) gentoo-dev 2012-06-27 17:52:34 UTC
Thanks very much for the patch!

I've rolled this into gkrellm-2.3.5-r1.
Comment 4 Jim Ramsay (lack) (RETIRED) gentoo-dev 2012-06-27 17:52:56 UTC
*** Bug 286355 has been marked as a duplicate of this bug. ***