Results 1 to 10 of 10

Thread: zmdisklog cron job fails after upgrade to RHAS5.4

  1. #1
    Join Date
    Jan 2009
    Location
    Houston, TX
    Posts
    99
    Rep Power
    6

    Red face zmdisklog cron job fails after upgrade to RHAS5.4

    Hi,
    I went ahead to upgrade my devel. box to RHAS5.4 earlier this morning. After I reboot the server, I keep getting an email from "/opt/zimbra/libexec/zmdisklog" cron job saying that "df: `/dev/sda1': Permission denied". The permission doesn't change as I compared to another box. This is what I get with ls -l "brw-r----- 1 root disk 8, 1 Sep 10 13:18 /dev/sda1"
    Thanks in advance,
    PL

  2. #2
    Join Date
    Dec 2008
    Posts
    19
    Rep Power
    6

    Default

    Same problem here... This is the result of executing df -H as root user:
    [zimbra@mail ~]$ df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    58849212 21789384 34022236 40% /
    /dev/sda1 101086 24230 71637 26% /boot
    tmpfs 1037780 0 1037780 0% /dev/shm

    However, executing it as user zimbra produces this output:
    df: `/dev/mapper/VolGroup00-LogVol00': Permission denied
    df: `/dev/sda1': Permission denied

    Our OS is RHEL 5.4 (it's been upgraded from RHEL 5.3).

    Any ideas?

  3. #3
    Join Date
    Dec 2008
    Posts
    19
    Rep Power
    6

    Default

    Problem solved:

    Add user 'zimbra' to 'disk' group.

    It works now...
    Last edited by milesteg; 09-11-2009 at 01:52 AM. Reason: grammatical error

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Please check that SELinux did not get enabled when the upgrade was performed.

  5. #5
    Join Date
    Jan 2009
    Location
    Houston, TX
    Posts
    99
    Rep Power
    6

    Default Update

    SELinux is disabled on my devel. system. Now that 5.4 is installed on the production server. The fix from milesteg seems to fix just the sda and sdb volumes on my production box. I'm still getting permission denied from /dev/mapper/volumes. Any suggestion?
    Thanks.
    PL
    Last edited by ple; 09-15-2009 at 01:30 PM.

  6. #6
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    4
    Rep Power
    7

    Default Run zmdisklog with sudo

    Quote Originally Posted by ple View Post
    SELinux is disabled on my devel. system. Now that 5.4 is installed on the production server. The fix from milesteg seems to fix just the sda and sdb volumes on my production box. I'm still getting permission denied from /dev/mapper/volumes. Any suggestion?
    Thanks.
    PL
    Are you running RHEL 5.4 64bit by any chance?

    While Adding the zimbra user to the disk group on the 32bit test box was the sufficient solution, the same didn't work on the 64bit production box.

    Bare in mind that I'm not sure this is the proper way to fix this issue, but it seems that this is the only script "zmdisklog" run via crontab that gets the "Permission denied" error trying to run df against the /dev/mapper/VolGroup00-LogVol0** entry after the RHEL 5.4 update.

    Anyway, here is what I did as a quick fix to resolve it:

    1- Add a line in sudo (via visudo) for the "zimbra" user as follows:

    Code:
    %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmdisklog
    2- Modify the zimbra crontab to add the sudo command to the zmdisklog line:

    Code:
    */10 * * * * sudo /opt/zimbra/libexec/zmdisklog

    # You should test the command above by hand as the zimbra user before modifying the crontab to make sure it works the way it should.

    ## The examples here assume that you have your software installed under the default /opt/zimbra path

  7. #7
    Join Date
    Jun 2009
    Posts
    31
    Rep Power
    6

    Default /opt/zimbra/libexec/zmdisklog

    I have the same issue, but if you look in the logs, the cron job is still working, but it is generating some extra output to stderr due to zmdisklog doing a "df" on the device files, rather than the mount points. For some reason in Redhat 5.4, non-root users cannot read the device files by default.

    Looking at line 81 in the perl script /opt/zimbra/libexec/zmdisklog , "df" is being run on the device file ($dev) which is what generates the error. But then on line 85 it proceeds to run "df" on the mount points ($mp) which succeeds. I'm not sure why the script does it twice... probably an oversight.

    If you feel brave you could try commenting out lines 81-83 and that should remove the error.

    -Matt
    Last edited by mattg1; 09-25-2009 at 06:02 AM. Reason: reformat

  8. #8
    Join Date
    Sep 2009
    Posts
    11
    Rep Power
    6

    Default

    Quote Originally Posted by mattg1 View Post
    I have the same issue, but if you look in the logs, the cron job is still working, but it is generating some extra output to stderr due to zmdisklog doing a "df" on the device files, rather than the mount points. For some reason in Redhat 5.4, non-root users cannot read the device files by default.

    Looking at line 81 in the perl script /opt/zimbra/libexec/zmdisklog , "df" is being run on the device file ($dev) which is what generates the error. But then on line 85 it proceeds to run "df" on the mount points ($mp) which succeeds. I'm not sure why the script does it twice... probably an oversight.

    If you feel brave you could try commenting out lines 81-83 and that should remove the error.

    -Matt
    I have this exact issue and am going to try this fix. I'll let you know if it works.

  9. #9
    Join Date
    Jan 2009
    Location
    Houston, TX
    Posts
    99
    Rep Power
    6

    Default Update

    I've got to be honest; I'm not that brave to try it on a prod. box. Unfortunately, my devel. box doesn't have logical volumes. Anyhow, I'd appreciate if you could share the results. By the way, this, according to Zimbra, is a bug. You can track it from here.
    Thanks.
    PL

  10. #10
    Join Date
    Sep 2009
    Posts
    11
    Rep Power
    6

    Default

    I can confirm that commenting out lines 81-83 of /opt/zimbra/libexec/zmdisklog seems to fix the problem on one of my systems.

    I have not observed any unwanted side effects.

    Many thanks.
    Guy

Similar Threads

  1. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 04:42 PM
  2. [SOLVED] 5.0.11 to 5.0.12 Upgrade Fails (Stop failed)
    By Mccreations in forum Installation
    Replies: 11
    Last Post: 03-31-2009, 07:05 AM
  3. Replies: 2
    Last Post: 04-17-2008, 10:28 AM
  4. FOSS upgrade fails
    By buraglio in forum Administrators
    Replies: 13
    Last Post: 03-09-2008, 08:53 PM
  5. Replies: 5
    Last Post: 03-01-2007, 02:20 AM

Posting Permissions

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