Changes

Jump to: navigation, search

FUSE

740 bytes added, 16:28, 10 March 2022
Container tuning
This page describes how to setup FUSE (filesystem in userspace) inside a VEcontainer.
[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.
== Setup ==
=== Kernel ===
* 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 ===
==== 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])
* FIXME===== 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 VE container without kernel module
<pre>
# vzctl enter 100
</pre>
=== VE Container tuning ===You need to make a character device named <code>/dev/fuse</code> and grant your VE container permissions to it
<pre>
# vzctl set 100 --devices c:10:229:rw --save
...
</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 ===
After this you may try to mount FUSE in a VEcontainer.
<pre>
# vzctl enter 100
# sshfs <nowiki>root@foo.org</nowiki>:/root /mnt/foo.org.root
</pre>
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 moutpointmountpoint
</pre>
== Using fusectl filesystem ==
Fusectl is a helper filesystem for FUSE. You may mount it in a VE container as well.
<pre>
# vzctl enter 100
Anonymous user

Navigation menu