GMail Filesystem over FUSE
There is a Debian package which allows you to use GMail storage as a
filesystem written by a nice guy named Richard Jones. He has a
nice web site dedicated to it.
But, this implementation uses is based on something called libgmail
which accesses GMail via its web interface. Unfortunately, that web
interface changes constantly and libgmail not been able to keep up
with the flux and is not working any more.
So, I went and stole Richard's code and improved it. Instead of using
libgmail, I just used python's imaplib. GMail's IMAP interface should
be pretty darn stable and not likely to break.
- Mount gmail as a filesystem
- Full UNIX uids, permissions, symlinks, hard links, and more...
- Extended attributes (xattrs). This allows use of ecryptfs
- Can store multiple filesystems inside the same GMail account
- Stores files as attachments to email messages. These are broken up into "blocks" because of IMAP limits on message sizes, so it won't be one attachment per file. But, this also means that if you make a small write to the middle of a very large file, you only have to rewrite a single block.
- Uses IMAP quota commands to determine free space available
- Automatic re-login if the connection dies (should work, but needs more testing)
- Fix up some of the python abominations (I suck at python)
- Lots of performance improvements. (still plenty of these to do)
- Can we get it to use the Linux page/dcache more effectively?
- Store small file contents inside the inode instead of a separate mail message
- Threaded operation? (now uses three threads and some locking, could do more on the non-writeout code)
- IMAP keepalive commands to keep the TCP session alive
- Verify that it works on IMAP servers other than GMail
- Make sure that truncate actually frees blocks not being used
- Remove dependence on config file (in case you want multiple mounts around)
- Try out cachefs over it to speed things up (only works with NFS as far as I know)
python gmailfs.py -o allow_root none mnt/
As always, patches, suggestions and bug reports are very welcome. I'll post updates here.
You can also report bugs, issues
and feature requests
The latest version will always be in my