Quick write up of using pyFilesystem with Tahoe-LAFS

[Imported from Trac: page pyFilesystem, version 1]
ClashTheBunny 2011-10-25 06:08:07 +00:00
parent 2a258bb7d2
commit 0ed35aa564

59
pyFilesystem.md Normal file

@ -0,0 +1,59 @@
Tahoe-LAFS works with pyFilesystem. It is not officially maintained by Tahoe-LAFS devs, but it works.
Here is the email that this is based off of:
<http://tahoe-lafs.org/pipermail/tahoe-dev/2011-August/006663.html>
1. Get and install Dokan lib at <http://dokan-dev.net/en/download/#dokan>
2. Get pyfilesystem at <http://code.google.com/p/pyfilesystem/downloads/list> or do a `pip install fs` and skip to step 4.
3. Install pyfilesystem:
```
cmd> python setup.py build
cmd> python setup.py install
```
4. Verify that pyfilesystem is installed:
```
cmd> python
python>>> import fs
python>>> fs.__version__
```
5. Mount test/public grid to F:\ letter
```
cmd> python
python>>> from fs.contrib.tahoelafs import TahoeLAFS
python>>> from fs.expose import dokan
python>>> fs = TahoeLAFS('URI:DIR2:ctmtx2awdo4xt77x5xxaz6nyxm:n5t546ddvd6xlv4v6se6sjympbdbvo7orwizuzl42urm73sxazqa')
python>>> mp = dokan.mount(fs, "f", foreground=True)
```
This works fine. I have a slightly different setup since this also works with FUSE.
On Windows, follow the above steps up to and including step 4.
On Linux, do a `pip install fs` and make sure fuse is installed.
Then you can edit this script:
```/usr/bin/env python
URI='URI:DIR2:ctmtx2awdo4xt77x5xxaz6nyxm:n5t546ddvd6xlv4v6se6sjympbdbvo7orwizuzl42urm73sxazqa'
import time
from fs.contrib.tahoelafs import TahoeLAFS
try:
from fs.expose import dokan
fs = TahoeLAFS(URI)
mp = dokan.mount(fs, "f")
except:
from fs.expose import fuse
fs = TahoeLAFS(URI)
mp = fuse.mount(fs, "/mnt/tahoe")
```
Replace URI with your URI on your grid. The above URI is the test writable URI in the [TestGrid](TestGrid). Replace the "f" in
`mp = dokan.mount(fs, "f")` with the Windows drive letter you want to use or replace the "/mnt/tahoe" in `mp = fuse.mount(fs, "/mnt/tahoe")` with the fuse mount point on, I think, all other systems.
Run the script and it will mount the URI at the specified location. If you want to unmount it, find out where dokanctl.exe is and run it from the command line `dokanctl.exe /u f:`. Sometimes I have to force the unmount on Windows. Use `fusermount -u /mnt/tahoe` on the FUSE systems.