diff options
Diffstat (limited to 'content/posts/enable-xattr-for-dumb-filesystems.rst')
-rw-r--r-- | content/posts/enable-xattr-for-dumb-filesystems.rst | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/content/posts/enable-xattr-for-dumb-filesystems.rst b/content/posts/enable-xattr-for-dumb-filesystems.rst new file mode 100644 index 0000000..1da9be3 --- /dev/null +++ b/content/posts/enable-xattr-for-dumb-filesystems.rst @@ -0,0 +1,51 @@ +Enable xattr for dumb filesystems +################################# + +:date: 2012-05-04 15:17 +:tags: xattr,filesystems,davfs + +I was looking for a way to enable extended attributes for encfs(userland +crypto Wrapper) on davfs(userland Webdav fs wrapper) to use them with +glusterfs to create a high-availability distributed secure cloud storage +on the cheap. + +After many hours looking for a way to enable xattrs on encfs or ecryptfs +and davfs or wdfs i found pyfilesystems to write and mount an xattr +wrapper for the retard fs. + + +install pyfilesystem and encfs davfs +==================================== + +.. code-block:: bash + + pip install fs + apt-get install davfs2 encfs + +mount davfs and encfs +===================== + +.. code-block:: bash + + #?/bin/sh + echo "https://path/to/webdav username password" >> /etc/davfs2/secrets + mkdir /mnt/{1,2,3} + mkdir /mnt/1/.encfs + mount.davfs https://path/to/webdav /mnt/1 + encfs /mnt/1/.encfs /mnt/2 + + +mount wrapper fs +================ + +.. code-block:: python + + #?/usr/bin/python + from fs.osfs import OSFS + from fs.xattrs import SimulateXAttr + stupid_fs = OSFS("/mnt/2") + xattr_fs = SimulateXAttr(stupid_fs) + fuse.mount(xattr_fs,"/mnt/3") + + +Now /mnt/3 can be used as a brick in glusterfs. Or just use tahoe-lafs ;P |