Where is disk space?

35 views
Skip to first unread message

Eva Star

unread,
Aug 19, 2020, 3:30:08 AM8/19/20
to qubes-users
Hello,

ncdu /rw  - show that actually used less then 1G of data
df -h show: /dev/xvdb       2.0G  1.8G(used)  171M  92% /rw (show that used 1.8G)
qvm-ls --format disk is also show that used 1900 MB and 92% of disk space.

So, where is 1G of free space?

Thanks

Ludovic Bellier

unread,
Aug 19, 2020, 5:27:46 PM8/19/20
to qubes...@googlegroups.com
I don't think it's the source of your problem, but remember that /rw
isn't the only mounting point to /dev/xvdb, so check the space usage of
these others.

Example:

user@mail:~$ df -h /rw
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvdb       9.8G  3.8G  6.1G  39% /rw
user@mail:~$ 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@mail:~$ lsblk /dev/xvdb -f
NAME FSTYPE LABEL UUID                                 FSAVAIL FSUSE%
MOUNTPOINT
xvdb ext4         1f6f89a1-be13-4ec9-b151-8115e7a96b14    5.9G 40% /rw

In your case, I think ncdu failed in computing the space usage, me, I
trust df, du and lsblk.

You should check /rw with 'du --max-depth=1' for finding where the du
command find a big disk usage:

Example:

user@mail:~$ sudo du --max-depth=1 -h /rw | sort -h
16K    /rw/config
16K    /rw/lost+found
20K    /rw/bind-dirs
80K    /rw/usrlocal
3.9G    /rw
3.9G    /rw/home

In my case, it's /rw/home the guilty, but what in /rw/home? I continue
recursively and find that it's the Thunderbird IMAP directory:

user@mail:~$ du --max-depth=1 -h
/rw/home/user/.thunderbird/v3bbe2wh.default-default/ | sort -h
4.0K /rw/home/user/.thunderbird/v3bbe2wh.default-default/extensions
4.0K /rw/home/user/.thunderbird/v3bbe2wh.default-default/minidumps
8.0K /rw/home/user/.thunderbird/v3bbe2wh.default-default/datareporting
12K    /rw/home/user/.thunderbird/v3bbe2wh.default-default/crashes
32K    /rw/home/user/.thunderbird/v3bbe2wh.default-default/Mail
740K /rw/home/user/.thunderbird/v3bbe2wh.default-default/calendar-data
1.5M /rw/home/user/.thunderbird/v3bbe2wh.default-default/storage
3.6G /rw/home/user/.thunderbird/v3bbe2wh.default-default/ImapMail
3.8G    /rw/home/user/.thunderbird/v3bbe2wh.default-default/

I hope 'du --max-depth=1' will help you.

--

Ludovic

Eva Star

unread,
Aug 19, 2020, 7:01:30 PM8/19/20
to qubes-users
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... :-(

'Tias

unread,
Aug 20, 2020, 2:18:06 AM8/20/20
to Eva Star, qubes-users
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
(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 qubes-users...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/daedf9e0-89e8-45a2-82ae-c9e6ceadec16o%40googlegroups.com.




--
-'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]
Reply all
Reply to author
Forward
0 new messages