Results 1 to 4 of 4

Thread: [SOLVED] ZCS 5.0.3 zmdisklog messed up

  1. #1
    Join Date
    Jul 2006
    Location
    Reno, NV, USA
    Posts
    203
    Rep Power
    9

    Default [SOLVED] ZCS 5.0.3 zmdisklog messed up

    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.

  2. #2
    Join Date
    Jul 2006
    Location
    Reno, NV, USA
    Posts
    203
    Rep Power
    9

    Default more info

    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

  3. #3
    Join Date
    Jul 2006
    Location
    Reno, NV, USA
    Posts
    203
    Rep Power
    9

    Smile [patch] fixed.

    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.

  4. #4
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Nice sleuthing - I'm gonna mark this as solved so other's hunting know there is a solution.

Similar Threads

  1. Trouble Sending mail - All Messages deferred!
    By SiteDiscovery in forum Administrators
    Replies: 7
    Last Post: 09-03-2009, 05:52 AM
  2. Ldap_operations_error
    By tcnj in forum Administrators
    Replies: 4
    Last Post: 05-09-2009, 07:53 AM
  3. 5.0.3/.4 is out!!!
    By mmorse in forum Announcements
    Replies: 0
    Last Post: 03-20-2008, 05:20 PM
  4. Replies: 41
    Last Post: 10-29-2007, 03:36 PM
  5. ZCS 3.2 Beta Available
    By KevinH in forum Announcements
    Replies: 31
    Last Post: 07-07-2006, 04:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •