Filesystem in Userspace explained

Filesystem in Userspace
Programming Language:C
Operating System:Unix, Unix-like
Genre:File system driver
License:GPL for Linux kernel part, LGPL for Libfuse, Simplified BSD on FreeBSD, ISC license on OpenBSD; proprietary for macOS

Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a bridge to the actual kernel interfaces.

FUSE is available for Linux, FreeBSD, OpenBSD, NetBSD (as puffs), OpenSolaris, Minix 3, macOS,[1] and Windows.

FUSE is free software originally released under the terms of the GNU General Public License and the GNU Lesser General Public License.

History

The FUSE system was originally part of AVFS (A Virtual Filesystem), a filesystem implementation heavily influenced by the translator concept of the GNU Hurd.[2] It superseded Linux Userland Filesystem, and provided a translational interface using in libfuse1.

FUSE was originally released under the terms of the GNU General Public License and the GNU Lesser General Public License, later also reimplemented as part of the FreeBSD base system[3] and released under the terms of Simplified BSD license. An ISC-licensed re-implementation by Sylvestre Gallon was released in March 2013,[4] and incorporated into OpenBSD in June 2013.[5]

FUSE was merged into the mainstream Linux kernel tree in kernel version 2.6.14.[6]

The userspace side of FUSE, the library, generally followed the pace of Linux kernel development while maintaining "best effort" compatibility with BSD descendants. This is possible because the kernel FUSE reports its own "feature levels", or versions. The exception is the FUSE fork for macOS, OSXFUSE, which has too many differences for sharing a library.[7] A break in libfuse history is libfuse3, which includes some incompatible improvements in the interface and performance, compared to the older libfuse2 now under maintenance mode.[8]

As the kernel-userspace protocol of FUSE is versioned and public, a programmer can choose to use a different piece of code in place of and still communicate with the kernel's FUSE facilities. On the other hand, and its many ports provide a portable high-level interface that may be implemented on a system without a "FUSE" facility.

Operation and usage

To implement a new file system, a handler program linked to the supplied libfuse library needs to be written. The main purpose of this program is to specify how the file system is to respond to read/write/stat requests. The program is also used to mount the new file system. At the time the file system is mounted, the handler is registered with the kernel. If a user now issues read/write/stat requests for this newly mounted file system, the kernel forwards these IO-requests to the handler and then sends the handler's response back to the user.

FUSE is particularly useful for writing virtual file systems. Unlike traditional file systems that essentially work with data on mass storage, virtual filesystems don't actually store data themselves. They act as a view or translation of an existing file system or storage device.

In principle, any resource available to a FUSE implementation can be exported as a file system.

Applications

On-disk file systems

Conventional on-disk file systems can be implemented in user space with FUSE, e.g. for compatibility or licensing reasons.

Allows files stored on magnetic tape to be accessed in a similar fashion to those on disk or removable flash drives.

retro-fuse is a user-space filesystem that provides a way to mount filesystems created by ancient Unix systems on modern OSes. The current version of retro-fuse supports mounting filesystems created by Fifth, Sixth and Seventh Edition of Research Unix from Bell Labs, as well as 2.9BSD and 2.11BSD based systems.

Layering file systems

FUSE filesystems can create a view of an underlying file system, transforming the files in some way.

Encrypted virtual filesystem

Archive and backup file systems

FUSE filesystems can expose the contents of archives or backup sets without having to first extract them.

Immutable, distributed filesystem used by Rubrik Cloud Data Management data protection applications

Deduplicating backup program that allows backup archives to be mounted as FUSE filesystems.

Free, fast, efficient and secure backup software uses FUSE to be able to browse all of your backup snapshots as a regular file system

Remote/distributed file system clients

A distributed read-only software distribution system, implemented as a POSIX filesystem in user space (FUSE) using HTTP transport, to deliver software in a fast and reliable fashion at global scale.

A commercial filesystem implementing SFTP/FTP/S3/Swift using FUSE

Clustered Distributed Filesystem having ability to scale up to several petabytes.

A FUSE filesystem that allows access to Amazon S3/Microsoft Azure storage with an emphasis on performance.

A peer-to-peer distributed file system that seeks to connect all computing devices with the same system of files.

A distributed POSIX file system built on top of Redis and S3.

A distributed filesystem with end-to-end encryption and a global namespace based on Keybase.io service that uses FUSE to create cryptographically secure file mounts.

MinFS is a fuse driver for Amazon S3 compatible object storage server. MinFS[11] lets you mount a remote bucket (from a S3 compatible object store), as if it were a local directory.

An open source distributed fault-tolerant file system available on every OS with FUSE implementation (Linux, FreeBSD, NetBSD, OpenSolaris, OS X), able to store petabytes of data spread over several servers visible as one resource.

A commercial Linux file system that combines Block, File, and S3 compatible Cloud & Object storage into a single pool of POSIX compatible storage.

Distributed filesystem with object store backend (Amazon S3, Google Cloud Storage or S3-compatible object store) using FUSE

Gives the ability to mount an S3 bucket as if it were a local file system.

Sector is a distributed file system designed for large amount of commodity computers. Sector uses FUSE to provide a mountable local file system interface.

Provides access to a remote filesystem through SSH.

A commercial filesystem implementing WebDAV, SFTP, FTP, FTPS and Amazon S3

View and edit Wikipedia articles as if they were real files

Was a multi-platform, Java-based fully OS integrated distributed file system. Using FUSE, MacFUSE and CBFS Connect respectively for file system integration, in addition to a Java-based app accessible from any Java-enabled web browser (service discontinued in 2015).

A remote file aggregating filesystem with transparent CURL access to distributed files.

Other

The virtual filesystem for the GNOME desktop

A secure and authenticated store for secrets and small documents using envelope encryption with one-time password (OTP) authentication. It uses FUSE to expose the vault as a file system.

See also

External links

Notes and References

  1. Web site: Home - FUSE for OS X.
  2. Web site: Some technical advantages of the Hurd. May 15, 2011. March 28, 2016.
  3. Web site: WhatsNew/FreeBSD10 - FreeBSD Wiki.
  4. Web site: openbsd dev - tech - Fuse (and sshfs) support for OpenBSD. 2013-07-14. 2020-10-26. https://web.archive.org/web/20201026101016/http://openbsd.7691.n7.nabble.com/Fuse-and-sshfs-support-for-OpenBSD-td224422.html. dead.
  5. Web site: 'CVS: cvs.openbsd.org: src' - MARC.
  6. Web site: file-systems.fuse.devel - FUSE merged to 2.6.14! - msg#00021 - Recent Discussion OSDir.com. dead. https://web.archive.org/web/20160420173822/http://osdir.com/ml/file-systems.fuse.devel/2005-09/msg00021.html. 2016-04-20.
  7. Web site: libfuse/libfuse, the reference implementation of the Linux FUSE (Filesystem in Userspace) interface . libfuse . 9 January 2020 . 9 January 2020.
  8. Web site: libfuse3 ChangeLog . GitHub . 9 January 2020.
  9. Web site: Lustre FreeBSD. 2008-03-02. dead. https://web.archive.org/web/20080312031136/http://lustre.sev.net.ua/. 2008-03-12.
  10. Web site: Architecture ZFS for Lustre . 2008-03-02 . Sun Microsystems . 2009-01-22 . https://web.archive.org/web/20090122083850/http://arch.lustre.org/index.php?title=Architecture_ZFS_for_Lustre . dead .
  11. Web site: minio/minfs. GitHub. 12 April 2018.