converting rootfs to ext3 - different filesize

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
madde
Newbie
Posts: 3
Joined: Mon Dec 29, 2003 12:23 pm

converting rootfs to ext3 - different filesize

Post 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
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

I think ext3 is much less efficient with it's use of space
If you keep an open mind, will your brain fall out?
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

Unfortunately, you would be right *sighs*. This issue is making me consider going back to reiserfs.
The original Xbox adaptation of Gentoo
lordapollyon
Newbie
Posts: 3
Joined: Fri Mar 26, 2004 2:26 am

Reiser versus ext3

Post 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
scoobydu
Linux Expert
Posts: 107
Joined: Mon Aug 11, 2003 6:08 pm

Post 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?
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post 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.
The original Xbox adaptation of Gentoo
scoobydu
Linux Expert
Posts: 107
Joined: Mon Aug 11, 2003 6:08 pm

Post 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 ....
Post Reply