Jump to content

How to set up NFS


soerenderfor

Recommended Posts

7 hours ago, Igor said:

I don't need to use samba :) which is why I use NFS and got full network utilisation. But I do test it from time to time and it doesn't always work as expected. 

 

Don't get me wrong i use SAMBA because i have not played so much with NFS. I agree with you, i have my weekly battle VS. SAMBA when my NAS reboot, the remote shares do not stay in the same mounted folder after reboot. It is in (OMV).

It could be you had some nice tips? It was because of that i asked ;-)

 

I have read alot of articles about NFS.

So only if you had the golden trick or something you use in the daily? Thanks.

Link to comment
Share on other sites

I split this off into it's own topic.

 

NFS is super easy. Also reliable. It "just works." Especially when you have all GNU/Linux boxes (or similar) in your home / network (we do). In fact, that's probably the only real caveat.

 

In fact it's been running so well for so long I probably might not remember all details exactly to set it up. But it usually doesn't take me long to do so on a new server or client. And there are lots of guides on the internet.

 

Where were you getting hung up?

Link to comment
Share on other sites

I havn't looked at the nfs, but the time is coming very soon. The plugin Remotemount is mounting my samba shares different at every reboot.. Very very annoying when i have to edit docker at each reboot.

 

So i have not run in troubles 'yet'. 

Link to comment
Share on other sites

I would encourage you to look into it. I never have such issues.

 

There are lots of guides on the internet, I got it running without too much fuss. But let me know if you get stuck.

 

Cheers! :)

Link to comment
Share on other sites

On 1/25/2020 at 6:23 AM, TRS-80 said:

NFS is super easy. 

In fact it's been running so well for so long I probably might not remember all details exactly to set it up.

But it usually doesn't take me long to do so on a new server or client. And there are lots of guides on the internet.

 

Today I did give NFS a short try (I mostly use SAMBA, because I have also a Win10-Client) - I used the following guide:
https://linuxconfig.org/how-to-set-up-a-nfs-server-on-debian-10-buster

 

In short:

===============================================
NFS:

Info:		https://linuxconfig.org/how-to-set-up-a-nfs-server-on-debian-10-buster
WIN10NFS:	https://graspingtech.com/mount-nfs-share-windows-10/
===============================================
Server (192.168.6.20):
sudo apt install nfs-kernel-server

Export:
nano /etc/exports
/nfs 192.168.6.0/24(rw,sync,no_subtree_check)

sudo systemctl restart nfs-kernel-server
===============================================
Client (192.168.6.24):
sudo apt install nfs-common

Mount: 
mount -t nfs4 -o soft,rw,nosuid 192.168.6.20:/nfs /nfs
===============================================

Windows: 
mount -o anon \\192.168.6.20\nfs N:

But so my Win10-client can as "anonymous" only read the share - is there a better way for read/write?

And I didnt see the drive N: in the File-Explorer :(

 

NFSv4 without portmap see:
https://wiki.debian.org/NFSServerSetup

Link to comment
Share on other sites

3 hours ago, martinayotte said:

Did you have done the "regedit" tweak mentioned in the link ?

No - I didnt got a idea how to find the uid/gid for the directory on my nfs-armbian.

AND its weird for me to set such a thing via regedit for a driveshare - I think there must be a better way?


Now its working - I doenst see any more speed while copying against my Samba-Share :(

[EDIT] added the two registry entrys as 32bit dword and a value of 0

 

Link to comment
Share on other sites

Thanks @guidol! You beat me to it... :)

 

I usually add the mounts to /etc/fstab, that way they persist on reboot. Syntax is similar but slightly different. Then just reload that file with:

sudo mount -a

You will only have to do that once. From now on they will get mounted automatically at bootup.

 

Link to comment
Share on other sites

2 hours ago, TRS-80 said:

Thanks @guidol! You beat me to it... :)

I usually add the mounts to /etc/fstab, that way they persist on reboot.

Iam only careful with fstab entrys ;)
Some time ago I had one entry and the system didnt found it and doesnt boot completly anymore... so I do prefer mounting via commandline (inside /etc/rc.local) or for testing manually :)

Link to comment
Share on other sites

7 hours ago, guidol said:

NFSv4 without portmap see:
https://wiki.debian.org/NFSServerSetup

when I configure only NFSv4 in the 2 mentioned config-files ( /etc/default/nfs-common AND /etc/default/nfs-kernel-server )
I cant use showmount anymore. (ErrorMsg:  clnt_create rpc program not registered )

With support for NFS v2/v3 I could use it to get a list of the exported NFS shares:
 

root@npi-neo2-24(192.168.6.24):/# showmount -e 192.168.6.20
Export list for 192.168.6.20:
/nfs 192.168.6.0/24

and also the NFS-Client of my Windows 10 Prof. doenst like v4-only and doesnt connect via mount in cmd or network-shortcut in the file-explorer/manager, because the Win10 client only do support v2&v3:
https://docs.microsoft.com/en-us/windows-server/storage/nfs/nfs-overview

 

The network-shortcut does work (and also mount does work) when v2&v3 support is enabled in armbian (here on my BPI M2 Berry), but I didnt get the Drive-Letter in the file-explorer/manager.

Win10Prof_NFS_uid_gid.jpg

Link to comment
Share on other sites

It has been some years since I used any Windows, but back then at least it seemed the consensus of my research was that Windows' NFS implementation was not the greatest. Which was why I said from the very beginning (above):

 

On 1/24/2020 at 10:23 PM, TRS-80 said:

NFS is super easy. Also reliable. It "just works." Especially when you have all GNU/Linux boxes (or similar) in your home / network (we do). In fact, that's probably the only real caveat.

 

If you have mixed network, maybe use something else (Samba or ?). But I haven't researched it in years. I have all GNU/Linux boxes now and it's amazing how well everything "just works" once I switched completely over...

 

Imagine for a moment... an operating system designed from the ground up with the idea of interoperability and network usage in mind, using standard protocols... ;)

Edited by TRS-80
drivers -> implementation
Link to comment
Share on other sites

7 minutes ago, TRS-80 said:

If you have mixed network, maybe use something else (Samba or ?).

I do use samba with my SBCs (armbian), Windows 10 Prof on a PC and my Synology NAS, but today I had the time to try something new and would take a look at NFS - because many people have better speeds (but only while using NFS on Linux2Linux) - see also
Testing File Transfer SMB vs NFS with CPU Bottleneck!!

https://www.youtube.com/watch?v=btWAhEQcYpg

 

Sometimes when transfering armbian-images I only do use SFTP  on my internal network ;)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines