Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

FUSE

1,970 bytes added, 13:21, 17 November 2006
no edit summary
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.

== Preparations ==
To use FUSE you need the following:
# OpenVZ kernel version [http://git.openvz.org/?p=linux-2.6.18-openvz;a=commit;h=045f4a5fcb8c2625fe7505a8d9d4ebffd7e0d905 028test005] or higher
# [http://mesh.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.0.tar.gz Fuse lib]
# Any FUSE-based [http://fuse.sourceforge.net/wiki/index.php/FileSystems filesystem]

In the examples below [http://fuse.sourceforge.net/sshfs.html sshfs] is used.

== Setup ==
=== Kernel ===
Download appropriate kernel from [http://download.openvz.org openvz.org] or compile kernel with <code>CONFIG_FUSE_FS</code> option set

=== Libfuse ===
Compile libfuse in VPS witout kernel module
<pre>
# vzctl enter 100
# tar xzf fuse-2.6.0.tar.gz
# cd fuse-2.6.0
# ./configure --disable-kernel-module
...
# make
...
# make install
</pre>

=== Filesystem ===
Download and compile filesystem.
<pre>
# vzctl enter 100
# tar xzf sshfs-fuse-1.7.tar.gz
# cd sshfs-fuse-1.7
# ./configure
...
# make
...
# make install
</pre>

=== VPS tuning ===
You need to make a characted device named <code>/dev/fuse</code> and grant your VPS permissions to it
<pre>
# vzctl set 100 --devices c:10:229:rw --save
...
# vzctl exec 100 mknod /dev/fuse c 10 229
...
</pre>

=== Mounting filesystem ===
After this you may try to mount FUSE in VPS
<pre>
# vzctl enter 100
# sshfs root@foo.org:/root /mnt/foo.org.root
</pre>

== Using fusectl filesystem ==
Fusectl is a helper filesystem for FUSE. You may mount it in VPS as well
<pre>
# vzctl enter 100
# mount -t fusectl none /fuse_ctl
</pre>

[[category:HOWTO]]