LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-13-2010, 12:40 PM   #1
roy.zyo
LQ Newbie
 
Registered: Nov 2010
Distribution: Ubuntu 10.10
Posts: 4

Rep: Reputation: 0
Question When to use ext3, ext4 or other file types?


Yes, when we install in a fresh formatted hard drive, what file types to set to different drives and why?




#it's a linux newbie asking that question
 
Old 11-13-2010, 12:53 PM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 187

Rep: Reputation: 39
File system types have different functions in Linux/Unix. Some applications demand a particular system type, but most applications run well on ext2, ext3, ext4. If you're installing on a desktop computer, and you don't have any special programs running that have special requirements, like 'riserfs', than format your disks to run with either ext3, or ext4.

Both of them will keep a journal, and can be more easily recovered if something should go wrong. I use ext4, and it's stable and has no problems.

NFS file systems are for mounting other computers to a shared disk. And you could also create an msdos or ntfs file system if you are booting Windows.

There are many tutorials that can go into depth on the subject, google 'linux file system' and you'll find all you need.
 
1 members found this post helpful.
Old 11-14-2010, 12:06 PM   #3
roy.zyo
LQ Newbie
 
Registered: Nov 2010
Distribution: Ubuntu 10.10
Posts: 4

Original Poster
Rep: Reputation: 0
Buddy can you tell me about what do you mean by STABLE and JOURNALING?

I was advised to keep those things as ext2 which I won't change much!
 
Old 11-14-2010, 12:12 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Quote:
Originally Posted by roy.zyo View Post
Buddy can you tell me about what do you mean by STABLE and JOURNALING?
Stable means that the code to implement this feature is not changing over time.

Journaling means that disk writes are kept in a temporary location on the disk for a short time before being written to their final destination.

Journaling is also implemented in the Windows NTFS file system.

Quote:
Originally Posted by roy.zyo View Post
I was advised to keep those things as ext2 which I won't change much!
It really doesn't matter. Really. You won't notice any difference at all between the three proposed file system types.

Last edited by stress_junkie; 11-14-2010 at 12:16 PM.
 
Old 11-14-2010, 12:19 PM   #5
crosstalk
Member
 
Registered: Jul 2010
Distribution: Gentoo, Debian, Mint, Xubuntu
Posts: 150

Rep: Reputation: 35
"Stable" means that it isn't likely to corrupt your data (or crash, for that matter). A synonym for it is reliable.

A journaling filesystem keeps a "journal," which is a log of everything it's writing to the disk. If the computer were to be shut down improperly (i.e. in a crash or power outage), the hard disk can be recovered by "playing back" the journal.

If you're formatting a flash drive, I suggest going with vFAT, so Windows can read it (NTFS would work as well, but its support in Linux is not as stable).

For a partition that is only read by Linux, I recommend ext4, unless it's a flash drive (SSD or USB flash drive), in which case I'd recommend ext2 (flash drives can only be written to so many times, so a journal would shorten the life of the drive).

A lot of people also seem to like reiserfs, which, in my understanding, is optimized for a whole lot of small files. I don't have any experience with it, and therefore can't say much else about it.

I hope this clears things up.
 
2 members found this post helpful.
Old 11-14-2010, 12:26 PM   #6
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 187

Rep: Reputation: 39
By stable I mean it won't crash. It has been tested and in the majority of cases, it will stand up well under normal usage. Each new file system type goes through a period of development and could crash and cause data loss. This was the case with ext3 and ext4. Both are considered tested and stable.

The same is true with an operating system. A mature OS is considered out of development and is stable enough to be used in a production environment. It won't crash and loose data under normal circumstances.

A journaling file system keeps all writes in memory until the OS confirms that the write to disk has taken place. If a write has not been confirmed, and not deleted from memory, and a power failure occurs, the memory is written out to a journal file on disk. This all happens very quickly, micro seconds. When the system reboots, that journal file is read by the OS, and all data that could have been lost is recovered and written to disk. In ext2, there is no confirmation, and no journaling, so if a power failure occurs, any data that has not been written to disk is lost.

My screen name is udaman, not Buddy.
 
1 members found this post helpful.
Old 11-14-2010, 12:57 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
I think it is a myth that ext3 and ext4 are stable because they have been tested more. ext4 is quite new, and from what I've seen the new default options are potentially dangerous:
http://www.linuxquestions.org/questi...rounds-712905/
ext3 can be considered more stable than ext4, but performance is lacking quite a bit.
ext2 is NOT journaled:
http://en.wikipedia.org/wiki/Journaled_file_system

Each filesystem is different in terms of performance and how safe your data is. Out of all the filesystems available, I would say that XFS and JFS are the best in terms of performance, there are also benchmarks showing this:
http://linuxgazette.net/122/piszcz.html
http://www.t2-project.org/zine/1/

there may be new ones, but they are not comprehensive.

XFS however has a downside in that if power goes out unexpectedly, you may lose data, because data is not written immediately, but kept in RAM.

JFS does not have this problem.

There is also btrfs, but it is rather new and not considered stable.
 
Old 11-14-2010, 02:10 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
After researching file systems I decided on JFS as the one with the most suited balance of speed and reliability. At that time there were some issues with ext4, now fixed. Reiserfs is designed more for speed and that's not important enough for me to accept the reduced reliability. JFS is not a popular choice, perhaps simply because it is not a popular choice (like "famous for being famous") but I have not yet seen any substantial criticisms of it. Inconveniently Knoppix does not have JFS support and, for GRUB users, GRUB does work with JFS so a separate /boot file system is required.
 
Old 11-14-2010, 10:40 PM   #9
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
ReiserFS is a killer file system.

