[ZBX-3159] vfs.fs.size - large filesystem and ZBX_NOTSUPPORTED, possible fix Created: 2010 Oct 28  Updated: 2017 May 30  Resolved: 2012 Jun 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.8.3
Fix Version/s: 2.0.0

Type: Incident report Priority: Major
Reporter: guilherme m. schroeder Assignee: Unassigned
Resolution: Fixed Votes: 6
Labels: agent
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All Linux 32/64bits


Issue Links:
Duplicate

 Description   

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.



 Comments   
Comment by Aleksandrs Saveljevs [ 2010 Oct 29 ]

While we are at it, maybe we should also try to fix ZBX-3151 in a similar way?

Comment by richlv [ 2010 Dec 08 ]

probably the same as ZBX-1010

Comment by Gertjan Awater [ 2011 Nov 17 ]

meanwhile, what is the largest filesystem possible without getting ZBX_NOTSUPPORTED ?

Comment by Alexander Vladishev [ 2012 Jun 19 ]

Fixed with ZBXNEXT-1220 in pre-2.0.0rc5 r27570

Generated at Fri Aug 08 09:52:31 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.