Fuse-user space File System

Source: Internet
Author: User
Tags glusterfs

Filesystem in userspace (fuse) is a file system fully implemented in user mode. CurrentlySupport this through the kernel module. Some file systems such as ZFS, glusterfs, and moosefs use Fuse.

The Linux kernel module used to support the user space file system is fuse. The term fuse is sometimes used to specify the user space File System in Linux. A file system is an important part of a general operating system. Traditionally, the operating system supports the file system at the kernel level. Generally, the kernel-state code is difficult to debug and has low productivity.

 

Linux versions 2.6.14 and later support file system implementation in user space through the fuse module. Implementing a file system in a user space can greatly increase productivity and simplify the workload of providing a new file system for the operating system.Applicable to various virtual file systems and network file systems. Zfs and glusterfs both belong to network file systems. However, implementing file systems in user mode will inevitably introduce additional overhead of kernel mode/user mode switching, which will have a certain impact on performance.

 

With fuse, you can develop a fully functional file system with a simple api library that can be accessed by non-privileged users and implemented securely. More importantly, Fuse's past performance fully proves its stability. With fuse, you can develop file systems like executable binary files. They need to be linked to the fuse library-in other words, this file system framework does not require you to understand the inside story of the file system and kernel module programming knowledge. Http://fuse.sourceforge.net/

 

Browsed SourceForge and learned that fuse supports kernel2.4.x and 2.6.x. Then, we directly downloaded latest stable release 2.8.2,

tar -xzvf fuse-2.8.5.tar.gzcd fuse-2.8.5/./configure;makemake installecho 'exportPKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' >>/etc/profilesource /etc/profile
modprobe fuse

 

Possible problems:

Then run Hello in example, and the device not found error is displayed. Use modprobe fuse to view the error. Cannot locate fuse module. sure enough, although fuse supports 2.4.x, there is no fuse kernel module in the kernel of this version. Check the Wiki. The fuse is available only after kernel 2.6.14.

There are two solutions:

  1. One is to compile fuse into the current kernel module,
  2. Another method is to configure the fuse source code in the corresponding directory recompile kernel.

Obviously, the former is more convenient. However, since the latest stable version is downloaded, the configure option does not have the -- enable-kernel-module parameter. Second, the earlier version, 2.4.2, check whether the -- enable-kernel-module exists. After installation, modprobe fuse no longer reports an error ,. /Hello pathname-D to run the simplest program. The file system only has a single file "hello", which only contains "Hello World" in one sentence, and then mounts it to the pathname. After running the file, cat or ls can be viewed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.