You are not logged in.

#1 2020-12-17 03:45:15

cdwijs
Member
Registered: 2010-04-24
Posts: 294

NFS does not work for me, what are the alternatives?

I have a arch linux NFS server, and a arch linux nfs client. This setup does not work all that well:

-After a suspend resume of the client and a shutdown powerup cycle of the server, everything on the client that uses NFS hangs, until I ssh into the NFS server, and restart the  nfs-server service.

-After my NFS server has been given another IP address from my router, it was nearly impossible to unmount the NFS share that disappeared, and mount the new NFS share. I ultimately had to suspend-resume the PC with the NFS client. (In dmesg I saw the NFS client crashing).

-NFS doesn't use any form of user authentication. This is a massive security risk.

Therefore I'm looking for an alternative to NFS. Any suggestions?

Last edited by cdwijs (2020-12-17 03:46:00)

Offline

#2 2020-12-17 03:48:55

twobooks
Member
From: rainforest
Registered: 2020-06-23
Posts: 46

Re: NFS does not work for me, what are the alternatives?

I use sshfs on top of ssh

Offline

#3 2020-12-17 04:54:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: NFS does not work for me, what are the alternatives?

Samba/CIFS, sshfs, AFP, WebDAV, FTP, iSCSI.... Lots of options, but you've only given a list of problems you've experienced with NFS, without defining what your actual requirements are.

Offline

#4 2020-12-17 04:55:02

murffatksig
Member
From: Atl
Registered: 2004-05-17
Posts: 358

Re: NFS does not work for me, what are the alternatives?

Samba?


"Oh, they have the internet on computers now."

Offline

#5 2020-12-17 08:35:35

seth
Member
Registered: 2012-09-03
Posts: 60,955

Re: NFS does not work for me, what are the alternatives?

The underlying network issues may spoil CIFS just the same…

11 Fix the NFS options
https://wiki.archlinux.org/index.php/NF … /etc/fstab

2. If the server alters its IP, mount dynamically and unmount on idle
https://wiki.archlinux.org/index.php/NF … th_systemd

User authentication isn't in scope of NFS - it's a network file system, not a remote file system.


Also, I didn't really investigate, but something™ (systemd?) mounts NFS w/ proto=udp by default, which is a dumbfuck idea, so you want to check the output of "mount" and ensure it says "proto=tcp"

In tend to run NFS w/ these options:

users,noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,actimeo=3,noatime,soft,bg,proto=tcp,mountproto=tcp

You may want to also use "nolock" if this is a single server / single client situation.

Offline

#6 2020-12-17 08:51:52

progandy
Member
Registered: 2012-05-17
Posts: 5,279

Re: NFS does not work for me, what are the alternatives?

-After my NFS server has been given another IP address from my router, it was nearly impossible to unmount the NFS share that disappeared, and mount the new NFS share. I ultimately had to suspend-resume the PC with the NFS client. (In dmesg I saw the NFS client crashing).

I suggest you try to configure your server with a fixed IPv4. Use a DHCP INFORM request to tell your router about it instead of requesting an IP. Most routers have a range of IPs that is reserved for that and isn't part of the DHCP pool.
With IPv6 it might be a bit more difficult, but you can configure a fixed IPv6 suffix and look at how you can set up your router to provide Unique Local Addresses in addition to the global prefix.

-NFS doesn't use any form of user authentication. This is a massive security risk.

You could set up NFSv4 with kerberos, but that is not as straight forward as samba or sshfs. You could also run it with stunnel, if all users that connect will have full access
https://www.linuxjournal.com/content/en … tunnel-tls

Last edited by progandy (2020-12-17 09:02:40)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2020-12-19 23:04:45

tbg
Member
Registered: 2017-06-22
Posts: 72

Re: NFS does not work for me, what are the alternatives?

Strangely, on a few kernel updates my NFS mounts via fstab would hang at either startup, suspend, or shutdown.

Switching to systemd mount units for my NFS share fixed the issue until the bug was corrected.

I'm not saying that is your problem, but I thought it was worth mentioning (just in case).

Offline

#8 2020-12-20 09:59:59

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: NFS does not work for me, what are the alternatives?

progandy wrote:

I suggest you try to configure your server with a fixed IPv4. Use a DHCP INFORM request to tell your router about it instead of requesting an IP. Most routers have a range of IPs that is reserved for that and isn't part of the DHCP pool.
With IPv6 it might be a bit more difficult, but you can configure a fixed IPv6 suffix and look at how you can set up your router to provide Unique Local Addresses in addition to the global prefix.

IPv6 is actually easier. Even private addresses can be stable and unlike DHCP are guaranteed to your host. Only the prefix could change, but that's no different from the DHCP changing.

Offline

Board footer

Powered by FluxBB