SlideShare a Scribd company logo
FUSE Filesystems




     William Stearns
 wstearns@pobox.com
 http://www.stearns.org
Overview
●   Adding features to filesystems
●   Fuse overview and examples
    –   Setup
    –   Sshfs, encfs, and gluster
    –   Pros and cons
●   Wrap up
Existing filesystems
●   Underlying block device
    –   Translation: partition or full drive
●   Format with filesystem
●   Kernel mounts block device with filesystem
Could we...
●   Automatically encrypt/decrypt?
●   Automatically compress/decompress?
●   Present tars and zips as directory trees?
●   Show an SQL table as a directory?
●   Set up a hierarchical filesystem?
Where do we put this code?
●   Modify each application
●   Modify existing libraries or new library
●   New filesystem layer
●   Existing filesystems
Issues with core filesystems
●   C only
    –   Limited libraries
    –   Kernel mode, more complicated
●   No access to network or other files
●   Kernel: poor place for complex features
Add features to individual FS's?
●   Different features in different fs's
    –   Give ext3 transparent decompression
    –   Give XFS ability to descend into tars
    –   Give reiserfs4 encryption and decompression
●   See the problem?
    –   What if Intel nics could send TCP only and other
        nics UDP only?
So what's the answer?
●   Applications don't have these restrictions
●   Let an application present whatever it wants
FUSE
●   Filesystems in USErspace
    –   Now a program (fuse application) is responsible for
        dirs and files
    –   When file is needed, kernel asks fuse application for
        it
●   Fuse application can access anything to get
    raw data
    –   Including existing local or remote file trees
    –   Network connections
    –   Carrier Pigeon
    –   /dev/random!
FUSE Filesystems
Example: decompfs
●   Existing file tree /archives/
    –   .tar.gzs, .zips, .bz2s
●   Want to see uncompressed files
    –   Without having to manually compress and
        decompress
Decompfs
●   Mount /uncomp/ as decompfs
    –   Request for /uncomp/2008tax.xls
    –   Handed to decompfs
    –   Decompfs asks for /archives/2008tax.xls.bz2
    –   Decompresses
    –   Hands file back to original requestor
Fuse Setup
●   yum install fuse fuse-libs
●   usermod -a -G fuse {username}
    –   Log out and log back in
●   modprobe fuse
●   Check group membership
    –   groups
SSHFS Overview
●   See files on remote server
●   All communication over ssh
    –   Encrypted, authenticated
    –   Access any other OS with an SSH server
Sshfs Install
●   yum install fuse-sshfs
Sshfs Example
●   mkdir -p ~/mnt/zaphod/
●   sshfs wstearns@zaphod:/home/wstearns/
    ~/mnt/zaphod/
●   ls -al ~/mnt/zaphod/
Encfs Overview
●   Encrypted files live on disk
    –   Good if laptop stolen or lost
●   Encfs presents them as unencrypted
●   File by file encryption
    –   No need to create a new block device and
        preallocate space
Encfs Install
●   yum install fuse-encfs
    –   Depends on the “rlog” package
Encfs Example
●   mkdir ~/.encfs-private/ ~/encfs-root/
●   encfs ~/.encfs-private/ ~/encfs-root/
    –   Walks you through setup, next slide
●   /etc/fstab:
    –   encfs /home/wstearns/encfs-root fuse
        defaults,user,nodev,nosuid,noauto 0 0
Encfs setup options
●   Blowfish for 32 bit cpus
●   256 bit for maximum strength
●   Default 512 byte block size
●   Block filename encoding
●   No filename IV chaining
    –   Files can be moved to a different dir without re-
        encoding filename
●   Yes, Per-file IV
●   No block auth code headers
●   Password....
Glusterfs Overview
●   Network filesystem
    –   TCP/IP, Infiniband
●   Parallel storage
    –   Replicate files on multiple remote servers
    –   Keep one server local too!
●   Backend storage is in native format
Glusterfs Install
●   We'll do client and server on one machine
●   yum install glusterfs-client glusterfs-server
    glusterfs-libs
●   mkdir -p ~/glusterfs-test/conf ~/glusterfs-
    test/mnt ~/glusterfs-test/brick-1-1
server-1-1.vol
–   volume brick
–    type storage/posix
–    option directory /home/wstearns/glusterfs-test/brick-1-1
–   end-volume
–

–   volume server
–    type protocol/server
–    subvolumes brick
–    option transport-type tcp/server
–    option client-volume-filename /home/wstearns/glusterfs-
    test/conf/client-1-1.vol
