Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Disk Warning - Exclude

Nick PlanetHoster shared this idea 3 years ago
Completed

As a System Administrator or Web Hosting Provider, I would like a way to exclude non-official Mount points from Disk Warning in tweak settings so that if the disk is shared by many users and it starts filling up, the user won't receive a cPanel notice.


====================


Add a way to exclude non official Mount point from Disk Warning in tweak settings.

Replies (8)

photo
1

I need this too... For example, I've installed https://snapcraft.io/ which creates a small partition to run. This partition is always 100% utilized.

I receive continuous critical warning messages about this partition, but this is expected behaviour.

photo
2

For anyone who is interested, you can create a diff patch to work around this issue until there is official support. cPanel would not recommend this, however learning about the gaining popularity of Snapcraft, I think it's appropriate to exclude 'snapd' from _diskcheck

/usr/local/cpanel/Cpanel/TailWatch/ChkServd.pm line 765

next if ( $device->{'mount'} =~ m{/(?:virtfs|cagefs|snapd)/} );

photo
1

Bookmarked. I'm implementing this change today. I hope it works. Such a waste of resources and time deleting 4 emails everyday.

photo
1

Would my server need a reboot for this to work? I found today that the same 4 emails came in with regards to snapd disks being full.

photo
1

Can we have a little more context on this patch? 765 in my version doesn't look like an appropriate place for this code.

photo
photo
5

In cPanel & WHM version 94, you will be able to configure ChkServd to ignore mount points. ChkServd will look for entries in a new configuration file: /var/cpanel/chkservd_ignored_mounts. Entries in that file are used to ignore disk space checks.

photo
2

Thank you. Just installed v94 and am wanting to configure this. Can't find any sample config file supplied to provide syntax. What is config file syntax, please?

photo
1

Here is a sample config from one of my servers:

❯ cat /var/cpanel/chkservd_ignored_mounts

snapd

If you want to ignore multiple mount points, they need to be new line separated. The chkservd service doesn't use absolute paths for ignoring mount points.

photo
1

To clarify what you are saying, if I am getting DISKCRITICAL messages for:


/var/lib/snapd/snap/snapd/10238     100% (31,872 of 31,872)
/var/lib/snapd/snap/core20/904      100% (63,232 of 63,232)

then the contents of this file should be simply:

10238
904
Is this correct?
Thanks.
photo
photo
1

Hi, is there any documentation on the syntax for this feature? I'm looking to disable the multiple snapd drives that trigger on a daily basis.

photo
1

Not much to the syntax. Just one number per line:

123
987
472
etc.

photo
1

Is there any official documentation regarding the solution? Once we update /var/cpanel/chkservd_ignored_mounts do we need to run /scripts/restartsrv_chkservd ?

Also, the mounts are still showing red in Home » Server Status » Service Status (See attached).

Nice to see a solution, would be nice to see documentation. Unless it's there and I just can't find it...

3a85b5c595396f266b2b878af09fff22

photo
1

I hope a more permanent fix for this issue will be forthcoming. The writearound given is nowhere near permanent.

Every couple of weeks, I get a new message about a filesystem at 100% usage. At the same time, one of the old 100% Snapcraft partition numbers has disappeared. Clearly some background operation is causing an existing partition to be renamed, recreated, or updated under a new name. Then I have to manually edit the exception file every week or two to suppress the messages. This is hardly less work than just ignoring the error messages in the first place.

Leave a Comment
 
Attach a file