logo
Published on Debian/Ubuntu Tips & Tricks (http://www.debuntu.org)

Mounting a fuse Filesystem from /etc/fstab

By chantra
Created 2006-04-27 17:52

Earlier on, I showed how-to mount a remote filesystem with fuse, using a remote partition accessible by SSH. Since version version 2.4.0, it is possible to use fstab to mount those kind of partition.

The current version installed on ubuntu dapper is fuse-utils-2.4.2. Unfortunately, /sbin/mount.fuse is not included in the package. I've recompiled it, submitted to revu, hopefully it is going to make its way up to the main repository. In the meanwhile you can get it from here.

FUSE comes in 4 packages:

EDIT: A newer fuse .deb version is available from Debuntu .deb repository [6] , installing fuse package from the repository will include new features.

Ok, let's go to it. The packages we are going to need are fuse-utils and sshfs. Download fuse-utils_2.4.2-0ubuntu3_i386.deb [7] and install it:

:~$sudo dpkg -i /path/to/fuse-utils_2.4.2-0ubuntu3_i386.deb

Install sshfs as well:

:~$sudo apt-get install sshfs

Now, taking the exemple used in How to: Mount a remote filesystem using SSH, SSHFS and FUSE [8], we are going to modify /etc/fstab :

sshfs#my-remote-user@my-remote-host:/home/my-remote-user /my-local-filesystem/remotefs fuse defaults 0 0

EDIT: Since Fuse 2.5.3, new parameters such as user and noauto can be used in fstab, so changing the previous line to:

sshfs#my-remote-user@my-remote-host:/home/my-remote-user /my-local-filesystem/remotefs fuse user,noauto 0 0

will not mount the filesystem automatically during boot (noauto) and will let a non-privileged user (but belonging to fuse group) to mount the filesystem from the command line.
And that's it, you can now mount your file system, just like other filesystem in /etc/fstab, here:

:~$sudo mount /my-local-filesystem/remotefs
my-remote-user@my-remote-host's password:

:) .


Source URL:
http://www.debuntu.org/2006/04/27/39-mounting-a-fuse-filesystem-form-etcfstab