–    option auth.ip.brick.allow 127.0.0.1    #*
–   End-volume
client-1-1.vol
–   volume client
–    type protocol/client
–    option transport-type tcp/client
–    option remote-host 127.0.0.1
–    option remote-subvolume brick
–   end-volume
Glusterfs Example
●   tail -f /var/log/glusterfs/glusterfsd.log
●   glusterfsd -f ~/glusterfs-test/conf/server-1-1.vol
●   glusterfs -f ~/glusterfs-test/conf/client-1-1.vol
    ~/glusterfs-test/mnt/
Unmounting
●   fusermount -u {mount_point}
●   umount {mount_mount}
Other fuse filesystems
●   Yacufs – on the fly {music} file conversion
●   Clamfs – on-access AV scanning
●   Archive access: cpio, tar, rar, ~20 more
●   Compression FS's
●   Database: mysql, postgresql, bdb
●   Network: smb, webdav, gmailfs, httpfs,
    wikipediafs, curlftpfs, imapfs
●   Unionfs, copyfs, svn, git, cvsfs
Fuse Pros
●   Many programming languages
●   Support for Linux, OS/X, FreeBSD, NetBSD,
    OpenSolaris, Hurd
●   No public windows drivers
    –   But: re-export fuse mount with samba
●   Present any vaguely hierarchical data
Fuse Cons
●   Performance
    –   Context switches
    –   Apps slower than kernels
         ●   Swappable
    –   Fuse content not generally cacheable
●   Permissions
    –   User and “anyone” permissions fine
    –   Group permissions tough
Other similar approaches
●   File managers
    –   Nautilus
    –   Midnight commander
    –   Above only good if you're using these apps
●   Podfuk
    –   coda/nfs based
●   LUFS
    –   No active development
    –   LUFS bridge available
More details
●   http://fuse.sourceforge.net
    –   Fuse diagram courtesy of this site
●   http://fuse.sf.org/sshfs.html
●   http://www.arg0.net/encfs
●   http://www.gluster.org
Questions?
●   wstearns@pobox.com

More Related Content

ODP
LSA2 - 01 Virtualization with KVM
PDF
OpenWrt From Top to Bottom
ODP
LSA2 - 02 Control Groups
PDF
SELinux by Example
PDF
Linux fundamental - Chap 12 Hardware Management
PPTX
First steps on CentOs7
PPTX
Introduction to Memory-Style Storage in Linux
LSA2 - 01 Virtualization with KVM
OpenWrt From Top to Bottom
LSA2 - 02 Control Groups
SELinux by Example
Linux fundamental - Chap 12 Hardware Management
First steps on CentOs7
Introduction to Memory-Style Storage in Linux

What's hot (20)

PDF
Linux fundamental - Chap 11 boot
PDF
Fun with FUSE
PDF
Linux Locking Mechanisms
PPT
Driver_linux
PDF
Introduction to Modern U-Boot
PPTX
UNIX/Linux training
PDF
Kernel Recipes 2016 -
PDF
Linux fundamental - Chap 04 archive
PDF
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
PDF
NetBSDworkshop
PDF
NetBSD workshop
PPT
OpenWRT guide and memo
PDF
XPDS14: libvirt support for libxenlight - James Fehlig, SUSE
PDF
Chap 17 advfs
PDF
Introduction to systemd
PDF
Ha opensuse
ODP
Cluster filesystems
PDF
NFS updates for CLSF
PDF
A Journey to Boot Linux on Raspberry Pi
PDF
LCE13: Virtualization Forum
Linux fundamental - Chap 11 boot
Fun with FUSE
Linux Locking Mechanisms
Driver_linux
Introduction to Modern U-Boot
UNIX/Linux training
Kernel Recipes 2016 -
Linux fundamental - Chap 04 archive
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
NetBSDworkshop
NetBSD workshop
OpenWRT guide and memo
XPDS14: libvirt support for libxenlight - James Fehlig, SUSE
Chap 17 advfs
Introduction to systemd
Ha opensuse
Cluster filesystems
NFS updates for CLSF
A Journey to Boot Linux on Raspberry Pi
LCE13: Virtualization Forum
Ad

Similar to FUSE Filesystems (20)

PDF
Using filesystem capabilities with rsync
PDF
An Introduction To Linux
PDF
FreeBSD Portscamp, Kuala Lumpur 2016
PDF
Ericas-Linux-Plus-Study-Guide
PPTX
Resource Monitoring and management
PPTX
How to install gentoo distributed
PPTX
Linux Presentation
PDF
ODP
4. linux file systems
PDF
Setting up LAMP for Linux newbies
PDF
Open Source Backup Conference 2014: Rear, by Ralf Dannert
ODP
Introduction to linux
PDF
Asiabsdcon2013
PPTX
Introduction to containers
PDF
Linux Directory Structure
PDF
vbsd2013
ODP
Basic orientation to Linux
PDF
When ACLs Attack
PDF
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
PDF
Adhocr T-dose 2012
Using filesystem capabilities with rsync
An Introduction To Linux
FreeBSD Portscamp, Kuala Lumpur 2016
Ericas-Linux-Plus-Study-Guide
Resource Monitoring and management
How to install gentoo distributed
Linux Presentation
4. linux file systems
Setting up LAMP for Linux newbies
Open Source Backup Conference 2014: Rear, by Ralf Dannert
Introduction to linux
Asiabsdcon2013
Introduction to containers
Linux Directory Structure
vbsd2013
Basic orientation to Linux
When ACLs Attack
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
Adhocr T-dose 2012
Ad

More from elliando dias (20)

PDF
Clojurescript slides
PDF
Why you should be excited about ClojureScript
PDF
Functional Programming with Immutable Data Structures
PPT
Nomenclatura e peças de container
PDF
Geometria Projetiva
PDF
Polyglot and Poly-paradigm Programming for Better Agility
PDF
Javascript Libraries
PDF
How to Make an Eight Bit Computer and Save the World!
PDF
Ragel talk
PDF
A Practical Guide to Connecting Hardware to the Web
PDF
Introdução ao Arduino
PDF
Minicurso arduino
PDF
Incanter Data Sorcery
PDF
PDF
Fab.in.a.box - Fab Academy: Machine Design
PDF
The Digital Revolution: Machines that makes
PDF
Hadoop + Clojure
PDF
Hadoop - Simple. Scalable.
PDF
Hadoop and Hive Development at Facebook
PDF
Multi-core Parallelization in Clojure - a Case Study
Clojurescript slides
Why you should be excited about ClojureScript
Functional Programming with Immutable Data Structures
Nomenclatura e peças de container
Geometria Projetiva
Polyglot and Poly-paradigm Programming for Better Agility
Javascript Libraries
How to Make an Eight Bit Computer and Save the World!
Ragel talk
A Practical Guide to Connecting Hardware to the Web
Introdução ao Arduino
Minicurso arduino
Incanter Data Sorcery
Fab.in.a.box - Fab Academy: Machine Design
The Digital Revolution: Machines that makes
Hadoop + Clojure
Hadoop - Simple. Scalable.
Hadoop and Hive Development at Facebook
Multi-core Parallelization in Clojure - a Case Study

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
KodekX | Application Modernization Development
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Cloud computing and distributed systems.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
KodekX | Application Modernization Development
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Cloud computing and distributed systems.
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)

