Skip to content
/ mgfs Public
forked from amsa/mgfs

A FUSE filesystem which uses MongoDB GridFS as a storage backend

License

Notifications You must be signed in to change notification settings

CpuID/mgfs

 
 

Repository files navigation

mgfs

mgfs is a FUSE filesystem which uses MongoDB GridFS as a storage backend.

Build Status Coverage Status

Installation

You need to have Golang installed. Open your terminal, and run go get github.com/amsa/mgfs. Now you should be able to run mgfs (be sure to add $GOPATH/bin to your $PATH).

How to use

First mount your MongoDb database: mgfs test /path/to/mount/dir. You may now go to the directory specified as the mount point, and see the collections (directories), and documents (json files). You may read, update, or delete the documents. You may also read and delete GridFs files under the specified prefix (fs by default).

Don't forget to unmount the database when you are done (umount /path/to/mount/dir).

Caveats

There is no caching layer implemented in-process or externally (eg. Redis or Memcached). As long as MongoDB is close to your FUSE process latency wise, you should have no issues. PRs are welcome to implement caching if there is interest :)

Working locally on the codebase

  • Make any code changes required
  • test.sh will put you in a shell in a container, with access to MongoDB (it runs docker-compose up -d within test.sh)
  • ./app -a $MONGODB_HOST -p 27017 -b databasename -m mountpoint/

Todo

  • Support GridFS read
  • Support GridFS remove
  • Support GridFS write
  • Show GridFS file names

Credits

About

A FUSE filesystem which uses MongoDB GridFS as a storage backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 77.9%
  • Shell 22.1%