[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: EXT3 Worries


On Fri, Aug 03, 2001 at 09:31:57AM -0300, Mark Veinot wrote:

> Well as far as ext{2|3} goes, they use inodes as part 
> of the filesystem. Each file gets at least one inode.
> When you format a partition with ext2/3 you can choose 
> the block size (typically 1, 2, or 4k blocks) and there 
> is one inode per block. If for example, you used 4k 
> blocks but stored mostly 1k files, you'd be wasting 3k 
> of space for each file...

Not quite true --- "one inode per block" is wrong, as inodes are in a
table which is quite separate from the blocks used to store file data.
But yes, file data does get stored block-aligned, so you can waste
space at the end of files.

The other possible thing to watch out for is that if you have
hard-linked files, you have to preserve the links when you copy the
data across or you'll end up with two copies on the target filesystem
when you only had one on the original filesystem.  "cp -a" will
preserve hard link relationships but "cp -R" will not, for example.

There are prototype patches around to add "tail-packing" support to
ext2 to allow the wasted space at the end of a block to be used for
other file tails, and that will help the storage efficiency for small
files enormously.  Stock ext2 doesn't have that ability yet.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]