Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[SOLVED] df shows 53G disk usage, but du only 14G
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Solved: df shows 53G disk usage, but du only 14G
14th Jan, 2014, 04:38 AM
Post: #1
wuschl Offline
Registered
Posts: 11
Joined: Jan 2013
Reputation: 1
df shows 53G disk usage, but du only 14G
Hi there!

Title says it all. Here ist the outpout from df -h:
Terminal
Filesystem Size Used Avail Use% Mounted on
rootfs 60G 53G 6.2G 90% /
/dev/mmcblk0p2 60G 53G 6.2G 90% /
devtmpfs 125M 4.0K 125M 1% /dev
none 25M 396K 25M 2% /run
/dev/mmcblk0p1 34M 20M 15M 58% /boot
/dev/mmcblk0p2 60G 53G 6.2G 90% /home
/dev/mmcblk0p2 60G 53G 6.2G 90% /lib/modules
/dev/sda1 2.8T 1.3T 1.5T 45% /home/xbian/media
/dev/mmcblk0p2 60G 53G 6.2G 90% /xbmc-backup

Here from sudo du -sh --exclude='*/home/xbian/media*':
Terminal
14G .

What's wrong and eating up all my disk space? I googled and therefore tried "lsof | grep deleted" to be sure that no process is locking big files. But the output does not seem so:
Terminal


init 1 root 9w REG 0,16 83 193186 /var/log/upstart/restore-home.log.1 (deleted)
init 1 root 17w REG 0,16 221 193181 /var/log/upstart/xbmc.log.1 (deleted)
splash 110 root 1u CHR 136,3 0t0 6 /dev/pts/3 (deleted)
splash 110 root 2u CHR 136,3 0t0 6 /dev/pts/3 (deleted)
xbmc.bin 465 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
VCHIQ 465 742 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 743 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 744 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
HDispmanx 465 752 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
HTV 465 753 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
HCEC 465 754 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 755 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
ILCS_HOST 465 756 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
XBPyThrea 465 760 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
XBPyThrea 465 761 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
XBPyThrea 465 762 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 767 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 768 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 769 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 770 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
xbmc.bin 465 771 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
CEventSer 465 772 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
CTCPServe 465 773 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
AirPlaySe 465 775 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
AirTunesS 465 778 xbian 3r CHR 1,9 0t0 23 /dev/urandom.orig (deleted)
python 812 root 3w REG 0,16 1240 193183 /var/log/upstart-xbmc-bridge.log.1 (deleted)

Has anyone help here?
Find all posts by this user
Quote this message in a reply
14th Jan, 2014, 07:01 PM
Post: #2
wuschl Offline
Registered
Posts: 11
Joined: Jan 2013
Reputation: 1
RE: df shows 53G disk usage, but du only 14G
Nevermind... The problem just want away overnight as my automated download system overreached the disk limit. Now df shows the right disk usage...
Find all posts by this user
Quote this message in a reply
16th Jan, 2014, 01:26 PM
Post: #3
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: df shows 53G disk usage, but du only 14G
@wuschl,

just to make this clear.

although there is /, /home and /lib/modules as separate mounts, all three are just sub-volumes of one btrfs filesystem - all three share one common space - size of partition.

that means if you rootfs (system) eat up 500MB and you home 50GB, they will all show 50,5 GB used.

btw: if you want to prevent mounts from being calculated in total, just add "-x" switch to "du". it means don't traverse outside filesystem.

Code:
du -shx /

will sum / without /home and without /lib/modules (and possibly other mounts in /media, /mnt …)

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
16th Jan, 2014, 06:50 PM
Post: #4
wuschl Offline
Registered
Posts: 11
Joined: Jan 2013
Reputation: 1
RE: df shows 53G disk usage, but du only 14G
Thanks for your reply! I am aware of the difference between my mount points and partitions. Therefore I excluded /home/xbian/media as it is my external hd. Option -x would have been more accurate, but since my other partitions are not that big I excepted that error in measurement.

But this is no explanation for the difference between df and du, in special because now the calculation seems right...
Find all posts by this user
Quote this message in a reply
17th Jan, 2014, 01:00 AM
Post: #5
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: df shows 53G disk usage, but du only 14G
snapshots.

Code:
btrfs-auto-snapshot list //

another possibility (although this can not make THAT big diff) is metadata. since btrfs introduction, df wasn't considering metadata size. now it is. but du doesn't.

so if you check
Code:
btrfs fi df /

data + metadata should be ~ aligned with df usage. du will never come to this number. but again this is just to explain all possibilities. metadata could be 15, maybe 20%, not actually 300%.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 09:20 PM Powered By MyBB, © 2002-2025 MyBB Group.