Just upgraded ZCS 5.0.2 -> ZCS 5.0.3 on CentOS4. Everything is fine except every 10 minutes (crontab), my inbox get 4 emails (one for each volume) about disk almost being full, except that it is wrong!
For example, here is one of the emails:
Mar 20 21:10:05 zmailserver zimbramon[21131]: 21131:crit: Disk warning: zimbra.mydomain.com /dev/mapper/vg1-vg1_home at 93%
The real usage for home is:
#df -h
/dev/mapper/vg1-vg1_home 45G 562M 43G 2% /home
Diff'ing the 5.0.2 zmdisklog with 5.0.3 shows it was updated. Perhaps it doesn't understand volume groups?
I've temporarily replaced the 5.0.3 version with the 5.0.2 version and the now the mail-bombing has stopped.
[SOLVED] ZCS 5.0.3 zmdisklog messed up
[SOLVED] ZCS 5.0.3 zmdisklog messed up
ok, well, looks like the calculation is correct, but the raw data fed to the calculation is messed up. It is wrong in 5.0.2 and 5.0.3. It is just that 5.0.3 sends warning emails.
Here is a log entry:
Mar 20 21:30:03 zmailserver zimbramon[13464]: 13464:info: 2008-03-20 21:30:02, DISK: zimbra.mydomain.com: dev: /dev/mapper/vg1-vg1_home, mp: /home, tot: 45955, avail: 43059
43059/45955 = .936
Here is a log entry:
Mar 20 21:30:03 zmailserver zimbramon[13464]: 13464:info: 2008-03-20 21:30:02, DISK: zimbra.mydomain.com: dev: /dev/mapper/vg1-vg1_home, mp: /home, tot: 45955, avail: 43059
43059/45955 = .936
[SOLVED] ZCS 5.0.3 zmdisklog messed up
The DF command for linux used by zmdisklog is 'df -mlP' which outputs (just using home as example):
Filesystem 1048576-blocks Used Available Capacity Mounted on
/dev/mapper/vg1-vg1_home 45955 562 43059 2% /home
This is parsed correctly by this line:
my (undef, $total, undef, $avail) = split(/s+/, $df[0]);
But the error is in the next line:
my $pct=int(($avail/$total)*100) if ($total > 0);
This gives $pct the value of 93% which is available disk space, but the following logic assumes that is percent of disk used. You need to subtract that result from 100, or just used the 'Used' value rather than 'Available'.
I opened bug Bug 26216 - [patch] zmdisklog bad logic - reversed disk used with disk available and attached a simple patch.
It is working fine for me now.
Filesystem 1048576-blocks Used Available Capacity Mounted on
/dev/mapper/vg1-vg1_home 45955 562 43059 2% /home
This is parsed correctly by this line:
my (undef, $total, undef, $avail) = split(/s+/, $df[0]);
But the error is in the next line:
my $pct=int(($avail/$total)*100) if ($total > 0);
This gives $pct the value of 93% which is available disk space, but the following logic assumes that is percent of disk used. You need to subtract that result from 100, or just used the 'Used' value rather than 'Available'.
I opened bug Bug 26216 - [patch] zmdisklog bad logic - reversed disk used with disk available and attached a simple patch.
It is working fine for me now.
[SOLVED] ZCS 5.0.3 zmdisklog messed up
Nice sleuthing - I'm gonna mark this as solved so other's hunting know there is a solution.
Who is online
Users browsing this forum: No registered users and 11 guests