Difference between revisions of "Setting up NFS for file sharing"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
Line 55: Line 55:
* Look into automounting (including graceful failure modes)  
* Look into automounting (including graceful failure modes)  


==Some Links==
== Some Links ==


* [https://www.cyberciti.biz/faq/how-to-ubuntu-nfs-server-configuration-howto/ Ubuntu Linux NFS Server installation and Configuration]
* [https://www.cyberciti.biz/faq/how-to-ubuntu-nfs-server-configuration-howto/ Ubuntu Linux NFS Server installation and Configuration]
 
* The Geek Diary: [https://www.thegeekdiary.com/understanding-the-etc-exports-file/ Understanding the /etc/exports File]
* [https://linux.die.net/man/8/exportfs exportfs(8) - Linux man page]
* [https://linux.die.net/man/5/exports exports(5) - Linux man page]
* [https://linux.die.net/man/8/mount mount(8) - Linux man page]<br>
[[Category:Linux]]
[[Category:Linux]]
[[Category: WIP]]
[[Category: WIP]]

Revision as of 17:06, 26 May 2022

Proven on:
Logo Debian.png
11 (bullseye)


Install NFS Server

  • sudo apt install nfs-kernel-server

Configure NFS Server

  • sudo vi /etc/exports

Add/edit:

/path/to/be/shared *(rw,async,no_root_squash,no_subtree_check)

For the changes to take effect, export and start NFS service.

  • sudo exportfs -a
  • sudo /etc/init.d/nfs-kernel-server start

Pretty simple...

Connecting to the NFS Server

You'll need NFS installed

  • sudo apt install nfs-common

or

  • sudo apt install nfs-kernel-server

Then you can check what's shared from any particular machine:

  • showmount -e [ServerName or Address]
    • (requires sudo on Debian...)

will show you what's shared from a machine

Setting up & mounting a share

  • sudo mkdir -p /path/to/mount/share
  • sudo mount [ServerName or Address]:/path/to/be/shared /path/to/mount/share

Better yet tho...

  • sudo vi /etc/fstab

& add an entry:

[ServerName or Address]:/path/to/be/shared /path/to/mount/share nfs rw,user,exec 0 0

TBD

  • Learn what flags do what in /etc/exports
  • Browsing in the GUI would be nice...
  • Look into automounting (including graceful failure modes)

Some Links