EXT2 VS EXT3 File Systems

3 comments

The differences between Ext2 and Ext3 file systems are as follows.











Sl.No

EXT2

EXT3

Journling

No journling

Has journling

Speed of file system(read-write)

Bit faster

Bit slower then ext2 file-system

Data corruption

File system may be corrupted due to unplanned reboots

Prevents file-system corruption

Way to recover data

Require fsck to recover data after unplanned reboot

Does not require(automatic file recovery is done at booting time)

Online file system growth.

By default there is no Online file system growth.

Online file system growth

Commands to format

mkfs.ext2 or mke2fs

mkfs.ext3 or mke2fs -j

Max file size(if block size is 1kB)

2GB

16GB

De-fragmentation

Easy and done with e2defrag

There is no data security when doing de-fragmentation.

Data accommodation

More data can be accommodated in a give space

Less date is written when compare to ext2 in a give space due to journling.


Some FAQ's:

1. What is Journaling?
Ans : In general, Journaling file systems avoid file system corruption by maintaining a journal. The journal is a special file that logs the changes destined for the file system in a circular buffer. At periodic intervals, the journal is comitted to the file system. If a crash occurs, the journal can be used as a checkpoint to recover unsaved information and avoid corrupting of file system metadata.

2.How many file systems supported by linux? and what are they?
Ans : As of now(09-Nov-2009)
Linux will supports : Btrfs, cifs, davfs, ext, ext2, ext3, ext4, exofs, hpfs, JFS minix, msdos, ncpfs, NiLFS(2), ntfs, nfs, proc, smbfs, iso9660, sysv, hpfs, affs, ufs, umsdos, vfat, xia, xfs, ZFS.
Note : Please add some more file systems which you people know in the comment section. So that i will update the post with new file systems.

3.What is the maxium size of a paration we can create using ext2 and ext3?
Ans : 4TB paratation
can be created in each ext2 and ext3 file system respectively.

4.What is the maxium size of a file we can create in ext2?
Ans :
The maximum size what we can create is 2GB to 2TB. It depends on the block size we taken when we are formating. If the block size is 1KB we can not create a file more than 2GB in ext2 file system.

5.What is "ext" in ext2 and ext3?
Ans :
When linux first implemented the default file system is minixfs, in subsequent years it was replaced its sucesser file system called extended filesystem. So the naming convention. So ext2 is second version of extended file system. Same explanation is given to ext3 and ext4.

6. Some points about ext4
a.
It supports 64 bit storage limits, where as ext, ext2, ext3 are 32Bit storage limits and minix is 16Bit storage limit.
b.Have backward compatibility and performance is improved from lower version.
c.Extents are introduced (An extent is a range of contiguous physical blocks, improving large file performance and reducing fragmentation. A single extent in ext4 can map up to 128MB of contiguous space with a 4KB block size).

And there are many more advantages please see the below links for more info about all the file systems..
http://en.wikipedia.org/wiki/Ext4
http://en.wikipedia.org/wiki/Ext3
http://en.wikipedia.org/wiki/Ext2
http://en.wikipedia.org/wiki/Extended_file_system
http://www.ibm.com/developerworks/library/l-journaling-filesystems/index.html
http://www.oracle.com/technology/pub/articles/calish_filesys.html
http://www.cyberciti.biz/tips/understanding-unixlinux-file-system-part-i.html Please comment your thoughts regarding this post. To give feed back click here.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Linux Virtual File System

    0 comments

    Can we create a file system (i.e. formatting a drive/partition) with in a file system?
    Looks little bit strange is int it? So follow me I will show you how to create a virtual partition and file system within a partition.

    Step1 : Create a empty file with /dev/zero with size equal to 50Mb.
    #dd if=/dev/zero of=/temp/vf0 count=102400

    Note :

    1. By default "dd" command(dataset definition) uses block of 512bytes so the size will be 102400*512=52 428 800=~50MB
    2. /dev/zero is a device files which will be used create a file which conations "0" i.e. an empty
    file.

    Clipped output:
    [root@test6 ~]# dd if=/dev/zero of=/temp/vf0 count=102400
    102400+0 records in
    102400+0 records out
    [root@test ~]# ls -lh /temp/vf0
    -rw-r--r-- 1 root root 50M Nov 7 12:08 /temp/vf0

    Step2 : Create ext3 file system for this virtual partition.
    #mkfs -t ext3 /temp/vf0

    Here it will ask "do you want to format the file or not"?, just say yes.

    Step3 : Now we have to create a mount point (nothing but a directory) and mount the created partition.
    # mkdir /virtdrive
    # mount -o loop=/dev/loop0 /temp/vf0 /virtdrive

    Note:

    /dev/loop is special hardware device used to mount ISO files and virtual file systems. In Linux there are total 8 loop devices numbering from 0 to 7. So you can mount only 8 ISO files/virtual file systems by default.

    Step4 : Edit /etc/fstab file to mount permanently, so that it be auto mounted at boot time too. Specify following entry in fstab file.
    /temp/vf0 /virtdrive ext3 rw,loop=/dev/loop0 0 0

    Step5 : Specify the fstab changes to kernel.
    #mount -a

    Step6 : Conform Weather mounting happen perfectly or not.

    Way1 :
    #cat /etc/mtab

    Way2 : Change the directory to mount point you have to see lost+found folder
    [root@test ~]# cd /virtdrive/
    [root@test virtdrive]# ls
    lost+found
    [root@test virtdrive]#


    Please comment your thoughts regarding this post:-)

    Reblog this post [with Zemanta]

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Ubuntu 9.10 Released With New Features

    0 comments

    As October is going to end, new OS version of well know UBUNTU is released from Canonical. And the code name of this OS is Karmic Koala. From this release UBUNTU entered in to notebook OS too. So there are three variants of UBUNTU now, which are as follows.

    1.UBUNTU(Kubuntu,edubuntu etc)

    2.Net-book Remix

    3.Ubuntu server edition



    Here are the improvements to note in this new release
    1. A faster graphical booting(No more text booting if you wish, like RHEL5 provided some 2 years back.
    2. ubuntu one client included for online storage of your personal files.

    3. Empathy instant messenger for pidgin.

    4. So many packages/software's are upgraded to newer versions such as GNOME, FireFox and kernel.

    5. New software upgrading/installation tool.


    6.Audio/sound management improved a lot between different applications



    So how to get this new UBUNTU?
    Here are the ways to get your new UBUNTU
    Way1 : Try to download ISO image from Ubuntu site, then create your own UBUNTU CD and then install it.

    Way2 : Try to download ISO image from torrent sites such as http://www.isohunt.com or http://www.mininova.com, or click here / official ubuntu torrent file to download torrent file.
    Way3 : Request a free CD from Ubuntu.
    Way4 : Just upgrade your UBUNTU from lower version, for that you have to just type the below command in graphic mode to get upgrade window.
    $sudo update-manager -c -d
    You may get the below error when you try to upgrade such as "Authenticating the upgrade failed. There may be a problem with the network or with the server."
    To resolve this issue you have to install security keys, login with normal user execute below command
    $gpg
    Once it says Go ahead and type your message, you can just press Ctrl-C to get back to the command prompt. Then execute again upgrade command.
    $sudo update-manager -c -d
    Please comment ur thoughts regarding this post.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here