[CentOS] Discrepancy between df and quota commands

Wed Feb 6 06:45:29 UTC 2008
Balaji <balajisundar at midascomm.com>

Hi All,

There is some discrepancy between what quota reports and what du reports

-bash-3.00$ cat /etc/redhat-release
CentOS release 4.4 (Final)

-bash-3.00$ pwd
/home/corview

-bash-3.00$ df .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vgroot-LogVol01
                      10095152    586932   8995404   7% /home

-bash-3.00$ du -sh .
19M     .

-bash-3.00$ quota
Disk quotas for user corview (uid 934):
     Filesystem  blocks   quota   limit   grace   files   quota
limit   grace
/dev/mapper/vgroot-LogVol01
                 968480* 900000 1000000    none     268       0       0


As shown above du says only 19MB is occupied by user corview( No big
files of corview are present in /tmp/ or /var/ )
But quota says 968480 out of  1000000   is used.



-bash-3.00$ id
uid=934(corview) gid=934(corview) groups=19(floppy),934(corview),935(admin)
-bash-3.00$ grep 934 /etc/passwd
corview:x:934:934::/home/corview:/bin/bash
nbiperf:x:946:934::/home/nbiperf:/bin/bash
nbibill:x:947:934::/home/nbibill:/bin/bash
rilbill:x:948:934::/home/rilbill:/bin/bash

So, no other user with id 934. and data in other users who are in
corview group is also very small.

lsof hasnt revealed any thing.

How do I know which file(s) is(are) eatig so much.?

I found a peculiar problem
-bash-3.00$ pwd
/home/corview
-bash-3.00$ ls -l
total 20
drwxrwxr-x  2 corview admin   4096 Nov 15 12:53 as
-rw-r--r--  1 corview corview    0 Feb  5 15:50 b
drwxr-xr-x  6 corview corview 4096 Nov 14 22:49 log
drwxr-xr-x  3 corview corview 4096 Nov 14 22:49 print
drwxr-xr-x  4 root    root    4096 Nov 14 22:48 replicatedfiles
drwx------  4 corview corview 4096 Nov 14 22:49 ricEMS
-bash-3.00$ find . -uid 934 -exec ls  -l "{}" ";"|nl

    38  -rwx------  1 corview corview 258959 Apr 27  2006 jta25b.jar
    39  -rwx------  1 corview corview     40 Feb  5  2007 Module.txt
    40  -rwx------  1 corview corview    164 Feb  5  2007 temp1.txt
    41  -rwx------  1 corview corview    249 Feb  6  2007 temp2.txt
    42  -rwx------  1 corview corview     93 Feb  6  2007 temp3.txt
    43  -rwx------  1 corview corview 249 Feb  6  2007
./ricEMS/corView/resource/con
fig/Profile/WorkingDirectory/temp2.txt
    44  -rwx------  1 corview corview 392 Feb  5  2007
./ricEMS/corView/resource/con
fig/Profile/WorkingDirectory/flt-http-deny-ruleid.txt
    45  -rwx------  1 corview corview 41 May 23  2007
./ricEMS/corView/resource/conf
ig/Profile/WorkingDirectory/BBGL_Enable.txt
    46  -rwx------  1 corview corview 26 May 23  2007
./ricEMS/corView/resource/conf
ig/Profile/WorkingDirectory/Adsl_Selt_Disconnect.txt
    47  -rwx------  1 corview corview 39 May 23  2007
./ricEMS/corView/resource/conf
ig/Profile/WorkingDirectory/Adsl_Selt_Connect.txt
    48  -rwx------  1 corview corview 40 Feb  5  2007
./ricEMS/corView/resource/conf
ig/Profile/WorkingDirectory/Module.txt
    49  -rwx------  1 corview corview 164 Feb  5  2007
./ricEMS/corView/resource/con
fig/Profile/WorkingDirectory/temp1.txt
    50  -rwx------  1 corview corview 258959 Apr 27  2006
./ricEMS/corView/resource/
config/Profile/WorkingDirectory/jta25b.jar
    51  -rwx------  1 corview corview 245 Feb  5  2007
./ricEMS/corView/resource/con
fig/Profile/WorkingDirectory/flt-arp-rep-srcip-deny-ruleid.txt

As we see some files show up twice in find.
For e.g, jta25b.jar is shown in line 50 (actual place) and in line 38
(bogus)

-bash-3.00$ pwd
/home/corview
-bash-3.00$ find . -name jta25b.jar
./ricEMS/corView/resource/config/Profile/WorkingDirectory/jta25b.jar
-bash-3.00$

How is this?


TIA
Regards,
-S.Balaji