From 0ed35aa564c788df05842c3b33992d1a817fab9a Mon Sep 17 00:00:00 2001 From: ClashTheBunny <> Date: Tue, 25 Oct 2011 06:08:07 +0000 Subject: [PATCH] Quick write up of using pyFilesystem with Tahoe-LAFS [Imported from Trac: page pyFilesystem, version 1] --- pyFilesystem.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pyFilesystem.md diff --git a/pyFilesystem.md b/pyFilesystem.md new file mode 100644 index 0000000..170e666 --- /dev/null +++ b/pyFilesystem.md @@ -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: + + +1. Get and install Dokan lib at + +2. Get pyfilesystem at 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. \ No newline at end of file