element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
NexGen Flight Simuator Howto: NFS (Network File System)
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 30 Apr 2015 12:30 AM Date Created
  • Views 2849 views
  • Likes 1 like
  • Comments 15 comments
  • rpc
  • software_design
  • file_sharing
  • protocols
  • nfs
  • feature_tutorial
  • cifs
  • linux
Related
Recommended

Howto: NFS (Network File System)

phoenixcomm
phoenixcomm
30 Apr 2015

Ok what in the world of Microsoft and Windows and Linux is NFS and why do I need it... Really I'm very happy with SMB or CIFS,  or Samba (reversed engineered SMB) so why change to NFS??

  1. SMB is a kludge, its what you see is maybe what you get.
  2. and it really is not Open...
  3. CIFS is single threaded which makes it SLOW!
  4. and NFS just works, and it's dam fast!!

 

History:

NFS is a distributed file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network much like local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (RPC) system. The Network File System is an open standard defined in RFCs, allowing anyone to implement the protocol.  There have been several versions with version 4 the latest.

 

My Network is comprised of several Linux Boxes on a 1 Gigabit Network (Player, Whirlwind, RSS), I also have a slower 100 Megabit Backbone which has my slower stuff (WiFi, network printers, etc.  I also have an additional 100 Megabit Network for NexGen my Simulator.  All of the Boxes are LinuxMint Ver 17r2. For this HowTo I will only concern ourselves with version 4.

 

How I Did It:

I am currently using Whirlwind as my desktop and file server.  There are a lot of Howto's out there and they all have there part but here is mine so here goes.

 

First I have to get NFS on my server.  You have you choice of using Synaptic or the terminal.. I will use and show you the terminal.

$ sudo apt-get install nfs-kernel-server nfs-common

Then edit your exports file. The follow 4 lines are my "exports", remember they will not be the same.

$ sudo vi /etc/exports

/mnt/MyData/public    192.168.1.1/24(rw,async,no_root_squash,subtree_check)

/mnt/MyMedia/Music  192.168.1.1/24(ro,async,no_root_squash,subtree_check)

/mnt/MyMedia/media  192.168.1.1/24(ro,async,no_root_squash,subtree_check)

/mnt/MyMedia/p2p      192.168.1.1/24(rw,async,no_root_squash,subtree_check)

 

so let explain my magic:

  • /mnt/......  Where my filesystem is mounted
  • 192.168.1.1/24  Who I want to share it with.. in this case I am sharing it with everybody hence the /24
  • ro or rw    Read Only or Read Write
  • async    allows the NFS server to violate the NFS protocol and reply to requests before any changes made by that request have been committed to stable storage (e.g. disc drive).
  • no_root_squash  Very often, it is not desirable that the root user on a client machine is also treated as root when accessing files on the NFS server. To this end, uid 0 is normally mapped to a different id: the so-called anonymous or nobody uid. This mode of operation (called 'root squashing') is the default, and can be turned off with no_root_squash.
  • subtree_check is also used to make sure that files inside directories to which only root has access can only be accessed if the filesystem is exported with no_root_squash even if the file itself allows more general access.

 

Now restart the NFS server

$ sudo service nfs-kernel-server start

 

You can test you service and exports by using this:

$ showmount -e

Export list for Whirlwind:

/mnt/MyData/public 192.168.1.1/24

/mnt/MyMedia/p2p  192.168.1.1/24

/mnt/MyMedia/media 192.168.1.1/24

/mnt/MyMedia/Music 192.168.1.1/24

 

Your Done!!

 

Now the Client.... (RSS)

install just the client.

$ sudo apt-get-install nfs-common  $ sudo apt-get install nfs-common

 

you can use showmount -e whirlwind on the client to show the servers exports but if you use name on your machines you must update your /etc/hosts file.... (good idea)

$ sudo /etc/hosts

192.168.1.23  Whirlwind

 

now try a mount command. I used my /mnt/  I added two directories under /mnt/ public and music. so here is what you need..

$ sudo mount -t nfs whirlwind:/mnt/MyData/public /mnt/public

now look in /mnt/public for your shares.. Got them. Good now one last thing.. Let make them mount when the machine starts.. cool

 

$ sudo vi /etc/fstab

Whirlwind:/mnt/MyData/public  /mnt/public

whirlwind:/mnt/MyMedia/Music /mnt/music

 

I think im done...

Cris H. image

PS 17JUNE2015 I made a small error! in the client machines you must add NFS to the fstab

>>>>>>>> Whirlwind:/mnt/MyData/Public     /mnt/public     NFS

 

PS 21OCT2016 I made a small error! in the line: $ sudo apt-get-install nfs-common

>>>>>>>   $ sudo apt-get install nfs-common

 

BTW if you want to mount your files on a local window 7 box, its not that hard Mount your NFS share on Windows 7

  • Sign in to reply

Top Comments

  • phoenixcomm
    phoenixcomm over 9 years ago in reply to shabaz +3
    Guys, shabaz Jan Cumps since you are both talking about the dark days... In 1977/8 or so I worked for Interdata in Oceanport. I helped deliver our 8/32 serial 1 to Bell Labs in Homedel. this was the first…
  • e14 Contributor
    e14 Contributor over 9 years ago in reply to e14 Contributor +2
    In answer to my first question, the clients do not automatically reconnect. They seem to hang a bit. I had to re-mount my nfs shares once the NFS server was available after going out of service. This is…
  • phoenixcomm
    phoenixcomm over 9 years ago in reply to e14 Contributor +2
    texadactyl Richard nope I use mostly LinuxMint and Solaris on my Sun UltraSparc. I have one box that runs windows for Ventura Publisher (It has things in it like Page Setup, Frames {this is where you type…
  • e14 Contributor
    e14 Contributor over 9 years ago

    One quibble:

    Now restart the NFS server

    $ sudo service nfs-kernel-server start

     

    should be

     

    $ sudo service nfs-kernel-server restart

     

    if the service is already running

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 9 years ago

    When your NFS server is rebooted, what affect does this have on the Linux client machines?  Do they automatically reconnect?

     

    Did you have any issues with access control?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 11 years ago in reply to clem57

    In one word "NO" its turned off...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 11 years ago in reply to clem57

    I think almost yes. Samba is needed only in the case you need to connect to a Windows machine. But this introduces more traffic adding an extra-protocol and some redundant parts if you install the full protocol - as many of the tutorial shows - e.g. the machine announce on the network, the workgroup definition and so on.

     

    In the use case I wrote on the Meditech: Raspian NFS sharing you see also a couple of specific examples of this application.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 11 years ago

    Nice how to for NFS. Does this mean you never use Samba?

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube