Bug 152419

Summary: Too long device name -> No filesystem info.
Product: Red Hat Enterprise Linux 4 Reporter: Björn Augustsson <oggust>
Component: logwatchAssignee: Ivana Varekova <varekova>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: buchholz, chester.hosey, Christian.Iseli, hjp, joshuadfranklin, marko.asplund, menscher, pcfe, rnb, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www2.list.logwatch.org:81/pipermail/logwatch/2004-November/000592.html
Whiteboard:
Fixed In Version: RHBA-2005-382 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 13:31:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 156322    

Description Björn Augustsson 2005-03-29 11:44:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20050104 Red Hat/1.4.3-3.0.7

Description of problem:
On my RHEL 4 boxes that run LVM, The "Disk Space" output from logwatch
contains no information about the filesystem. 

This is because the "df" command linewraps when the device name is too long.

Here's an example, only the entry for /boot has the proper info.

------------------ Disk Space --------------------

/dev/mapper/homer_vg-rootLV
/dev/sda2             145M   22M  116M  16% /boot
/dev/mapper/homer_vg-exportLV
/dev/mapper/homer_vg-homeLV
/dev/mapper/homer_vg-sambaLV
/dev/mapper/homer_vg-swLV
/dev/mapper/homer_vg-tmpLV
/dev/mapper/homer_vg-usrlocalLV
/dev/mapper/homer_vg-varLV

http://www2.list.logwatch.org:81/pipermail/logwatch/2004-November/000592.html

has a discussion of it, the fix (use "df -hP" instead of "df -h") is
apparently upstream.

/August.

Version-Release number of selected component (if applicable):
logwatch-5.2.2-1

How reproducible:
Always

Steps to Reproduce:
1. Make some LVM filesystems
2. run logwatch
3.
  

Actual Results:  "/dev/mapper/homer_vg-swLV"

Expected Results:  "/dev/mapper/homer_vg-swLV      4.9G   42M  4.6G   1% /sw"


Additional info:

Comment 1 David Lehman 2005-04-06 15:24:37 UTC
All that needs to be done here is changing 'df -h' to 'df -hP' in
scripts/services/zz-disk_space.

Comment 2 Jiri Ryska 2005-04-11 15:21:41 UTC
*** Bug 144012 has been marked as a duplicate of this bug. ***

Comment 3 Joshua Daniel Franklin 2005-04-16 17:33:59 UTC
Note that the upstream LogWatch change was rolled back since Solaris df does not
support -P.

Comment 10 Jiri Ryska 2005-06-20 13:02:24 UTC
*** Bug 160949 has been marked as a duplicate of this bug. ***

Comment 11 Chester Hosey 2005-08-04 14:58:25 UTC
This bug was originally reported in January and it's a one-line fix. The 
upstream 5.2.2 includes a block which specifically identifies Linux, which 
would be a great place to fix this bug.

If "uname -a" on Solaris reports "Linux", then I can understand why upstream 
wouldn't fix this. However, since default installs of RHEL use long LVM names, 
even if upstream wouldn't want to take the change, doesn't it make sense for 
Red Hat to create a one-liner local patch to make this script useful? Why not 
fix this bug?

Comment 12 Marko Asplund 2005-08-08 06:06:27 UTC
due to this bug i'm unable to monitor disk space usage from logwatch reports. i'm having problems 
understanding why it takes more than 4 months to apply a one line fix in RHEL 4.

Comment 13 Joshua Daniel Franklin 2005-09-02 17:48:27 UTC
There is a fix in RHEL4 U2 beta--even pretty-printed! In case you can't wait
grab the rpm from RHN, or just do this:

--- old	2005-09-02 10:41:44.829652856 -0700
+++ /etc/log.d/scripts/services/zz-disk_space	2005-05-12 06:12:59.000000000 -0700
@@ -17,7 +17,8 @@ if [ "$PRINTING" = "y" ]  && [ "`uname -
    echo
    echo "------------------ Disk Space --------------------"
    echo
-   df -h | grep '^/dev/'
+   df -hP | grep '^/dev/' | \
+     sed 's/\([^[:space:]]\{20,\}\)\(.*\)/\1\n                    \2/'
    echo
 elif [ "$PRINTING" = "y" ] ; then
    echo


Comment 14 Ivana Varekova 2005-10-05 07:04:36 UTC
*** Bug 169918 has been marked as a duplicate of this bug. ***

Comment 15 Red Hat Bugzilla 2005-10-05 13:31:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-382.html


Comment 16 Ivana Varekova 2005-10-07 10:15:02 UTC
*** Bug 170100 has been marked as a duplicate of this bug. ***