public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Esteban Lopez <elopez@softel.net.mx>
To: linux-mtd@lists.infradead.org
Subject: df -h, du -ahx and flash size  not match
Date: Mon, 20 Feb 2012 17:41:03 +0000	[thread overview]
Message-ID: <4F4285AF.30300@softel.net.mx> (raw)

Hello List

I have a linux box with debian 5, kernel 2.6.27, running over a nand 
flash with two partitions

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 04000000 00020000 "Partition 1"
mtd1: 1c000000 00020000 "Partition 2"

The Partition 2 is my ROOTFS where I have ubifs. The size of this 
partition is 0x1c000000=469762048 bytes


My ubinfo output is this

ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:63
Present UBI devices:            ubi0

ubi0:
Volumes count:                           1
Logical eraseblock size:                 129024
Total amount of logical eraseblocks:     3583 (462292992 bytes, 440.9 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       1
Count of reserved physical eraseblocks:  35
Current maximum erase counter value:     33
Minimum input/output unit size:          2048 bytes
Character device major/minor:            253:0
Present volumes:                         0

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        3544 LEBs (457261056 bytes, 436.1 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 253:1


Like you can see I have 3544 LEBS to work = 457261056 bytes

Well my question is that if I run a df -h commnad I get this output
df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                  30M     0   30M   0% /lib/init/rw
udev                   10M   48K   10M   1% /dev
tmpfs                  30M  4.0K   30M   1% /dev/shm
rootfs                236M  161M   75M  69% /
/tmp                   30M     0   30M   0% /tmp

Why only 236M???


If I create big files and I run du -ahx command over / I get a  total of 
593M
  of info
Why the size not match ? why I can have 593M in my ROOTFS if I only have 
469762048 bytes?? Why df -h report 161M used in rootfs if du report 593M?

Could you help me to understand this?

Thank you !!!

             reply	other threads:[~2012-02-20 23:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 17:41 Esteban Lopez [this message]
2012-02-20 23:47 ` df -h, du -ahx and flash size not match Brian Norris
2012-02-21  8:56   ` Esteban Lopez
2012-03-07 17:30     ` Artem Bityutskiy
     [not found]   ` <4F45FE0C.3070807@softel.net.mx>
2012-02-23 19:35     ` Brian Norris
2012-02-23 16:52       ` Esteban Lopez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F4285AF.30300@softel.net.mx \
    --to=elopez@softel.net.mx \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox