On Thu, 20 Aug 2020 at 00:01, Eva Star <[email protected]> wrote:

> Thanks for your reply. Unfortunately, not :(
> I still have the problem when df -h /rw report one size and du other
> size... :(
>
> [user@host rw]$ df -h /rw
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/xvdb       2.0G  1.6G  341M  83% /rw
>
> [user@host rw]$ mount|grep xvdb
> /dev/xvdb on /rw type ext4 (rw,relatime,discard)
> /dev/xvdb on /home type ext4 (rw,relatime,discard)
> /dev/xvdb on /usr/local type ext4 (rw,relatime,discard)
> /dev/xvdb on /var/spool/cron type ext4 (rw,relatime,discard)
>
> [user@host rw]$ lsblk /dev/xvdb -f
> NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL
> FSUSE% MOUNTPOINT
> xvdb ext4   1.0         c1ace105-12ee-495e-a340-***********  340.2M    82%
> /rw
>
> [user@host rw]$ sudo du --max-depth=1 -h /rw | sort -h
> 16K    /rw/bind-dirs
> 16K    /rw/lost+found
> 20K    /rw/config
> 136K    /rw/usrlocal
> 736M    /rw
> 736M    /rw/home
>
> As you can see df still report that 1.6G USED, but last command du
> --max-depth=1 with sorting show that only 736 MB used. Lose 800MB
> somewhere... :-(
>
>
>
>
>
Hi Eva,

There’s a few possible causes for the discrepancy between du and df, most
commonly

- du doesn’t always accurately measure size overheads. Usually this is
negligible but if you have many (small) files this can add up.

- if a process has a file open Linux will keep the data around on disk even
if you delete the file until the process exits or closes the file.

Here’s the best explanation I could find online
https://www.ibm.com/support/pages/why-numbers-du-s-and-df-disagree
(Technically it’s for AIX a different Unix flavour, but it’s all true for
Linux, though some commands differ)


>
>
>
> --
>
>
> You received this message because you are subscribed to the Google Groups
> "qubes-users" group.
>
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/qubes-users/daedf9e0-89e8-45a2-82ae-c9e6ceadec16o%40googlegroups.com
> <https://groups.google.com/d/msgid/qubes-users/daedf9e0-89e8-45a2-82ae-c9e6ceadec16o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
-'Tias

"There is an art, or rather a knack to flying. The knack lies in learning
how to throw yourself at the ground and miss." ["Life, the universe and
everything", Douglas Adams, 1982]

"If a cluttered desk signs a cluttered mind, Of what, then, is an empty
desk a sign?" [Albert Einstein]

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/CAGpfrqO6p97%3Dz7j0DtMjO7Yj_nPmkMj2-K4LDbrAXWk0jg-7ZA%40mail.gmail.com.

Reply via email to