Thanks everyone for your time I have found the solution from another group & I am describing it below, it is going to be a bit long, so if you are not interested you can skip it now.
Thanks For my first case ****************** bash-3.00$ df -h /boot Filesystem Size Used Avail Use% Mounted on /dev/hda6 48M 37M 11M 78% /boot bash-3.00$ du -hs /boot 4.2M /boot bash-3.00$ ****************** The solution provider suggested this ************ I'm guessing you're using ReiserFS with the default 32MB journal. ************ and was he was right, it was ReiserFS, and you will notice that the difference between the df & du result is approximately 32MB. Makes sense... so I tried it for all my partitions ******************* bash-3.00# df -h Filesystem Size Used Avail Use% Mounted on /dev/hda5 283M 104M 179M 37% / /dev/hda6 48M 37M 11M 78% /boot /dev/hda7 283M 47M 237M 17% /home /dev/hda8 1.2G 676M 470M 60% /opt /dev/hda9 283M 33M 250M 12% /root /dev/hda10 283M 33M 251M 12% /tmp /dev/hda11 2.4G 1.6G 810M 67% /usr /dev/hda12 957M 50M 907M 6% /var bash-3.00# du -hs /boot /home /opt /root /tmp /usr /var 4.2M /boot 16M /home 698M /opt 1.2M /root 49K /tmp 1.7G /usr 19M /var bash-3.00# ****************** You will notice that all the results have an approximate difference of 32MB with the exception of /opt & /usr (the 2 most largest partitions). This is where the solution to my second problem comes in For my second case *********************** bash-3.00$ df -h /boot Filesystem Size Used Avail Use% Mounted on /dev/hda6 48M 37M 11M 78% /boot bash-3.00$ du -hs /boot 4.2M /boot bash-3.00$ df -h /opt Filesystem Size Used Avail Use% Mounted on /dev/hda8 1.2G 676M 470M 60% /opt bash-3.00$ du -hs /opt 698M /opt bash-3.00$ ********************** The solution provider suggested this ***************** ReiserFS does tail packing, which means that it can use one disk block for storing the last, incomplete blocks of two different files if they both fit. du doesn't know anything about tail packing and works on the basis of how many blocks each file spans. With ReiserFS you may find du is more accurate if you get it to ignore block sizes, eg: du -bhs /opt ***************** and sure enough this time all the du results were smaller than df results ****************** bash-3.00# df -h Filesystem Size Used Avail Use% Mounted on /dev/hda5 283M 104M 179M 37% / /dev/hda6 48M 37M 11M 78% /boot /dev/hda7 283M 47M 236M 17% /home /dev/hda8 1.2G 676M 470M 60% /opt /dev/hda9 283M 33M 250M 12% /root /dev/hda10 283M 33M 251M 12% /tmp /dev/hda11 2.4G 1.6G 810M 67% /usr /dev/hda12 957M 50M 907M 6% /var bash-3.00# du -bhs /boot /home /opt /root /tmp /usr /var 4.2M /boot 14M /home 617M /opt 281K /root 6.8K /tmp 1.5G /usr 18M /var bash-3.00# **************** Any comments or suggestion will be welcomed --- Mohammad Salaque <[EMAIL PROTECTED]> wrote: > http://sysunconfig.net/aixtips/df_du_diff_out.txt > > that is for AIX but found some light there. > > > Mohammad Salaque > ---------------------------------- > I just want to live while i'm alive > > > > > > >From: Mojahedul Hoque Abul Hasanat > <[EMAIL PROTECTED]> > >Reply-To: [email protected] > >To: [email protected] > >Subject: Re: [bdlug] Re: different commands, > different results > >Date: Fri, 16 Dec 2005 15:38:53 +0600 > > > >Emon, > > > >You are very obervant :) Your first case is > interesting. > > > >Okay, here is my dab at explanation: > > > >Your first case: > > > >$ df -h /boot > >Filesystem Size Used Avail Use% Mounted > on > >/dev/hda6 48M 37M 11M 78% /boot > >$ du -hs /boot > >4.2M /boot > > > >This is interesting. It's not a normal case. I > think you have a file > >which is being used by a process, but you have > unlinked the file, i.e. > >deleted it. Until that process exits, the space > taken up by the file > >will not be releases and the process will be able > to use the file, > >until it closes it. This is a well defined > behaviour in Unix. > > > >To test the theory, if you know the process, kill > it. Otherwise, > >reboot and see if this resolves the issue. > > > >Now your second case: > > > >$ df -h /opt > >Filesystem Size Used Avail Use% Mounted > on > >/dev/hda8 1.2G 676M 470M 60% /opt > >$ du -hs /opt > >698M /opt > > > >Hmm, more interesting, I can't explain it :) > Generally, du should > >show a bit smaller number than df. That's because > du does not count > >the file system overheads. The "bit" is 5-10%, not > like your first > >example. > > > >Anyone to the rescue? > > > >-- > >Mojahed > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/hYOolB/TM --------------------------------------------------------------------~-> To unsubscribe send a blank mail to: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/bdlug/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
