p2p-fs Installation Guide
To install p2p-fs, you will need:
-
The p2p-fs sources, which I presume you already have.
- The scons build too available at http://www.scons.org/download.php
- Fuse(tested with v2.6.3, but should work with other versions
too). This can be downloaded at http://sourceforge.net/project/showfiles.php?group_id=121684&package_id=132802
Installation instructions:
-
Download and install the above mentioned packages.
- Go to the p2p-fs root directory, and type 'scons'. This should
build everything.
Running p2p-fs:
- You will need to create a config file(/etc/p2pfs.conf). The sample
file is included in the distribution. You may copy this file, and
make the appropriate changes to it.
- From the p2p-fs root directory, type:
'./src/p2pfs '
where stands for the directory where you wish to
mount the exports. You can use /mnt/p2pfs, or any other directory
you wish.
-
You may now use this directory like any other directory.
Problems you may run into:
- fusermount: fuse device not found, try 'modprobe fuse' first
As the message says(as root), type 'modprobe fuse'.
- scons fails with the following error message:
Package fuse was not found in the pkg-config search path.
Perhaps you should add the directory containing `fuse.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fuse' found
Type the following set of commands:
cd /usr
echo "export PKG_CONFIG_PATH=\$PKG_CONFIG_PATH:/usr/""`find -name "fuse.pc" \
| head -n 1 | xargs dirname`" >> ~/.bash_profile
. ~/.bash_profile
- The mount fails with the following error:
./src/p2pfs: error while loading shared libraries: libfuse.so.2:
cannot open shared object file: No such file or directory
Type the following set of commands:
cd /usr
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/""`find -name "libfuse.so.2" \
| head -n 1 | xargs dirname`" >> ~/.bash_profile
. ~/.bash_profile
And try to re-run the mount command './src/p2pfs '
How to umount the file system?
If you want to unmount as a normal user, you can use the 'fusermount'
utility, and unmount using the following command:
fusermount -u
Or, if you are root(or have an entry in fstab with 'user'), then you
can use the 'umount' command to unmount the file system.
Adding an entry to /etc/fstab:
First, you need to copy the executable './src/p2pfs' to '/bin' or any
other directory in the system which is included in the PATH variable.
You can then add the following line to /etc/fstab so that you can
mount using the normal mount command, and normal users can
mount/unmount the file system.
p2pfs /mnt/p2pfs fuse defaults,user 0 0