GithubHelp home page GithubHelp logo

nfusr's Introduction

nfusr

nfusr is a userspace FUSE client for accessing NFSv3 servers based on libnfs.

Usage

NFS filesystems can be directly mounted with nfusr:

nfusr nfs://nfsserver.example.com/volume /mntpoint

(see libnfs documentation for the format of the nfs:// URI).

Alternatively one can mount using typical mount syntax (using the helper script installed in /sbin/mount.nfusr):

mount -t nfusr nfs://nfsserver.example.com/volume /mntpoint

which enables use of automount, etc.

In either case, FUSE mount options can be specified by adding a '-o' option, e.g.:

mount -t nfusr nfs://nfsserver.example.com/volume /mntpoint -o allow_other,max_read=128K

(see FUSE documentation for available FUSE mount options).

Note that NFSv4 is not supported in any way.

Building

To build from source:

./bootstrap
./configure
make
sudo make install

Debugging and output

By default nfusr deamonizes itself and messages are written to syslog. Alternatively output can be directed to a file using the --log-file option, e.g.

nfusr --log-file=/tmp/nfusr.log nfs://server/vol /mntpoint

In all instances the '--log-level' option controls the verbosity of the output using the levels defined in setlogmask(3) (i.e. --log-level=7 yields maximum verbosity).

The '-f' option forces nfusr to run in the foregound. In this case output is written to stdout.

The '-d' option enables libfuse debugging and implies -f.

Multi-server support

A novel feature of nfusr is support for multiple servers hosting the same volume, with round-robin load balancing and failover.

To mount a volume using multiple servers, specify multiple NFS URLs on the command line, and optionally specify the max_conn mount option. For example:

mount -t nfusr nfs://server1/vol,nfs://server2/vol /mntpoint

or:

nfusr nfs://server1/vol nfs://server2/vol nfs://server3/vol /mntpoint -o max_conn=2

When multiple servers are specified, nfusr will attempt to establish connections to max_conn servers (default 1) and round-robin requests amongst those connections.

If connection to a server is lost during a request, nfusr will attempt to connect to the next server and resend the request, thus failing over.

This feature comes with several caveats: first and foremost, the specified servers must be serving exactly the same volume, identical down to the structure of the NFS file handle (which is usually opaque). The only system against which this is known to reliably work at this time is Red Hat's Gluster distributed filesystem.

Other important caveats:

  • fsync etc. should be considered broken in round-robin mode (currently the commit is sent to only one server, meaning writes sent to any others are not necessarily flushed despite a successful return).

  • failover of non-idempotent requests can yield spurious errors. For example, if an unlink request is sent to a server and succeeds, but the connection is lost before the response is received by nfusr, the request will be replayed to another server. Since the file has actually been unlinked, the replayed request will now fail with ENOENT.

In short, multiple server mode is recommended only if you really, really know what you're doing.

License

nfusr is BSD-licensed. We also provide an additional patent grant.

nfusr's People

Contributors

kevin-vigor avatar facebook-github-bot avatar huitseeker avatar shreyassiravara avatar

Stargazers

Valentin Hăloiu avatar Serapheim Dimitropoulos avatar Andrew Gaul avatar Yuhao avatar  avatar  avatar Jiri Daněk avatar Xiang avatar Jesse avatar Albert Guo avatar  avatar  avatar  avatar Mert Akengin avatar  avatar Georgiy Odisharia avatar zhouruixi avatar Hidetatz Yaginuma avatar Li Ching-Chang avatar Mikhail Bautin avatar  avatar Chen Yuanrun avatar  avatar Chris Concannon avatar Oleksandr Danshyn avatar Marcin Bugaj avatar David Bremner avatar Konpat avatar Taishi avatar Chen Chenglong avatar Archit Sharma avatar  avatar Zeyuan Hu avatar Scott Ivey avatar Pavel Patrin avatar  avatar  avatar Barnabás Czémán avatar Sean Kocol avatar deger avatar Scott Cheng avatar Yan Li avatar Daniel Dunbar avatar Pedro Lara Campos avatar Alex Dobrescu avatar Ben Usman avatar Keitaroh Kobayashi avatar Matthew Cooper avatar Chris Orlando avatar  avatar Antoni Buszta avatar Alex Gartner avatar Denis Denisov avatar Gautam Singh avatar Ike Devolder avatar Daniel Kopeček avatar Michael Wagner avatar Alexander F. Rødseth avatar Michael Stapelberg avatar Gabriel Garza avatar  avatar  avatar  avatar Bob Killen avatar Frederik Carlier avatar Chris Olstrom avatar  avatar Prashanth Pai avatar Jihyeon Gim avatar Dante Haskell Elrik avatar  avatar  avatar Johan Källström avatar Anthony Lichnewsky avatar Petar Forai avatar Ido Rosen avatar Honggui avatar  avatar Andrey avatar Matt Hazinski avatar dr808 avatar Allen Ye avatar  avatar Kudo Chien avatar Matt Keranen avatar Steven MARTINS avatar Yann Collet avatar Hidayet Doğan avatar Jonathan Rose Dunlap avatar Joel Squire avatar Rick Wong avatar

Watchers

herver avatar  avatar  avatar James Cloos avatar Eric Vicenti avatar liuweiguang avatar skyformat99 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.