SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
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!
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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Linux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootLinux fundamental - Chap 11 boot
Linux fundamental - Chap 11 boot
 
Fun with FUSE
Fun with FUSEFun with FUSE
Fun with FUSE
 
Linux Locking Mechanisms
Linux Locking MechanismsLinux Locking Mechanisms
Linux Locking Mechanisms
 
Driver_linux
Driver_linuxDriver_linux
Driver_linux
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
Kernel Recipes 2016 -
Kernel Recipes 2016 - Kernel Recipes 2016 -
Kernel Recipes 2016 -
 
Linux fundamental - Chap 04 archive
Linux fundamental - Chap 04 archiveLinux fundamental - Chap 04 archive
Linux fundamental - Chap 04 archive
 
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
 
NetBSDworkshop
NetBSDworkshopNetBSDworkshop
NetBSDworkshop
 
NetBSD workshop
NetBSD workshopNetBSD workshop
NetBSD workshop
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
 
XPDS14: libvirt support for libxenlight - James Fehlig, SUSE
XPDS14: libvirt support for libxenlight - James Fehlig, SUSEXPDS14: libvirt support for libxenlight - James Fehlig, SUSE
XPDS14: libvirt support for libxenlight - James Fehlig, SUSE
 
Chap 17 advfs
Chap 17 advfsChap 17 advfs
Chap 17 advfs
 
Introduction to systemd
Introduction to systemdIntroduction to systemd
Introduction to systemd
 
Ha opensuse
Ha opensuseHa opensuse
Ha opensuse
 
Cluster filesystems
Cluster filesystemsCluster filesystems
Cluster filesystems
 
NFS updates for CLSF
NFS updates for CLSFNFS updates for CLSF
NFS updates for CLSF
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
 
LCE13: Virtualization Forum
LCE13: Virtualization ForumLCE13: Virtualization Forum
LCE13: Virtualization Forum
 

Semelhante a FUSE Filesystems

Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 

Semelhante a FUSE Filesystems (20)

Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
How to install gentoo distributed
How to install gentoo distributedHow to install gentoo distributed
How to install gentoo distributed
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
Setting up LAMP for Linux newbies
Setting up LAMP for Linux newbiesSetting up LAMP for Linux newbies
Setting up LAMP for Linux newbies
 
Open Source Backup Conference 2014: Rear, by Ralf Dannert
Open Source Backup Conference 2014: Rear, by Ralf DannertOpen Source Backup Conference 2014: Rear, by Ralf Dannert
Open Source Backup Conference 2014: Rear, by Ralf Dannert
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Asiabsdcon2013
Asiabsdcon2013Asiabsdcon2013
Asiabsdcon2013
 
Introduction to containers
Introduction to containersIntroduction to containers
Introduction to containers
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
vbsd2013
vbsd2013vbsd2013
vbsd2013
 
Basic orientation to Linux
Basic orientation to LinuxBasic orientation to Linux
Basic orientation to Linux
 
When ACLs Attack
When ACLs AttackWhen ACLs Attack
When ACLs Attack
 
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
 
Adhocr T-dose 2012
Adhocr T-dose 2012Adhocr T-dose 2012
Adhocr T-dose 2012
 

Mais de elliando dias

Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
elliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
elliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
elliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
elliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
elliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
elliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
elliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
elliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
elliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
elliando dias
 

Mais de elliando dias (20)

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

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

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!
  • 10.
  • 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