[Nagiosplug-help] check_disk, FreeBSD 5.3 and gmirror

Ben O'Hara bohara at gmail.com
Mon Feb 14 07:27:32 CET 2005


Hi Guys,
            Bit of a strange problem here, wondering if anyone can help!

Ive just installed 2 new FreeBSD 5.3 machines and used gmirror to
software raid 2 disks together.

When ive added a check_disk check into nagios im getting back some
strange results!

>From the box

doc-store02# df -lkhi
Filesystem            Size    Used   Avail Capacity iused    ifree
%iused  Mounted on
/dev/mirror/gm0s1a    248M     35M    193M    15%     984    32038    3%   /
devfs                 1.0K    1.0K      0B   100%       0        0  100%   /dev
/dev/mirror/gm0s1g    127G    9.9G    107G     8% 1453640 15809974    8%   /apps
/dev/mirror/gm0s1e    989M    390K    910M     0%       9   141301    0%   /tmp
/dev/mirror/gm0s1f    1.9G    155M    1.6G     9%    9934   272688    4%   /usr
/dev/mirror/gm0s1d    989M    6.9M    903M     1%     144   141166    0%   /var

Now im only really interested in /apps (at least thats where im seeing
the problem)

df reports it as being 8% used, however when using check_disk i get
the following back

doc-store02# ./libexec/check_disk -v
DISK OK - free space: / 193 MB (78%); /dev 0 MB (0%); /apps 109881 MB
(84%); /tmp 910 MB (92%); /usr 1665 MB (84%); /var 903 MB (91%);|
/=54MB;247;247;0;247 /dev=0MB;0;0;0;0
/apps=20542MB;130423;130423;0;130423 /tmp=80MB;989;989;0;989
/usr=314MB;1978;1978;0;1978 /var=86MB;989;989;0;989

Above you can see that check_disk has reported it as being 16% used,
exactly twice the usage as it really has.

Im assuming its related to using gmirror and the way in which
check_disk gathers its values to make its calculation? Any chance its
getting the used space from both disks and adding it together?

Ben




More information about the Help mailing list