Could somebody explain the pros and cons of some of the most used file systems?
I'm interested in learning about different types of file systems, things I have gathered so far are
If somebody knows anything about other file systems, anything more about those whom I mentioned or anything I was wrong about? :) Thank you |
Wikipedia has a very comprehensive explanation of the differences:
http://en.wikipedia.org/wiki/Filesystem http://en.wikipedia.org/wiki/Compari...al_information |
Quote:
NTFS is used exclusively by Window$, but you can read and write to it from Linux. ext2 is a non-journaled filesystem, while ext3 is the journaled version of it, really they're the same filesystem in different modes. There's also the new, more experimental ext4. These are all good not performance-wise, but at recovery in case you destroy a partition superblock, because there are multiple backups. XFS and JFS are the high-performance filesystems according to numerous benchmarks. Indeed, if you do work with multimedia editing / recording or very large files, then these are the ones to get. JFS also has the benefit of using very little CPU time ... great on laptops. The recovery from these is a bit more complicated, but it is possible and in many cases you can recover stuff just as well. For example: http://www.sinz.org/Michael.Sinz/Linux/boot.html http://jfsrec.sourceforge.net/ There's more too, like reiserfs, which is good for lots of small files in large directory trees. And I'll add some benchmarks: http://linuxgazette.net/122/piszcz.html http://digg.com/linux_unix/Linux_Fil...Benchmark_2008 Btrfs looks promising. |
Quote:
That sort of thing isn't on Wikipedia and in my experience only people who have been in the "biz" for a long time can explain it well Also, H_TeXMeX_H said something about ext2 not being journaled and ext3 being journaled. Which is better? (a journaled file system logs all actions to a journal right?) Wouldn't ext3 be the best file system for a personal laptop/PC? And what about ext4, I heard it wasn't well received |
I prefer sites which offer factual information which I can read and analyze.
You got a great response from H_TeXMeX_H. He is spot on with his summary. Many times you get feedback like "this sucks" or "don't use that" which are solely based upon opinion and provide nothing more than personal preference. |
There's also Reiser4, it's the newest version of the Hans Reiser filesystems. It's better than reiserfs in most cases.
|
There are websites which perform benchmarks on various filesystems. For a media server, being better as serving up very large files quickly is important. For a database server, being able to access any record quickly is important. For a workstation, reliability is more important than speed, so for your own computer which isn't a dedicated mysql or file server, ext3 or reiserfs may be the best options. They are written to be more robust and use more generic coding which will run on a larger range of computers such as old i386 computers.
While Linux can read and write to FAT and NTFS filesystems, they are good choices. They don't save Linux permissions and ownership. Also, Linux can't repair a faulty NTFS filesystem. So if you don't have access to windows, never use NTFS. If you purchase an external hard drive that uses NTFS, you are better off reformatting it if you don't run Windows as well. |
I use JFS myself. The reasons I chose to use it are as follows.
JFS creates inodes on the fly. What this means is that 1) formatting a partition to JFS is almost instantaneous (especially nice if you use LVM and create and delete logical volumes a lot) 2) It doesn't waste diskspace by allocating lots of inodes that are never going to get used. A good example of this would be a large filesystem containing a small number of very large files. In addition to that, you can also dynamically increase (but sadly not shrink) a jfs filesystem (another good one for LVM setups). Finally, its meta-data journalled for that little bit of extra peace of mind. |
Quote:
|
Quote:
Too many inodes = wasted space, too few = unusable space. Again, another reason I like linux's jfs, you don't have to worry about it. |
Quote:
Why are inodes good? |
Quote:
here is a great read on inodes and files. http://www.ibm.com/developerworks/ai...x14/index.html |
An inode is a control block within the filesystem. They're how the system finds the data that make up the contents of a file. Each file starts with an inode, so if you run out of them, then you can't create any new files, even if you have plenty of empty space in your filesystem.
Some filesystems such as ext create these blocks in advance when you format the filesystem and leave them unused. You normally tell the format command to put an inode every so many bytes through the filesystem, so the closer you pack them in, the more you get, but as inodes take up space on the filesystem, the more inodes you have the less space you have left for actual files. Getting the right spacing and number of inodes can be a bit of a juggling act. Though, it's usually only an issue when dealing with extremes, like really big filesystems or huge numbers of really small files. Because ext creates its inodes in advance, When the ext filesystem needs to create a new file, it'll find an existing empty inode entry and use it for the new file. Where JFS is different is that it doesn't create them in advance (when you format the partition), it creates them as it needs them when it creates new files. So, in practice, that means there aren't any empty ones taking up space in your filesystem that may never get used, and you can't run out of them. As an aside, Files actually don't have names. They have inode numbers. You can see this by doing a 'ls -i' on a file. When you access a file by name, the system searches the directory for the name and looks up the correct inode number which is then used internally. A directory is really just a special type of file containing filenames and inode numbers. This is how you can sometimes have 2 (or more) links to the same file. There's a bit more to it than that, some filesystems do things slightly differently to each other and I've simplified it a little to make it a little easier to follow, but that's roughly what its all about. Hope that helps. |
adding on to that if you look at how Dennis Ritchie discussed it, he said that it is pretty much a flat array on the disk. the inode is the selected index from this array. This array is used to tell the system the following information about the file the inode references:
1. inode number 2. number of links to the file 3. UID 4. GID 5. Size of file 6. Number of blocks file uses. Also the inode helps by making sure that two people can edit a file until it is release back. |
Is the JFS filesystem still being actively maintained in the kernel? I though I read something about it in one of the Linux Magazine.
|
All times are GMT -5. The time now is 10:21 AM. |