Page 1 of 1

converting rootfs to ext3 - different filesize

Posted: Thu Mar 25, 2004 1:26 pm
by madde
Hi,

I try to convert the rootfs filr from reiserfs to ext3

That`s what i did :

i transfered root fs via ftp to my linux box

i created a new rootfs-ext3 file with the same size:

Code: Select all

dd if=/dev/zero of=/temp/rootfs-ext3 count=3000 bs=1025
i created a ext3 fs on the file :

Code: Select all

mkfs.ext3 /temp/rootfs-ext3
i mounted both files :

Code: Select all

mount -o loop -t reiserfs /tmp/rootfs /mnt/loop1
mount -o loop -t ext3 /tmp/rootfs-ext3 /mnt/loop2
I copied all files over :

Code: Select all

cp -avx /mnt/loop1/* /mnt/loop2
now i checked with df and got :

Code: Select all

/tmp/rootfs         3071900   1825616   1246284  60% /mnt/loop1
/tmp/rootfs-ext3    3023760   2364124    506036  83% /mnt/loop2
why is the fillesize so different ?

ANdreas

Posted: Thu Mar 25, 2004 3:02 pm
by nobspangle
I think ext3 is much less efficient with it's use of space

Posted: Thu Mar 25, 2004 11:45 pm
by ShALLaX
Unfortunately, you would be right *sighs*. This issue is making me consider going back to reiserfs.

Reiser versus ext3

Posted: Fri Mar 26, 2004 2:42 am
by lordapollyon
It may very well be that reiser (which does tail-packing and other space-conserving tricks) is more space efficient than ext3, HOWEVER, I would wager that quite a bit of your difference is due to the defaults used by mkfs.ext2 (ext3 is just ext2 with a journal added via -j during format) more than fs differences.

For example:

mkfs.ext2 usually reserves 5% of the fs for "root" use exclusively. There is also the space/inode allocation default, which is over-lavish for most non-server systems.

I've used 10K/inode for most fs's without incident. On a 2GB fs, that's 204,800 files/directories. This should be more than plenty for most people.

Additionally, there is the issue of "block size" which may be larger than necessary.

I would suggest the following as a starting point:

mkfs.ext2 -j -m 0 -J size=4 -b 1024 -i 10240 /dev/hdaX

(where /dev/hdaX is your partition)

Cheers!
Lord Apollyon

Posted: Fri Mar 26, 2004 7:59 pm
by scoobydu
Does this only matter for the home edition of gentoox? as my pro versions are no way near the maximum available.

Just been reading, Xebian has been changed to a ext3 filesystem in the latest versions. How is this a problem to gentoo and not debian?

Posted: Fri Mar 26, 2004 8:20 pm
by ShALLaX
I tried messing around with various settings only to find that it slowed the filesystem down by about 4x.... also it was proned to locking up.

Posted: Fri Mar 26, 2004 9:12 pm
by scoobydu
ShALLaX wrote:I tried messing around with various settings only to find that it slowed the filesystem down by about 4x.... also it was proned to locking up.
4x, wow! Is dma supported? can only think that magnitude speed reduction, is if dma is disabled .... reiser is not really that much faster than ext3 ....