--- On Tue, 9/14/10, Jarry <mr.jarry@gmail.com> wrote:
> > What about df from the host?
>
> imho it does not make sense. I have many guests on
> /vserver filesystem, which contribute to the overall
> system usage.
Are they all on the same filesystem? If so, df inside
a guest would show the entire filesystem I believe,
(including the usage of the other guests) which should
be even larger. Perhaps you have unified your guests?
That could explain the large discrepancy between df
and du since unification uses hardlinks.
> > but you still haven't provided any proof that df
> > is wrong (or that du is right).
>
> "du" from guest:
> # du -s -k -x /
> 12035668 /
>
> "du" from host:
> # du -s -k -x /vservers/vs1-web/
> 12035688 /vservers/vs1-web/
>
> That is the same, which I consider as a solid indication
> of correct function (although I agree it is not proof).
No, that simply proves that it is working the same in
both cases. You have not shown that df is NOT working
the same in both cases, that would prove that df is
wrong.
If you are trying to equate du and df and expect them
to be the same, then you will often be surprised, even
on a server without vserver patches, that is the
nature of the two. They are different, they do
accounting differently.
> On the other side, there are big differences between "du"
> and "df" on guest:
>
> # df /
> Filesystem
> 1K-blocks Used
> Available Use% Mounted on
> /dev/root
> 20971520 2581584
> 17324976 13% /
> # du -s -k -x /
> 12035668 /
>
> Again, it is not 100% proof that df is wrong, but when
> I check /root in guest and count files manually (about
> 10 of them, each ~300MB, they make together more than 3GB.
> So the whole root filesystem can not take less than
> that...
It can if they are linked, try the find I sent in
the other email. Then we will have some actual
data to make a judgement. Again, I am not saying
that df is correct in your case, but just that you
haven't shown it to be wrong and I pointed out
an easy reason that you could be deceived into
thinking that it is wrong if your only comparison
is du.
Cheers,
-Martin
Received on Wed Sep 15 01:44:03 2010