p2p-fs Installation Guide

P2P-FS Logo

To install p2p-fs, you will need:

  1. The p2p-fs sources, which I presume you already have.
  2. The scons build too available at http://www.scons.org/download.php
  3. 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:

  1. Download and install the above mentioned packages.
  2. Go to the p2p-fs root directory, and type 'scons'. This should build everything.

Running p2p-fs:

  1. 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.
  2. 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.
  3. You may now use this directory like any other directory.

Problems you may run into:

  1. fusermount: fuse device not found, try 'modprobe fuse' first
    As the message says(as root), type 'modprobe fuse'.

  2. 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

  3. 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