Fuse-convmvfs 0.2.6 introduction and usage

Source: Internet
Author: User
1. Summary

Fuse-convmvfs is a user-mode File System Based on fuse (filesystem in userspace ).
Map the file name encoding of one branch in the file system tree to another encoding and load it in
Under another load point.

2. Motivation

Convmv (http://osx.freshmeat.net/projects/convmv/) is an existing one for conversion
A file name encoding tool. Inspired by this software, convmvfs was developed for conversion
File System of file name encoding.

A practical example: In China, a national standard gb2312 is widely used in computer systems.
This habit has led many FTP clients of Chinese software to only recognize gb2312 encoding on the remote server.
The file name of the Code. However, * nix systems currently used to set up FTP servers are increasingly inclined to use UTF-8 encoding.
To store the file name. To solve this problem, the software can achieve the following effect:
An FTP server sets the/FTP/directory as the FTP root directory logged on by anonymous users, and
The component name is UTF-8 encoded, in order to make windows can only recognize the gb2312 encoding client can be normal
To access FTP, you can use the convmvfs software to map/FTP/pub_gbk to the/FTP/pub directory.
The/FTP/pub_gbk directory will get the gb2312 encoded file name, but the file content will remain unchanged.

3. Installation

This software requires that your system be installed with fuse 2.5 or a later version. You can get the following information from FUSE:

Http://fuse.sourceforge.net

After fuse is successfully installed and configured, run the following command in the convmvfs directory:

./Configure
Make
Make install (as root)

The installation is complete. You can run convmvfs -- help to get help information.

If you get the latest software from CVS, You need to first execute 'autoreconf-IV '.

Note: A bug occurs in./configure. The general process is as follows:

......

Checking for PKG-config.../usr/bin/PKG-config
Checking PKG-config is at least version 0.9.0... yes
Checking for convmvfs... configure: Error: Package requirements (FUSE >=2.5) were not met:

No package 'fuse' found

Consider adjusting the pkg_config_path environment variable if you
Installed Software in a non-standard prefix.

......

Looking for related solutions on the internet, failed. Only follow the prompts and the given log to solve the problem. After query, fuse will generate a fuse during installation. the file in the PC records the fuse version, path, and other related information. Fuse-convmvfs needs to view the fuse version based on the file. If the file cannot be found, the above error report will appear. Therefore, when installing fuse-convmvfs, an environment variable is required to specify the path of the file. This file will be installed in the/usr/local/lib/pkgconfig/directory when fuse is installed by default. Therefore, you need to provide the environment variable: export before executing./configure.
Pkg_config_path =/usr/local/lib/pkgconfig, and then execute./configure.

4. How to Use

Once convmvfs is installed, it is quite simple to run:
Usage: convmvfs mountpoint [Options]

General options:
-O opt, [opt...] Mount options
-H -- help print help
-V -- version print version

Fuse options:
-D-O debug enable debug output (implies-f)
-F foreground operation
-S disable multi-threaded operation

-O allow_other allow access to other users
-O allow_root allow access to root
-O nonempty allow mounts over non-empty file/Dir
-O default_permissions enable permission checking by Kernel
-O fsname = Name set filesystem name
-O large_read issue large read requests (2.4 only)
-O max_read = N set maximum size of read requests

-O hard_remove immediate removal (don't hide files)
-O use_ino let filesystem set inode numbers
-O readdir_ino try to fill in d_ino in readdir
-O direct_io use direct I/O
-O kernel_cache cache files in Kernel
-O umask = m set file permissions (octal)
-O uid = N set file owner
-O gid = N set file group
-O entry_timeout = T cache timeout for names (1.0 s)
-O negative_timeout = T cache timeout for Deleted names (0.0 S)
-O attr_timeout = T cache timeout for attributes (1.0 s)

Convmvfs options:
-O srcdir = path which directory to convert
-O icharset = charset used in srcdir
-O ocharset = charset used in mounted filesystem

Note:
* If you use a common user to run the software, you must first determine whether you have read and write permissions in the/dev/fuse file.
.

* Use 'iconv -- list' to view the codes supported by the software.

* The allow_other option allows other users to access the file system.

* Important: the srcdir and file system mount points cannot be in the same folder. Otherwise, file operations will fall
An endless loop. This situation must be avoided.

Running instance:
* Mount a File System
$ Convmvfs/FTP/pub_gbk-O srcdir =/FTP/pub, icharset = utf8, ocharset = GBK

* Detach a File System

$ Fusermount-U/FTP/pub_gbk

Note: libfuse may not be found during use. so error, that is because libfuse is not set. so, you need to manually add this environment variable:
Add the last row in $ home/. bashrc

Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib
Export LIBRARY_PATH = $ LIBRARY_PATH:/usr/local/lib

Then, execute .~ /. Bashrc.


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.