FUSE Filesystems

  • 1. FUSE Filesystems William Stearns wstearns@pobox.com http://www.stearns.org
  • 2. Overview ● Adding features to filesystems ● Fuse overview and examples – Setup – Sshfs, encfs, and gluster – Pros and cons ● Wrap up
  • 3. Existing filesystems ● Underlying block device – Translation: partition or full drive ● Format with filesystem ● Kernel mounts block device with filesystem
  • 4. Could we... ● Automatically encrypt/decrypt? ● Automatically compress/decompress? ● Present tars and zips as directory trees? ● Show an SQL table as a directory? ● Set up a hierarchical filesystem?
  • 5. Where do we put this code? ● Modify each application ● Modify existing libraries or new library ● New filesystem layer ● Existing filesystems
  • 6. Issues with core filesystems ● C only – Limited libraries – Kernel mode, more complicated ● No access to network or other files ● Kernel: poor place for complex features
  • 7. Add features to individual FS's? ● Different features in different fs's – Give ext3 transparent decompression – Give XFS ability to descend into tars – Give reiserfs4 encryption and decompression ● See the problem? – What if Intel nics could send TCP only and other nics UDP only?
  • 8. So what's the answer? ● Applications don't have these restrictions ● Let an application present whatever it wants
  • 9. FUSE ● Filesystems in USErspace – Now a program (fuse application) is responsible for dirs and files – When file is needed, kernel asks fuse application for it ● Fuse application can access anything to get raw data – Including existing local or remote file trees – Network connections – Carrier Pigeon – /dev/random!
  • 11. Example: decompfs ● Existing file tree /archives/ – .tar.gzs, .zips, .bz2s ● Want to see uncompressed files – Without having to manually compress and decompress
  • 12. Decompfs ● Mount /uncomp/ as decompfs – Request for /uncomp/2008tax.xls – Handed to decompfs – Decompfs asks for /archives/2008tax.xls.bz2 – Decompresses – Hands file back to original requestor
  • 13. Fuse Setup ● yum install fuse fuse-libs ● usermod -a -G fuse {username} – Log out and log back in ● modprobe fuse ● Check group membership – groups
  • 14. SSHFS Overview ● See files on remote server ● All communication over ssh – Encrypted, authenticated – Access any other OS with an SSH server
  • 15. Sshfs Install ● yum install fuse-sshfs
  • 16. Sshfs Example ● mkdir -p ~/mnt/zaphod/ ● sshfs wstearns@zaphod:/home/wstearns/ ~/mnt/zaphod/ ● ls -al ~/mnt/zaphod/
  • 17. Encfs Overview ● Encrypted files live on disk – Good if laptop stolen or lost ● Encfs presents them as unencrypted ● File by file encryption – No need to create a new block device and preallocate space
  • 18. Encfs Install ● yum install fuse-encfs – Depends on the “rlog” package
  • 19. Encfs Example ● mkdir ~/.encfs-private/ ~/encfs-root/ ● encfs ~/.encfs-private/ ~/encfs-root/ – Walks you through setup, next slide ● /etc/fstab: – encfs /home/wstearns/encfs-root fuse defaults,user,nodev,nosuid,noauto 0 0
  • 20. Encfs setup options ● Blowfish for 32 bit cpus ● 256 bit for maximum strength ● Default 512 byte block size ● Block filename encoding ● No filename IV chaining – Files can be moved to a different dir without re- encoding filename ● Yes, Per-file IV ● No block auth code headers ● Password....
  • 21. Glusterfs Overview ● Network filesystem – TCP/IP, Infiniband ● Parallel storage – Replicate files on multiple remote servers – Keep one server local too! ● Backend storage is in native format
  • 22. Glusterfs Install ● We'll do client and server on one machine ● yum install glusterfs-client glusterfs-server glusterfs-libs ● mkdir -p ~/glusterfs-test/conf ~/glusterfs- test/mnt ~/glusterfs-test/brick-1-1
  • 23. server-1-1.vol – volume brick – type storage/posix – option directory /home/wstearns/glusterfs-test/brick-1-1 – end-volume – – volume server – type protocol/server – subvolumes brick – option transport-type tcp/server – option client-volume-filename /home/wstearns/glusterfs- test/conf/client-1-1.vol – option auth.ip.brick.allow 127.0.0.1 #* – End-volume
  • 24. client-1-1.vol – volume client – type protocol/client – option transport-type tcp/client – option remote-host 127.0.0.1 – option remote-subvolume brick – end-volume
  • 25. Glusterfs Example ● tail -f /var/log/glusterfs/glusterfsd.log ● glusterfsd -f ~/glusterfs-test/conf/server-1-1.vol ● glusterfs -f ~/glusterfs-test/conf/client-1-1.vol ~/glusterfs-test/mnt/
  • 26. Unmounting ● fusermount -u {mount_point} ● umount {mount_mount}
  • 27. Other fuse filesystems ● Yacufs – on the fly {music} file conversion ● Clamfs – on-access AV scanning ● Archive access: cpio, tar, rar, ~20 more ● Compression FS's ● Database: mysql, postgresql, bdb ● Network: smb, webdav, gmailfs, httpfs, wikipediafs, curlftpfs, imapfs ● Unionfs, copyfs, svn, git, cvsfs
  • 28. Fuse Pros ● Many programming languages ● Support for Linux, OS/X, FreeBSD, NetBSD, OpenSolaris, Hurd ● No public windows drivers – But: re-export fuse mount with samba ● Present any vaguely hierarchical data
  • 29. Fuse Cons ● Performance – Context switches – Apps slower than kernels ● Swappable – Fuse content not generally cacheable ● Permissions – User and “anyone” permissions fine – Group permissions tough
  • 30. Other similar approaches ● File managers – Nautilus – Midnight commander – Above only good if you're using these apps ● Podfuk – coda/nfs based ● LUFS – No active development – LUFS bridge available
  • 31. More details ● http://fuse.sourceforge.net – Fuse diagram courtesy of this site ● http://fuse.sf.org/sshfs.html ● http://www.arg0.net/encfs ● http://www.gluster.org
  • 32. Questions? ● wstearns@pobox.com