5

Sometimes when I go through sections of Linux books about filesystem, it may turn out that it is a chapter talking about the directory structure of a standard Linux system, like /proc, /dev, /etc, /usr directories, with a brief explanation. Sometimes it may be about filesystem types like ext3, ext4 and nfs, dos, etc. I feel quite confused about that. Which one is correct? Or did I miss something?

In short, my question is:

The word filesystem means directory structure of Linux system or things like ext3, ext4, fat32, etc.?

  • en.wikipedia.org/wiki/File_system - it means both. – Mat Sep 2 '13 at 7:29
  • The ext3, ext4, fat32, etc. thing are the types of filesystem, or filesystem formats. The directory structure of the filesystem is the directory structure of the filesystem. I heavily agree that the terminology is quite confusing. I tend to prefer the term persistence system better than the historical filesystem. – 41754 Sep 2 '13 at 7:44
  • 1
    Put yet another way: ext4 is a [kind of] filesystem, a directory tree is [the content of] a filesystem. – goldilocks Sep 2 '13 at 12:58
4

A filesystem is both a reference to a tree structure of directories and files as well as a overarching structure that can be placed on a physical medium such as a hard drive or other similar types of medium.

At the end of of the day they're both layers of abstraction that people create so that things are standardized.

The directories + files analogy used is to mimic how people think, with respect to the physical world for storing items (files) inside of something (folders).

So too is a filesystem such as ext4 of fat32. Here it might not be so obvious, but the structure that this type of filesystem provides serves the same purpose, just at a lower level.

For example, a raw disk is just a sequence of bits. By creating a structure on top of it using inodes, we're able to access sections of the disk in an organized methodical fashion.

Notice the image of the inode structure (from wikipedia article titled: inode pointer structure

                         inode structure

The structure of a filesystem representing files + directories

        ss of unix fs

computer architectures

One thing you'll notice as you continue to study computer architectures is that the same concepts are used over and over again. The notion of hostnames is nested too.

                                   .---> <-----.
                                   |           |
                               .------.    .------.
                 ^------------>| .com |    | .net |
                 |             '------'    '------'
                 |                 ^
                 |                 |
             .--------.    .---------------.
             | google |    | stackexchange |
             '--------'    '---------------'
                  ^                ^
                  |                |
               .-----.          .------.
               | www |          | unix |
               '-----'          '------'

Or in programming, class inheritance (Ruby):

class Mammal  
  def breathe  
    puts "inhale and exhale"  
  end  
end  


class Cat < Mammal  
  def speak  
    puts "Meow"  
  end  
end  

jake = Cat.new  
jake.breathe  
jake.speak  
  • Hierarchical structures tend to be easy to visualize, navigate and manipulate. – Shadur Sep 2 '13 at 12:32
  • @Shadur - yeah they're a very easy concept to comprehend, plus they're all around us in nature. A fractal is a form of hierarchy. – slm Sep 2 '13 at 12:37
  • @sim - Thank you for your answer. I like the ruby example! – Biscuitz Sep 3 '13 at 7:19
  • @Biscuitz - you're quite welcome. Thank you for your question. – slm Sep 3 '13 at 11:36
1

As is usual in natural languages, the word filesystem has several related meanings. A filesystem relates to how files are organized; this can be interpreted at various levels.

The filesystem of a unix system is the set of all files that are accessible at a given time. For example, a system call that accesses a file can be classified as a filesystem system call. A process's filesystem credentials are the credentials that determine what files it can access.

The filesystem can also refer to the structure of that filesystem: what directories and files exist on a unix system and what they're used for. On Unix & Linux, we use the tag directory-structure for that meaning.

A filesystem is a way through which files can be accessed on a given system. The filesystem (in the first sense above) of a unix systems consists of several filesystems (in this sense), each mounted at a particular directory. Filesystems in this sense are usually refered to by their mount point: the root filesystem (mounted on /), the proc filesystem (normally mounted on /proc), the or a home filesystem (normally mounted on /home or a subdirectory, containing users' home directories), etc.

A filesystem type (or filesystem format) is a layout format for filesystems in the previous sense. Ext2, tmpfs, proc, sshfs, etc. are filesystem types. Filesystem type can be abbreviated to filesystem by metonymy. In fact, filesystem or filesystem is strictly speaking not just the layout format, but also the rules for modifying it.

A filesystem can also be a specific driver for a filesystem type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.