do not report inodes on filesystems that have dynamic inodes such as cephfs; fixes #2664
Costa Tsaousis (ktsaou) committed
Sep 24, 2017 at 00:22 UTC
fec2777017e5c5e4015fe207477f7407e9242e14
1 file changed
+6
src/plugin_proc_diskspace.c
+6
@@ -227,6 +227,12 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) {
227
fsfilcnt_t freserved_root = favail_root - favail;
228
fsfilcnt_t fused = ftotal - favail_root;
229
230
+ if(m->do_inodes == CONFIG_BOOLEAN_AUTO && favail == (fsfilcnt_t)-1) {
231
+ // this file system does not support inodes reporting
232
+ // eg. cephfs
233
+ m->do_inodes = CONFIG_BOOLEAN_NO;
234
+ }
235
+
236
#ifdef NETDATA_INTERNAL_CHECKS
237
if(unlikely(btotal != bavail + breserved_root + bused))
238
error("DISKSPACE: disk inode statistics for '%s' (disk '%s') do not sum up: total = %llu, available = %llu, reserved = %llu, used = %llu", mi->mount_point, disk, (unsigned long long)ftotal, (unsigned long long)favail, (unsigned long long)freserved_root, (unsigned long long)fused);