Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 32GB SanDisk USB drive (vfat partition type). It's as I received it - I haven't played around with the partitioning or added any encrypted sections or anything.

The disk properties show that 3.1GB is used:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1        30G  3.1G   27G  11% /media/robin/BE12-3DC0

But the files on the disk only add up to 39MB:

/media/robin/BE12-3DC0$ du -sh
39M     .

/media/robin/BE12-3DC0$ du -sh * .*
30M     RunSanDiskSecureAccess_Win.exe
9.0M    SanDiskSecureAccess
16K     .
4.0K    ..

Does anyone know why this might be? Are there other files hiding somewhere that I can't see?

share|improve this question
VFAT is long gone, so I'm confused how you got a new USB stick with it straight from the manufacturer? Are you sure it's really VFAT and not FAT32? Can you access the drive from Windows and post a screenshot of what Disk Management shows? (Then again, modern Win7 etc. might not even recognise a true VFAT drive, similar to how it treats FAT16 ones.) – Karan May 17 '13 at 3:21

There are at least three reasons:

  1. The file system itself covers a relevant share of the space: Inodes, directories, block allocation bitmaps and so on.
  2. The journal covers space. The larger the volume the larger the journal.
  3. By default (at least) ext{2,3,4} reserve 5% of the space for the super user.

You can check the relevant values by this:

dumpe2fs -h /dev/mapper/cr_test | 
  grep -F -e "Reserved block count:" -e "Block size:" \
    -e "Block count:" -e "Journal size:"
Block count:              131072
Reserved block count:     0
Block size:               4096
Journal size:             16M

You can configure the reserved space by tune2fs -m. The journal size can be configured (within certain limits) by tune2fs -J size=journal-size.

share|improve this answer
I assume that I'm meant to replace /dev/mapper/cr_test with my device (/dev/sdb or /dev/sdb1). I did that and I get the message "Bad magic number in super-block while trying to open /dev/sdb" (same if I use sdb1). Is this because I'm supposed to umount? – Robin Winslow May 16 '13 at 2:32
@RobinWinslow Then it's a different file system (with different tools). Sticks with data for Windows systems usually don't have ext{2,3,4}; I read your question too fast... But (at least) the first part of my answer remains valid. – Hauke Laging May 16 '13 at 3:00
So the partition is of type "vfat". Do you know what sort of things might take up extra space with this filesystem, or what tools I can use to inspect it? – Robin Winslow May 16 '13 at 14:00
@RobinWinslow I am not familiar with VFAT details. As I said it needs space for its metadata, too. But I don't know which volume share that typically is. – Hauke Laging May 16 '13 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .