Editing FUSE

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
This page describes how to setup FUSE (filesystem in userspace) inside a container.
+
This page describes how to setup fuse inside VPS
  
 +
== Introduction ==
 
[http://git.openvz.org/?p=linux-2.6.18-openvz;a=blob;h=a584f05403a412e778cf359e84d3690d5a22d1e4;hb=045f4a5fcb8c2625fe7505a8d9d4ebffd7e0d905;f=Documentation/filesystems/fuse.txt FUSE] is a filesystem in which data and metadata are provided by an ordinary userspace process. The filesystem can be accessed normally through the kernel interface.
 
[http://git.openvz.org/?p=linux-2.6.18-openvz;a=blob;h=a584f05403a412e778cf359e84d3690d5a22d1e4;hb=045f4a5fcb8c2625fe7505a8d9d4ebffd7e0d905;f=Documentation/filesystems/fuse.txt FUSE] is a filesystem in which data and metadata are provided by an ordinary userspace process. The filesystem can be accessed normally through the kernel interface.
  
Line 13: Line 14:
 
== Setup ==
 
== Setup ==
 
=== Kernel ===
 
=== Kernel ===
* Download appropriate kernel from [http://download.openvz.org/ openvz.org] or compile kernel with <code>CONFIG_FUSE_FS</code> option set
+
Download appropriate kernel from [http://download.openvz.org openvz.org] or compile kernel with <code>CONFIG_FUSE_FS</code> option set
* Debian/Ubuntu: You can alternatively add the line <code>fuse</code> into /etc/modules, and apply immediately with the command: <pre>modprobe --first-time fuse</pre>
 
  
=== Userspace ===
+
=== Libfuse ===
 
+
Compile libfuse in VPS witout kernel module
You have to fuse libraries and some fuse filesystem modules (here we use sshfs as an example).
 
 
 
The best way to have it installed is to use the packages from your distro vendor. An alternative is compiling the stuff from source.
 
 
 
==== Gentoo ====
 
 
 
# emerge sys-fs/sshfs-fuse
 
 
 
==== Fedora ====
 
 
 
# yum install fuse-sshfs
 
 
 
==== Debian/Ubuntu ====
 
===== Debian 5.0 (lenny) =====
 
FUSE cannot be installed due to udev/hotplug dependency (explained in [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503953 bug report 503953])
 
 
 
===== Ubuntu, Debian 6.0 (squeeze), Debian 4.0 (etch) and older =====
 
# apt-get install sshfs
 
 
 
(Debian 4.0 note: see [[Installing udev in VE based on Debian-4.0]])
 
 
 
==== Compiling from source ====
 
If there are no packages provided for you distribution, you have to compile from source.
 
 
 
First, compile libfuse in a container without kernel module
 
 
<pre>
 
<pre>
 
# vzctl enter 100
 
# vzctl enter 100
Line 54: Line 29:
 
</pre>
 
</pre>
  
{{note|Sometimes <code>libfuse.so.X</code> is unseen by your programs. Usually this file is installed in <code>/usr/local/lib</code> directory so don't forget to add this directory into your <code>/etc/ld.so.conf</code> and then run <code>ldconfig</code>.}}
+
=== Filesystem ===
 
+
Download and compile filesystem.
Next, download and compile filesystem.
 
 
<pre>
 
<pre>
 
# vzctl enter 100
 
# vzctl enter 100
Line 68: Line 42:
 
</pre>
 
</pre>
  
=== Container tuning ===
+
=== VPS tuning ===
You need to make a character device named <code>/dev/fuse</code> and grant your container permissions to it
+
You need to make a characted device named <code>/dev/fuse</code> and grant your VPS permissions to it
 
<pre>
 
<pre>
 
# vzctl set 100 --devices c:10:229:rw --save
 
# vzctl set 100 --devices c:10:229:rw --save
Line 76: Line 50:
 
...
 
...
 
</pre>
 
</pre>
 
Or more simply:
 
<pre>
 
# vzctl set 103 --devnodes fuse:rw --save
 
...
 
</pre>
 
 
Note that restart (or moving to root container device cgroup before mounting) might be required.
 
  
 
=== Mounting filesystem ===
 
=== Mounting filesystem ===
After this you may try to mount FUSE in a container.
+
After this you may try to mount FUSE in VPS
 
<pre>
 
<pre>
 
# vzctl enter 100
 
# vzctl enter 100
# sshfs <nowiki>root@foo.org</nowiki>:/root /mnt/foo.org.root
+
# sshfs root@foo.org:/root /mnt/foo.org.root
</pre>
 
 
 
==== Unmounting filesystem ====
 
In case of <code>sshfs</code> after umounting an appropriate daemon must be killed. This may be done by the following command:
 
<pre>
 
# fusermount -u mountpoint
 
 
</pre>
 
</pre>
  
 
== Using fusectl filesystem ==
 
== Using fusectl filesystem ==
Fusectl is a helper filesystem for FUSE. You may mount it in a container as well.
+
Fusectl is a helper filesystem for FUSE. You may mount it in VPS as well
 
<pre>
 
<pre>
 
# vzctl enter 100
 
# vzctl enter 100
Line 105: Line 65:
 
</pre>
 
</pre>
  
== External links ==
+
[[category:HOWTO]]
 
 
* [http://fuse.sourceforge.net/ FUSE site]
 
 
 
[[Category:HOWTO]]
 

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page:

Retrieved from "https://wiki.openvz.org/FUSE"