Skip to content

feat: automatically skip large file systems#427

Open
halpomeranz wants to merge 2 commits intotclahr:developfrom
halpomeranz:skip-large-mountpoints
Open

feat: automatically skip large file systems#427
halpomeranz wants to merge 2 commits intotclahr:developfrom
halpomeranz:skip-large-mountpoints

Conversation

@halpomeranz
Copy link
Contributor

Adding a new configuration variable, exclude_mount_size. If non-zero, exclude any file systems (except the root file system) that are using more than than the specified amount of disk space. May use usual size units-- for example, "4T" for terabytes. Default is zero, which disables this feature. Per Issue #415

halpomeranz and others added 2 commits January 13, 2026 11:01
Adding a new configuration variable, exclude_mount_size. If non-zero, exclude any file systems (except the root file system) that are using more than than the specified amount of disk space. May use usual size units-- for example, "4T" for terabytes. Default is zero, which disables this feature.

Signed-off-by: Hal Pomeranz <hrpomeranz@gmail.com>
@tclahr
Copy link
Owner

tclahr commented Feb 5, 2026

Don't you think it would be good to use bytes as the size unit as min_file_size and max_file_size support bytes only?
Also, in avml the avml_max_memory variable is also defined in bytes.

I can do the proper changes if you agree.

@halpomeranz
Copy link
Contributor Author

To turn this around, wouldn't it be cool if all of these parameters accepted the units that _convert_size_to_kb() does?

We could take the logic from _convert_size_to_kb() and make a _convert_size_to_bytes() function. Then refactor _convert_size_to_kb() to call the new _convert_size_to_bytes(). The parameters that currently expect bytes could just be filtered through _convert_size_to_bytes() directly.

Yes, I was put on this earth to make life difficult. :-)

@tclahr
Copy link
Owner

tclahr commented Feb 6, 2026

Ok, I can rename _convert_size_to_kb to _convert_size_to_bytes and use it to convert max_file_size and min_file_size.

We could make it a helper function (same as command_exists), so it could be called by command collector, used in conditions etc. We could call it size_to_bytes().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants