Lighting the FUSE
Explore unusual filesystems support in Linux.
The Linux kernel supports a wide variety of filesystems. Some, such as ext2fs, ext3fs, and ReiserFS, are Linux-native filesystems — designed explicitly for Linux and commonly used to hold the Linux root (/), /home, /usr, and other directories. Other Linux filesystems are designed to support removable media or partitions belonging to other operating systems (for, say, a dual-boot system). Examples of other filesystems include ISO-9660, VFAT, and HPFS. Still other filesystems are network-enabled, allowing you to mount a remote computers’ filesystem (almost) as if it were local. Examples include the Network File System (NFS) and the Server Message Block/Common Internet File System (SMB/CIFS).
Despite this wide range of filesystem support in Linux, some users want more. Perhaps you want to access an FTP site as if it were a local filesystem. Maybe you’d like to access your mobile phone using ordinary Linux programs and file-manipulation commands. Or perhaps you’d like to cram more files on a disk without having to explicitly pipe everything through gzip or bzip2.
All of these latter tasks and many more can be accomplished via the Linux kernel’s Filesystem USErspace (FUSE) module and its support tools. FUSE enables Linux to use filesystems that are implemented as userspace code, which simplifies the creation of filesystems. The result is an explosion of special-purpose filesystems. The FUSE Web site at http://fuse.sourceforge.net includes a Projects link that summarizes the implementations that use FUSE, and I describe a few examples shortly.
Preparing to Use FUSE
FUSE relies on kernel support to work. In theory, this means you must compile FUSE support into your kernel, or at least as a kernel module. You can do this from the “File Systems” section of the 2.6.14 and later Linux kernel configuration area, as shown in Figure One.