Abstract


  • Stands for Filesystem in USErspace

  • A software interface that enables program in the User Space to create and manage filesystems without requiring Kernel Mode


  • Traditionally, filesystem operations like reading and writing files, creating directories, and managing file metadata are handled by the Kernel. However, FUSE allows these operations to be implemented in user space by user programs, outside the kernel


  • The content of these file systems can come from anywhere: from the local disk, from across the network, from memory, or any other combination of sources

Flexibility

Developer can create their own filesystem with customisations without the need to modify the Kernel

This is commonly used for mounted Cloud Storage. The files dropped into the mounted Cloud Storage is stored by making network calls instead of IO. We need to have a set of logic for this. FUSE allows us to introduce this new set of logic without modifying the kernel

Developer Friendly

Writing a file system using FUSE is orders of magnitude easier and quicker than the traditional approach of writing in-kernel file systems. Since FUSE file systems are regular applications (as opposed to Kernel Module), you have just as much flexibility and choice in programming tools, debuggers, and libraries as you have if you were developing standard applications

FUSE on MacOS

macOS doesn’t come with a FUSE kernel module built directly into the core operating system, but it does support installing and using FUSE via 3rd-party FUSE Kernel Module. macFUSE is a popular choice

FUSE Driver

  • Also known as FUSE File Systems
  • The actual filesystem implementation running in User Space

FUSE Mechanism

  • FUSE works by providing a FUSE Kernel Module that acts as a bridge between the filesystem requests made by File System User and FUSE Driver


  • When an application makes a filesystem request, the request is forwarded to the FUSE kernel module, which then passes it to the user-space filesystem implementation. Once the operation is completed in user space, the result is sent back to the kernel module, which returns the result to the application

RCLONE

  • Rclone allows us to mount cloud storages to the local File System, supports both read and write
  • We can install the tool with sudo -v ; curl https://rclone.org/install.sh | sudo bash

Great tool for backup!

With rclone sync <LOCAL_FOLDER> <REMOTE>:<REMOTE_DESTINATION_FOLDER>, we are able to sync local changes to the cloud storage. These local changes can be backup files.

Where should the config file be stored?

Use rclone config file to find the path to store your rclone config file.

APFS-FUSE


  • apfs-fuse is a read-only FUSE Driver for APFS(mounting APFS to Linux Kernel). It also supports software encrypted volumes and fusion drives. Firmlinks are not supported yet
  • Obtain apfs-fuse by building from source
# Obtain the Repo
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
 
# Compile the driver:
mkdir build
cd build
cmake ..
ccmake . # Only if you want to change build options
make
  • Mount and unmount the APFS
# Mounting, uid and gid are the id of current user. This allows current user to access the mounted APFS
apfs-fuse -o uid=<uid>,gid=<gid>,allow_other /dev/<device> <mount-path>
 
# Unmounting
sudo umount <mount-path>
  • For more information, refer to here

References