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: |
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. |
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! |
Quote:
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:
|
"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. |
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. |
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. |
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.
|
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. |
Quote:
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. |
Quote:
Quote:
|
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. |
Quote:
|
Quote:
Quote:
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. |
Quote:
|
All times are GMT -5. The time now is 11:36 PM. |