Seriously, though, I think the best thing you could do is check out the Wikipedia article for each of the file systems you are considering. By reading about each file system's features, advantages, and drawbacks you'll be be able to make your own informed decision. And, of course, you can always turn to LQ if you have any specific questions about any of them.
 
1 members found this post helpful.
Old 11-14-2010, 11:16 PM   #10
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Quote:
ReiserFS is a killer file system.
Do you mean literally? I gave up on reiser because I always ended up with corrupted filesystems... But that was five or six years ago, I don't know what it has become in the meantime.

One thing I like about xfs is that it is the only file system that can be defragmented (except maybe ext4). And the danger of file corruption because of power outage is greatly exaggerated considering it is mounted nobarrier by default.
 
Old 11-15-2010, 12:05 AM   #11
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
Quote:
Originally Posted by jay73 View Post
Do you mean literally?
Yes, quite literally.

Quote:
I gave up on reiser because I always ended up with corrupted filesystems... But that was five or six years ago, I don't know what it has become in the meantime.
TBH, me neither. That said, I used to select it quite often many years ago and IIRC it was always a pleasant experience. Currently I just stick to ext3, though, and I'm not even sure I remember what triggered the switch in preference. A little while back I had considered moving to ext4, but I concluded it was not stable enough for me yet (I'm using a definition of stability similar to stress_junkie's).

Last edited by win32sux; 11-15-2010 at 12:06 AM.
 
Old 11-15-2010, 05:44 AM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
I don't think ReiserFS is supported or developed anymore (yes, because of the "killer" part). There is Reiser4 tho, which is newer. I can't recommend either.

Also, JFS and XFS have been tested on IBM mainframes and SGI workstations respectively for quite some time, maybe even more than ext3, so the argument that ext3 has been used longer is invalid. JFS originally had defrag ability, but it has not been ported yet, so if you need defrag use XFS. It is not regular defrag tho, it is better, it does NOT move files to the beginning of the disk like a dumb defrag program, instead it defragments files sparsely so that files remain spread out (prevents fragmentation) but are still defragmented in place.
 
Old 11-15-2010, 06:25 PM   #13
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
Quote:
Originally Posted by H_TeXMeX_H View Post
I don't think ReiserFS is supported or developed anymore (yes, because of the "killer" part).
What makes you say that? I remember Novell stopped making ReiserFS the default file system on their distro when the news about the author broke, but what you're saying makes it sound like the kernel developers stopped maintaining ReiserFS, which AFAIK isn't the case.
 
Old 11-16-2010, 12:51 AM   #14
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,052

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by roy.zyo View Post
Buddy can you tell me about what do you mean by STABLE and JOURNALING?
Stable means two things:
  • it doesn't crash or loose your data
  • it is immutable, ie the definition doesn't change from one version to another making an FS prduced with an older version unworkable under the newer software (until upgraded)
people primarily mean the first of those, but there are circumstances in which the second can be important.

Quote:
That said, I used to select it quite often many years ago and IIRC it was always a pleasant experience. Currently I just stick to ext3, though, and I'm not even sure I remember what triggered the switch in preference. A little while back I had considered moving to ext4,
I also used to use Reiser3 (what people generally refer to as Reiser, the 3 is only necessary to distinguish from other versions) back in the day and was happy with it then. I never saw filesystem corruption (different from data loss), but it may depend on which journallling mode you selected.

I changed to ext3 along with SuSE, and I'm not quite clear why. Reiser3 was probably faster, overall (in my use case...YMMV), but ext3 may have been safer. This may just have been that the defaults changed; I didn't do any benchmarking along with this change. (Actually, the change was probably synchronous with new hardware and investing the extra speed in data security may have seemed smart.)

I tried Reiser4 briefly, and that seemed faster (on average; will vary with use case) too, but support seemed questionable.

The kernel guys probably still do support Reiser3, but its almost meaningless; allegedly any query/bug notification/request for a fix to the Reiser team, who still nominally maintain the Reiser filesystems, gets met with a 'You ought to switch to Reiser4' response. Maybe this wouldn't be such an issue if Reiser (the man) hadn't spent his years of freedom criticising and denigrating everybody else in the universe and behaving in a generally spiky manner, particularly with the kernel devs, but there was no great wellspring of affection upon which to draw. That said, the Reiser team, post Hans (which I think is one person) must be easier to get on with...

Currently, on this laptop, I'm using ext3 for /home, ext4 for everything else and i believe that I noticed a speed-up changing the root partition from ext3 to ext4. Quite happy with ext4 at this point, but it doesn't mean that the /home partition might not go BTRFS at the next upgrade.
 
Old 11-16-2010, 01:57 PM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
Quote:
Originally Posted by win32sux View Post
What makes you say that? I remember Novell stopped making ReiserFS the default file system on their distro when the news about the author broke, but what you're saying makes it sound like the kernel developers stopped maintaining ReiserFS, which AFAIK isn't the case.
Well, you're right, it does NOT mean that development will stop. However, from what I've read on wiki and other places, the development of Reiser* is "uncertain". I haven't heard to much on it recently. Also, I believe Hans Reiser was the main developer, so with him "away", for sure someone needs to take his place and do a similar quality job.

Last edited by H_TeXMeX_H; 11-16-2010 at 01:58 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Convert ext3 to ext4 ursusca Linux - General 5 03-10-2010 12:33 PM
[SOLVED] how to mount the new ext4 file system from a Linux with the older ext3 ? james2b Linux - Newbie 2 01-04-2010 01:33 AM
ext4 new file system mounting compatibility with the older ext3 type james2b Linux - Newbie 6 09-08-2009 06:57 PM
Ext3 to Ext4 in Fedora 9 vwtech Fedora 2 05-21-2009 12:03 PM
From ext3 to ext4 rengo.Java Linux - Software 6 12-27-2008 10:58 AM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration