[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Can somebody explain this? du & ls showing different sizes


I just came across this issue on my server at home which complained
about the lack of space which I knew was wrong. It was supposed to
have atleast 3.5 gig free. On investigating I found that there a few
lines showing the following behaviour.

Running du -h tells that the file occupies 512M but ls -l tells that
the file is a lot smaller. Also I am sure the the cluster size is not
512M (or am I wrong there?).

I have provided the relevant information from fstab, du, ls and uname
and if more info is needed, I can provide that too. But is there a
solution to this problem?


/dev/sda2       /               xfs
noatime,nodiratime,async,allocsize=1M,noikeep   0 0

[root aria ~]# du -sh /var/log/httpd/* | grep M
512M    /var/log/httpd/webserver-access_log

[root aria ~]# ls -l /var/log/httpd/webserver-access_log
-rw-r--r-- 1 root root 2884214 2009-02-15 16:18

[root aria ~]# xfs_info  /dev/sda2
meta-data=/dev/root              isize=256    agcount=4, agsize=524121 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=2096482, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

[root aria ~]# uname -a
Linux aria #1 SMP Wed Jan 21 02:09:37 EST
2009 i686 athlon i386 GNU/Linux

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]