Troubleshooting "Error creating RRD: Too many links"

Troubleshooting "Error creating RRD: Too many links"

Your cmc.log contains errors that read 'Error creating RRD: Too many links'. Additionally, you might experience issues with graphing in Checkmk.

LAST TESTED ON CHECKMK 2.3.0P22

Table of Contents

Problem

This issue occurs on Linux filesystems when the filesystem containing your Checkmk installation has reached the maximum number of directories. This stems from older ext3 filesystems only allowing a maximum of 32,000 subdirectories within a single directory. This is a limitation of the old ext3 filesystem, from which your current ext4 filesystem was probably upgraded.

Solution

Double-check your “Automatic disk space cleanup” settings: “Cleanup abandoned host files older than” should always be enabled and set to a sensible timeframe (default is 30 days).


Next, you can search for empty directories, which can be removed without risk of data loss:

find $OMD_ROOT/var/check_mk/rrd/ -empty -type d


If the above command yields output, you can delete the empty directories by running the following command.

find $OMD_ROOT/var/check_mk/rrd/ -empty -type d -delete

After running these commands, a reboot should be performed at the earliest convenience, to make sure all running processes including the Kernel can create directories again.