Different modes of accessing File Systems

 The file system can be of two types:

  • Local file system
  • User space file system 
Local file system comprises of traditional devices such as hard drives, SSDs(Solid State Drives) attached directly to the system. Eg. Ext4NTFS 

Operating System's kernel manages access to these local filesystems. Applications that reside on top of kernel interact with files through system calls.


Refer below image to know how applications, kernel and memory(internally comprises of primary and secondary memory)  reside in your computer:



However userspace filesystems are quite different in this regard. These file systems are sometimes called as FUSE (Filesystem in Userspace) filesystems. They typically operate within user space rather than in kernel space.

Fuse provides a bridge between the kernel space and the user space. Using the fuse module, custom file systems are implemented in the user space without modifying the kernel code.

GlusterFS is an example of user space file system.

The core components of GlusterFS, including the bricks and the translators run in userspace.

In other words we can say that glusterfs is mounted or exported using FUSE. GlusterFs client also runs in userspace and communicates with GlusterFS servers over the network.

Refer Mounting GlusterFS through FUSE

GlusterFS provides another way of accessing the filesystem or performing the IO on the file system directly apart from fuse. Explore about libgfapi to learn more.

* * *

Pursuing my quest of comparing Ceph with Gluster, I learnt that Ceph is operated in userspace as well as kernel space!

Here is the further reading suggestion on the same:
Mounting CephFS using kernel driver and Mounting CephFS using FUSE.

Also it is interesting to note that libcephfs is similar to libgfapi of glusterfs. Various applications can use these APIs to interact directly with the file systems. For example, Samba is one such application that uses both libcephfs and libgfapi for the similar purpose of accessing the underlying file system through its VFS modules:)


Comments

Popular Posts