LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 12-10-2008, 12:01 PM   #1
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Rep: Reputation: 15
Smile 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
  • FAT12 and FAT16 were used by windows but you could only have files THISLONG.EXA so they made FAT32 and then vFAT or something. Most people seem to dislike the FAT system
  • NTFS seems to be the best system if you want to run on both Windows and Linux or just Windows (so NTFS would be a good format for your USB memory sticks, because you'll probably use them on computers,-not-linux right?)
  • EXT2 and 3 seem to be the best formats for Linux
  • ...I don't really know any other, maybe XFS which seems to be good for Media storage/transfer or something

If somebody knows anything about other file systems, anything more about those whom I mentioned or anything I was wrong about? Thank you
 
Old 12-10-2008, 12:06 PM   #2
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
Wikipedia has a very comprehensive explanation of the differences:

http://en.wikipedia.org/wiki/Filesystem

http://en.wikipedia.org/wiki/Compari...al_information
 
Old 12-10-2008, 12:41 PM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
Quote:
Originally Posted by baldurpet View Post
  • FAT12 and FAT16 were used by windows but you could only have files THISLONG.EXA so they made FAT32 and then vFAT or something. Most people seem to dislike the FAT system
  • NTFS seems to be the best system if you want to run on both Windows and Linux or just Windows (so NTFS would be a good format for your USB memory sticks, because you'll probably use them on computers,-not-linux right?)
  • EXT2 and 3 seem to be the best formats for Linux
  • ...I don't really know any other, maybe XFS which seems to be good for Media storage/transfer or something
FAT12 and FAT16 are virtually obsolete. FAT32 is still used on USB sticks, but will soon also became obsolete due to maximum file size of 4 GB.

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.
 
Old 12-10-2008, 01:37 PM   #4
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AuroraCA View Post
Wikipedia has a very comprehensive explanation of the differences.
I know, I looked it up on Wikipedia too but as much as I love Wikipedia it often isn't very concise and informative (well it has information, but it's often difficult to gather it if you don't know much about the material in the first place like at the "comparison" page). I need something like H_TeXMeX_H said "FAT12 and FAT16 are virtually obsolete" or something like "most people should use y but if you're working with multimedia (or something) you should use x instead".

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

Last edited by baldurpet; 12-10-2008 at 02:23 PM.
 
Old 12-10-2008, 02:24 PM   #5
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
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.
 
Old 12-10-2008, 02:36 PM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
There's also Reiser4, it's the newest version of the Hans Reiser filesystems. It's better than reiserfs in most cases.
 
Old 12-10-2008, 02:39 PM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.
 
Old 12-10-2008, 02:42 PM   #8
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
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.
 
Old 12-10-2008, 02:59 PM   #9
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
Quote:
Originally Posted by GazL View Post
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.
Funny that you mention small files and inodes. I had a client that could not figure out why he could not save files even though he had more than enough space. after poking around we found out that it was due to running out of inodes.
 
Old 12-10-2008, 04:37 PM   #10
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by jstephens84 View Post
Funny that you mention small files and inodes. I had a client that could not figure out why he could not save files even though he had more than enough space. after poking around we found out that it was due to running out of inodes.
Indeed. I've seen that on a few occasions too. Always a giggle when you hit something like that and get to call the previous sys admin of that system dirty names for not setting the ratio appropriately!

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.
 
Old 12-10-2008, 06:40 PM   #11
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GazL View Post
JFS creates inodes on the fly.
I'm not really sure what an inode is (a quick dab to Wikipedia says it something that sores information about files or directories).. but why is it so good that JFS creates inodes without stopping or on the fly? How do other file systems create inodes- do you have to make them yourself (don't remember ever having had to do that myself) or maybe they just don't make it?

Why are inodes good?
 
Old 12-10-2008, 07:30 PM   #12
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
Quote:
Originally Posted by baldurpet View Post
I'm not really sure what an inode is (a quick dab to Wikipedia says it something that sores information about files or directories).. but why is it so good that JFS creates inodes without stopping or on the fly? How do other file systems create inodes- do you have to make them yourself (don't remember ever having had to do that myself) or maybe they just don't make it?

Why are inodes good?
Simply an Inode is an location on the hard drive. When you create a file that file is then given an inode. I think the default is every 4096 bytes = 1 inode. But that can be changed. So if you are going to have a ton of small files then change it to say 2048 which will pretty much double the inode's.

here is a great read on inodes and files. http://www.ibm.com/developerworks/ai...x14/index.html
 
Old 12-10-2008, 07:38 PM   #13
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
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.

Last edited by GazL; 12-10-2008 at 07:42 PM. Reason: typo
 
Old 12-10-2008, 07:47 PM   #14
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
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.
 
Old 12-10-2008, 10:04 PM   #15
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Is the JFS filesystem still being actively maintained in the kernel? I though I read something about it in one of the Linux Magazine.
 
  


Reply

Tags
ext2, ext3, fat, fat16, fat32, filesystem, ntfs, xfs


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What kernel should I use? Pros/Cons.... M$ISBS Slackware 8 11-13-2006 08:23 AM
What are the Pros versus Cons with File Integrity Detection Systems 2backitup Linux - Security 7 03-02-2006 06:47 PM
autopartition pros/cons curos Fedora - Installation 1 08-10-2005 04:35 AM
pros/cons of getting a G5 Tomasfuego Linux - Hardware 4 06-07-2005 04:53 AM
Pros And Cons Of Linux Oliver_Bell Linux - Newbie 37 05-14-2003 08:54 AM


All times are GMT -5. The time now is 05:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration