FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 03-11-2009, 08:29 PM
Filipe Brandenburger
 
Default Disk usage for small files in ext3 in CentOS 5

Hello,

I noticed something unusual today.

If I "du" a small file (couple of bytes) in CentOS 5, it tells me the
file is using 8kb, while I was expecting 4kb which is the block size
I'm using.

I tried this on several CentOS 5 machines, both x86_64 and i386:

$ echo test >test.txt
$ ls -l test.txt
-rw-rw-r-- 1 filbranden filbranden 5 Mar 11 17:24 test.txt
$ du -h test.txt
8.0K test.txt

If I do the same on a CentOS 4 machine:

$ echo test >test.txt
$ ls -l test.txt
-rw-rw-r-- 1 filbranden filbranden 5 Mar 11 17:25 test.txt
$ du -h test.txt
4.0K test.txt

On all machines I tested, both CentOS 4 and CentOS 5:

# tune2fs -l /dev/xxxxx
...
Block size: 4096
Fragment size: 4096

I could not find any differences that would explain the behaviour.
Have you seen this before? Can you reproduce it on your systems? Do
you know how to get the CentOS 4 behaviour?

More on the point: I'm migrating some data from CentOS 4 to CentOS 5,
it's around 70GB of millions of small files. I would like it to still
take 70GB, not 140GB. For now, I'm working around this issue by using
"-T small" to mke2fs, I'm not sure if it's going to have the effect I
want, and I'm not sure about any other impact (performance?) it might
have on my filesystem.

Thanks,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org