mogilefs & fuse

Brad Fitzpatrick brad at
Mon May 14 17:27:45 UTC 2007


On Mon, 14 May 2007, Leon Brocard wrote:

> There's been some talk of MogileFS and FUSE recently, which allows you
> to mount MogileFS under Linux (and other OSes) as a network share.
> I've attached a Perl script which makes this work. If someone wants to
> take this and run with it and add it to svn it'd be peachy.

Wonderful, thanks!

Send me privately an htdigest line for realm "Danga", and I'll get you svn
commit access right away.  Let's definitely get this in the tree and
hacked on more.

> Your MogileFS filenames should be of the format "/foo/bar/quux.gif"
> for this to work sensibly.

Have you seen the FilePaths plugins?

Basically it allows the mogilefsd tracker to support the idea of
directories natively.  Then you can even do operations like
renaming/moving directories 0(1), without renaming 'n' keys which would in
the naive case all be prefixed with /path/to/the/directory/

But I see your client is read-only.

> I particularly proud of doing the range requests.

Should you verify the server replied with a Range request, and blow up
loud (return EIO), if the server didn't return a Range response?

> It's annoying that the tracker can't give you file sizes though.

That's a one-line change that I keep forgetting (if I were to add it to
get_paths).  But should I add a new "stat_key" method instead, which would
also be a good place to include an mtime in the response?

> The one big hack is to figure out directory paths - somewhat
> inefficiently it needs to go through every path to see what
> directories to show at the root mount point. It gets more efficient
> lower down though.

Yeah, see filepaths plugin above.

> Performance wise: it's not too bad, it's not too good. Don't throw
> away Samba yet.
> Many thanks to Foxtons Ltd. for letting me hack on this at work.

Thanks indeed!

- Brad

More information about the mogilefs mailing list