Search code examples
ubuntusshfusesshfs

Fuse in simpler terms


I am working on sshfs to mount a executable to a remote cluster. One of the steps involved in this process is modprobe fuse. While I understand the overall purpose of sshfs, I am not able to understand the part fuse has to play. I looked up on internet about fuse and not able to understand clearly the purpose.

Can someone help me understand the purpose of fuse in simpler terms?


Solution

  • FUSE is Filesystem in Userspace.

    SSHFS is joining SFTP and FUSE together to achieve what it does. Which means it is really ineffective, slow and really not for higher workloads. But to your question:

    Historically file-systems were the privilege of kernel modules, which was really painful, since writing kernel module is much more complicated than writing user-space program. FUSE is kernel module, but provides interface for user programs and if you mount file-system using sshfs, FUSE gets pointers to your function, that will handle system calls on that file-system (open, read, ...), which will get called when other program access the file on such filesystem.

    There is really nice tutorial for understanding FUSE on cs.nmsu.edu describing it on simple example of BBFS (Big Brother File System).