• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Zeroing in on the disk hog  (Read 2234 times)

Karma: 0
Posts: 3

View Profile
« on: May 23, 2009, 12:44:41 AM »

Running completely from NAND flash, I'm seeing a huge discrepancy between disk usage numbers from "df" and "du".  The former says I'm using 502 KB, while the latter can account for no more than 327 KB.  Twice, without realizing this mismatch and thinking simply that I installed too many things, I went in and cleaned out a bunch of stuff to free up memory.  Both times the usage went back up to 99% while I was looking the other way.  What's going on?  How do I track the culprit down? 

Rabeeh Khoury
Full Member

Karma: 5
Posts: 218

View Profile
« Reply #1 on: May 23, 2009, 05:37:57 AM »

Your message is not 100% clear. Please cut and paste some of the 'df -h' from the console.
And I assume that you are referring to MB instead of KB in your post?

Anyhow; the internal NAND flash uses JFFS2 (originally) and now we are in an alpha tester for UBIFS.
Both those filesystems uses compression algorithm to compress on write and decopmpress on ready. Due to that you can fit more than 512MB of content in a 512MB NAND flash (ofcourse depends how compressable the content is).


Karma: 0
Posts: 3

View Profile
« Reply #2 on: May 23, 2009, 07:27:51 AM »


Yes, right, I meant MB of course.

Here's what I'm seeing:

root@plug001:/# df -h /
Filesystem            Size  Used Avail Use% Mounted on
rootfs                507M  502M  5.2M  99% /
root@plug001:/# for i in *; do du -sk $i; done   2>/dev/null                 
4294    bin
80      boot
12      dev
1709    etc
6       home
11103   lib
0       media
1794457 mnt
0       opt
0       proc
274     root
3707    sbin
0       selinux
0       srv
0       sys
0       tmp
325765  usr
18188   var

Now, /mnt is where the external USB-HDD is mounted, so discounting that I count 327 MB.  Now my problem is, there's no accounting for the missing 175 MB. 

Also, while I understand your point about the filesystem using compression, isn't that sort of thing meant to be transparent at the user level?  Besides, I'm not able to store any more data:

root@plug001:/# touch abc
touch: cannot touch `abc': No space left on device

So I'm most definitely out of disk space... but where did it all go? 


Pages: [1]
Jump to: