Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-3159

vfs.fs.size - large filesystem and ZBX_NOTSUPPORTED, possible fix

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.0
    • 1.8.3
    • Agent (G)
    • All Linux 32/64bits

      Trying to monitor a large filesystem returns ZBX_NOTSUPPORTED.

      1. zabbix_agentd -t vfs.fs.size[/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274,pfree]
        vfs.fs.size[] [m|ZBX_NOTSUPPORTED]

      From df -h:
      znfs-5007.fs.xxxx.xxx.xx:/storage/ZNFS-5007/280465a6-b940-5cf9-f9b0-141b5090f274
      7.0T 453G 6.5T 7% /var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274

      Stracing it, we see that statfs() gets EOVERFLOW:

      statfs("/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274", 0xbfe206ec) = -1 EOVERFLOW (Value too large for defined data type)

      The solution i found was to recompile the client using this:

      1. CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --enable-agent

      Then it works fine, because it uses statvfs64():

      1. ./zabbix_agentd -t vfs.fs.size[/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274,pfree]
        vfs.fs.size[] [d|93.608536]

      From strace:

      stat64("/var/run/sr-mount/280465a6-b940-5cf9-f9b0-141b5090f274",

      {st_mode=S_IFDIR|0755, st_size=249, ...}

      ) = 0

      I've been playing with zabbix-1.8.3/src/libs/zbxsysinfo/linux/diskspace.c, changing from statvfs/statfs to statvfs64/statfs64, but got into problems compiling and maybe it's not the better way to do this.

      On 32 or 64 bits archs, zabbix_agentd uses statfs/statvfs and should use statfs64/statvfs64, so people with big file systems don't get ZBX_NOTSUPPORTED.

            Unassigned Unassigned
            lero guilherme m. schroeder
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: