Home | Download | Documentation | Programming | FAQ | About Me
Comparing ext3FS and ReiserFS
[No beachmarks used ;-) ]
By
G.Lakshmipathi.
June 14, 2008.


Hi all,

For past five years i'm big Fan of Fedora :-)
Last week for the first time i installed ubuntu on my linux lappy with ReiserFS.
Just wanted to try ReiserFS because most people said it's one of the best.

So now i have Fedora and Ubuntu.Here it's
/dev/sda3 - Fedora 7 with ext3FS
/dev/sda1 - Ubuntu with ReiserFS

Let me make this one clear - this is NOT a reliable doc- And i'm NOT an expert in file system to compare File Systems,
following observation i made may be completely WRONG or it may be IRREVELANT to File System or it may be just piece of JUNK.

Still reading this docs? ...nothing useful to do ?...then read on :-)
How i'm to going to compare these two File System?I don't know but i'll try ..

---------------
I recently came across article about creating a new file system in a file and use it.
Let' try to follow that procedure instead of messing up original partitions like sda1 or sda3.

First,Creat directories named ext3 and reiser under /mnt directory.
ext3 where newly created ext3 file system will be mounted.
reiser where newly created reiserfs will be mounted.
--------------------

create the file

[root@localhost ~]# dd if=/dev/zero of=/home/lg/linux.ext3 bs=4096 count=10000
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 0.990447 s, 41.4 MB/s
[root@localhost ~]#


Now we have created a file of size 41MB, we use this new ext3 FS for experiment.
###########
Similarly creat another file for reiserFS,

[root@localhost lg]# dd if=/dev/zero of=linux.reiser bs=4096 count=10000
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 0.723048 s, 56.6 MB/s
[root@localhost lg]#


##############
-----------------
Creat the ext3 File System using mke2fs command.Just press y if it says 'not a block special device- Proceed anyway [y/n] ?'

[root@localhost ~]# mke2fs -b 4096 /home/lg/linux.ext3
mke2fs 1.39 (29-May-2006)
/home/lg/linux.ext3 is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
10016 inodes, 10000 blocks
500 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
1 block group
32768 blocks per group, 32768 fragments per group
10016 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]#


From the above output we can safely say,
our new ext3 FS block size=4096 bytes or 4KB
It has 10016 inodes and 10000 blocks.
we have only one block group.
and the block group containing 32768 blocks & 10016 inodes.
and e2fsck will run every 20 mounts or 180 days,whichever comes first.

####################
I mount ubuntu under /mnt/sda1 and /mnt/sda1/home/lg executed this

[root@localhost lg]# mkreiserfs -f linux.reiser
mkreiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:
BigStorage (www.bigstorage.com) contributes to our general fund every month,
and has done so for quite a long time.

Continuing core development of ReiserFS is mostly paid for by Hans Reiser from money made selling licenses in addition to the GPL to companies who don't want it known that they use ReiserFS as a foundation for their proprietary product. And my lawyer asked 'People pay you money for this?'. Yup. Life is good. If you buy ReiserFS, you can focus on your value add rather than reinventing an entire FS.

linux.reiser is not a block special device
Continue (y/n):y
Guessing about desired format.. Kernel 2.6.20-2925.9.fc7xen is running.
Format 3.6 with standard journal
Count of blocks on the device: 10000
Number of blocks consumed by mkreiserfs formatting process: 8212
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: 71c7806a-3611-4d03-9cc6-779f18c92aff
Initializing journal - 0%....20%....40%....60%....80%....100%
Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a
kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on linux.reiser.
[root@localhost lg]#

From above note block size is 4096 or 4KB
Journal occupies 8193 blocks
###################

===========
mount it
[root@localhost ~]# mount /home/lg/linux.ext3 /mnt/ext3 -o loop
[root@localhost ~]#

Check whether it's successfully mounted or not:
use df command

/home/lg/linux.ext3 38733 482 36251 2% /mnt/ext3

####################
mount ubuntu into /mnt/sda1
[root@localhost lg]# mount /mnt/sda1/home/lg/linux.reiser /mnt/reiser -o loop

Check whether it's successfully mounted or not:
use df command

/mnt/sda1/home/lg/linux.reiser
39992 32840 7152 83% /mnt/reiser

#####################
-----------

list it's default contents :
[root@localhost ~]# ls -l /mnt/ext3/
total 12
drwx------ 2 root root 16384 2008-06-14 18:10 lost+found

[root@localhost ~]#

-----------------------
Filesystem		           1K-blocks      Used Available Use% Mounted on
/dev/sda3	 	            34803880  21621096  11386316  66% /
/home/lg/linux.ext3		      38732        32     36700   1% /mnt/ext3
/dev/sda1	 	            10000072   2045408   7954664  21% /mnt/sda1
/mnt/sda1/home/lg/linux.reiser	      39992     32840      7152  83% /mnt/reiser
Now you can see,our new ext3 & reiser has 38732 1K blocks & 39992 1-K blocks respectively. One amazing thing this,ext3 has 99% of free space where as reiserFS has just 17% free space. I think this could be because reiserFS uses quite lot of space for journaling. while using mkreiserfs command it said journal size is 8193 blocks.ie. 8193*4KB=32772KB or 33MB Whereas ext3 used only 32KB.

I'm going to experiment with about 7MB of reiserFS and 36MB of ext3. Let's try and creat some files under both these FS and check their status using df command. Before creating any files their status is...

/mnt/sda1/home/lg/linux.reiser        39992     32840      7152  83% /mnt/reiser
/home/lg/linux.ext3      	                     38732        32     36700   1% /mnt/ext3
Created a test file under both FS
[root@localhost reiser]# ls -l /mnt/reiser/test_file 
-rw-r--r-- 1 root root 20 2008-06-14 20:31 /mnt/reiser/test_file

[root@localhost ext3]# ls -l /mnt/ext3/test_file 
-rw-r--r-- 1 root root 20 2008-06-14 20:31 /mnt/ext3/test_file
Now running df command shows 8 blocks used by ext3 for this file where as reiserFS stat remains the same...how and why?
/mnt/sda1/home/lg/linux.reiser	    39992     32840      7152  83% /mnt/reiser
/home/lg/linux.ext3     	    38732        40     36692   1% /mnt/ext3
[Will be continued]
==============

My Linux Lappy Config:
Acer Aspire 5310
Intel Celeron Processor.(1.73GHz,533MHz,1MB L2 cache)
512MB DDR2
80GB HDD

Powered by
Open Source Programmers