Code Monkey home page Code Monkey logo

autonfs's Introduction

AutoNFS

AutoNFS is a client-side autofs-free NFS Share Automount-Script, initially designed for Debian Squeeze or derivates.

The initial Github version of AutoNFS v1.2.1 - as is - running quite well and stable in our production environment containing of about 20 NFS Shares and one NFS 3 Server - all with latest Debian Squeeze

Installation and Usage

The locations of the files are given through the folders in this Repository, so for example the autonfs.sh should reside in /usr/local/bin folder in your NFS-Client but starting v1.3 it can differ if new location is correctly set in /etc/default/autonfs config file.

  1. Place a copy of the autonfs.sh (actual script) in the desired folder
  2. Place a copy of the autonfs (LSB init script) file in the desired folder
  • Make both executable with chmod +x /<path to the files>
  1. Place the /etc/default/autonfs file in the same path on your machine
  • Modify the file by setting the correct NFSSERVER and MOUNTS vars and optionally NFSVERS, MOUNTOPT and INTERVAL and set the correct location of the autonfs.sh script, if you have placed it differently from the default in step 1!
  1. Install the init script for bootup with update-rc.d autonfs defaults
  2. Start AutoNFS with service autonfs start ... the mounted folders will magically appear

AutoNFS will now completly take care of those mounts by checking the NFS Server regularily (INTERVAL) if its up or down. If its down, it will unmount the shares after 2 check-failures and will auto-remount them as soon as the server is back up. In that case it will also write it to the syslog.

You can also uncomment all lines starting with #logger to get a more verbose syslog output (not needed in production)

Variables explanation

  • SCRIPTPATH - The path to the AutoNFS executable (default: /usr/local/bin/autonfs.sh)
  • NFSSERVER - The NFS Server you want to mount something from can be either a single IP or a DNS-Name
  • NFSVERS - Defines the NFS Protocol (2,3 or 4) to be used for checking the Server and is needed to prevent writing "unknown version" warnings in the syslog
  • MOUNTOPT - Here you can define the classic NFS Mount options like you would in the fstab (uses good defaults for most scenarios)
  • INTERVAL - How often should AutoNFS check the Server? (60seconds is a good default but we use 15seconds for our HA Environment)
  • MOUNTS - This is a space-separated list of shares to mount for ex. MOUNTS=( "/share1" "/share2" ), whereas the share name and mountpath must be the same in this version. In a later version i will also support different shares and mount-paths

Roadmap

  • Support for different share-names and mount-paths
  • Make the init-script more flexible and portable (different autonfs.sh locations for ex. by using a /etc/default/autonfs file) Issue #2 and #3
  • ...(Ideas?)

Copyright and License

This little tool was made by Martin Seener (c) 2012, 2013 with the initial idea from JeroenHoek at http://ubuntuforums.org/showthread.php?t=1389291 or https://github.com/jdhoek

Released under the GNU GPLv2

autonfs's People

Contributors

martinseener avatar

Watchers

 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.