[Nagiosplug-devel] check_disk plugin fails on 80 TB filesystem

Alan Hagge Alan.Hagge at warnerbros.com
Mon Sep 24 16:32:12 CEST 2007


Thomas Guyot-Sionnest wrote:
> From strace I can see that the same statfs call that works with the
> 64bit library returns -1 EOVERFLOW (Value too large for defined data
> type) on the 32bit libs, though I have no idea if it's the same kind of
> issue.
>   
Yes, my issue is the same.  Running strace on my system also yields:

    read(3, "", 4096)                       = 0
    close(3)                                = 0
    munmap(0xb7d1d000, 4096)                = 0
    stat64("/sans/hpfata07", {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0

    statfs("/sans/hpfata07", 0xbfe4a970)    = -1 EOVERFLOW (Value too
    large for defined data type)

    fstat64(1, {st_mode=S_IFREG|0644, st_size=2369, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
    -1, 0) = 0xb7d1d000
    write(1, "DISK UNKNOWN - free space:|\n", 28DISK UNKNOWN - free space:|
    ) = 28

Also:

Sean Finney wrote:

> if this is true, then i think you should be able to fix this problem by
> appending the output of "getconf LFS_CFLAGS" to the CFLAGS used to
compile.
> usually this is something like -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64.

I'd originally been using a binary RPM package downloaded from

    http://dag.wieers.com/rpm/packages/nagios-plugins/

I just grabbed the source RPM and modified it to include your CFLAGS
modification, then recompiled on a 32-bit machine and tried it again on
my target (which is also running 32-bit RHEL4, BTW).  And yes, it worked
fine:

    [root at backup ~]# /usr/lib/nagios/plugins/check_disk -w 20 -c 10 -p
    /sans/hpfata07
    DISK OK - free space: /sans/hpfata07 18384600 MB (21% inode=12%);|
    /sans/hpfata07=65457919MB;83842500;83842510;0;83842520

So that seems to resolve the issue for me.

Given that I'm sure others will, like me, download binary RPMs which
were likely compiled on 32-bit architectures, I guess the bigger
question now is "Is there any way to make this the default without
impacting anything else?"  Could you perhaps try the statfs using the
32-bit code first, and if the EOVERFLOW error is returned, automatically
retry with the 64-bit options?

As for me, thanks to all for the quick assistance!






More information about the Devel mailing list