|
9 years ago 5 |
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??
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 as yours.
/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:
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
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/MyMedia/Music
/mnt/musicWhirlwind:/mnt/MyData/public
/mnt/public
Thanks
Cris H.
This is a reprint of my blog at element14.com
I have an error or the sin of omission which ever.
The clients fstab should be as follows
mount Whirlwind:/mnt/MyData/public /mnt/public NFS
There is still the problem that if the remote goes down and you, the desktop or anything else tries to access the remote disk you will hang the window or in worst case the detsktop for the duration of the NFS-timeout (usually in the vicinity of 5-15 minutes...)
With Automount you get a disk not available instantly.
The new font is much more readable though
Sorry for the different type sizes.. im older and 14px is about as small as I can stand. The editing was done in my blogs editor.. so I fixed what I could.. I hope you can all use it..
Thanks again..
nothing to grumble about ... it's great, thank you !!!
Really good except 2 things.
1) Why the mega-large font? Default size for the page is perfect.
2) Add automount to the setup and you do not have issues if a remote disk (or box) goes down.