SHFS On Fedora Core 2
Saturday, 26 July 2008
Intro
My additions are in the installation section. I was installing SHFS on Fedora Core 2 so I thought it might serve someone to have a little explanation of how to get it running quickly. The default installation instructions aren’t perfect if you’re installing on FC2.
If you want more information go to the shfs homepage.
About shfs
Shfs is a simple and easy to use Linux kernel module which allows you to mount
remote filesystems using a plain shell (ssh) connection. When using shfs, you can access
all remote files just like the local ones, only the access is governed through the transport security
of ssh. Shfs supports some nice features:
- file cache for access speedup
- perl and shell code for the remote (server) side
- could preserve uid/gid (root connection)
- number of remote host platforms (Linux, Solaris, Cygwin, …)
- Linux kernel 2.4.10+ and 2.6
- arbitrary command used for connection (instead of ssh)
- persistent connection (reconnect after ssh dies)
The code was originally developed as an assignment for an Operating Systems course at the
Charles University, Prague.
Installation
Installation should be straightforward. First, download sources (shfs-x.xx.tgz).
- unpack the tarball
# tar -xzvf shfs-x.xx.tgz
- Check the top-level Makefile for KERNEL_SOURCES variable. It should
contain path to your kernel directory (where include/linux resides). - Important (kernel 2.4): check that your compiler is the same as used for compiling your kernel:
# gcc --version 2.96 # cat /proc/version Linux version 2.4.18 (root@host) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98))
If these versions differ, check for your configuration, how to call the kernel compiler
(e.g. gcc-3.2). You will have to pass this to make (make CC=gcc-3.2). - make kernel module and shfsmount
# make
or (if you must specify the compiler):
# make CC=compiler
- This is where things get different.
Install (as root)
# make install
- Insert the Kernel Module (as root)
# /sbin/depmod # /sbin/modprobe shfs
- Mount something! (as root. If you want to mount as a user see the FAQ)
# mount -t shfs user@hostname /mnt
Note that you will mount the default dir unless you specify otherwise (i.e. user@hostname:/tmp for /tmp to be the mountpoint on the remote box)
If you have any problems or information to add please let me know.