LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   When to use ext3, ext4 or other file types? (https://www.linuxquestions.org/questions/linux-newbie-8/when-to-use-ext3-ext4-or-other-file-types-844065/)

roy.zyo 11-13-2010 11:40 AM

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?:confused:




#it's a linux newbie asking that question :newbie:

udaman 11-13-2010 11:53 AM

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.

roy.zyo 11-14-2010 11:06 AM

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!

stress_junkie 11-14-2010 11:12 AM

Quote:

Originally Posted by roy.zyo (Post 4158530)
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 (Post 4158530)
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.

crosstalk 11-14-2010 11:19 AM

"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.

udaman 11-14-2010 11:26 AM

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.

H_TeXMeX_H 11-14-2010 11:57 AM

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.

catkin 11-14-2010 01:10 PM

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.

win32sux 11-14-2010 09:40 PM

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.

jay73 11-14-2010 10:16 PM

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.

win32sux 11-14-2010 11:05 PM

Quote:

Originally Posted by jay73 (Post 4158987)
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).

H_TeXMeX_H 11-15-2010 04:44 AM

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.

win32sux 11-15-2010 05:25 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 4159224)
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.

salasi 11-15-2010 11:51 PM

Quote:

Originally Posted by roy.zyo (Post 4158530)
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.

H_TeXMeX_H 11-16-2010 12:57 PM

Quote:

Originally Posted by win32sux (Post 4159979)
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.


All times are GMT -5. The time now is 11:36 PM.